Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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 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:

$ 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


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.