Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have an application that writes to /var/lib/yacy. I have a partition I want to use for that database. I have the partition mounted in fstab at /home/somwhere/partition

I want to move the current contents of the /var/lib/yacy into the mounted partition then change the fstab to point that device to /var/lib/yacy. How do I do this maintaining permissions and not breaking anything?

share|improve this question

2 Answers 2

Instead of going about this in such a roundabout way, you could just use /var/lib/yacy as the mount point for your partition instead. Edit your fstab file to mount the filesysytem on that mounpoint. As for setting appropriate permissions check out this page http://www.linuxstall.com/fstab/. You will need to reboot your computer for the changes to come into effect.

share|improve this answer

If you're /var/lib/yacy partition is a LVM logical volume then why not just extend the size if space is the concern?

You can read more about LVM here: https://wiki.ubuntu.com/Lvm

$ pvdisplay # display all available Physical Disks

$ vgdisplay # display available volume groups

$ lvdisplay # display all logical volumes

The easiest way to increase the size of your logical volume is to first increase the size of the VolumeGroup where the logical volume belongs.

Example $ sudo vgextend VolumeGroupName /home/somwhere/partition # Extend the size of the volume group to /home/somwhere/partition

Once you got your volume group extended, you can re-size the logical volume of interest
$ sudo lvextend -L +10g /var/lib/yacy # This will add 10GB to /var/lib/yacy

Reboot for the kernel to recognize the logical volume increase or use resize2fs command to resize logical volume on the fly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.