0

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?

2 Answers 2

0

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.

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .