Page 1 of 1

Configuring new home directory

Posted: Sun Aug 13, 2017 5:27 pm
by webomg
I have a new server setup with digital ocean running CentOS 7.3.1611

I have added a new volume that seem to be mounted successfully and is writable. I'm having an issue changing the home directory Vesta is currently using to the new volume.

The current volume Vesta is using is:
/dev/vda1 20G 3.5G 16G 19% /

The volume I need to change to is:
/dev/sda 99G 61M 94G 1% /mnt/volume-nyc1-03

I tried to use symbolic linking but it didn't work for me, not sure if thats the way I should be doing it or if I did it right. This is what I tried to do:
mv /home /mnt/volume-nyc1-03
ln -s /home /mnt/volume-nyc1-03/home

When I try to run:
mv /home /mnt/volume-nyc1-03
I get the following error:
mv /home /mnt/volume-nyc1-03
mv: inter-device move failed: ‘/home’ to ‘/mnt/volume-nyc1-03/home’; unable to remove target: Directory not empty

the ln -s /home /mnt/volume-nyc1-03/home didn't give me an error but Vesta is still using the default volume to store my data.

Any help would be really appreciated!

Re: Configuring new home directory

Posted: Tue Aug 15, 2017 2:40 pm
by gecube_ru
I think that
a) this question is not related to Web server, but is general
b) you have two options:
1) if you use lvm, you can just extend your current volume group to second physical volume (sda), and then resize the home filesystem
2) other approach is to rewrite /etc/fstab file and mount NEW volume (let's say /dev/sda1) instead of old /home

In any case you didn't provide enough information to make possible give your particular advise.

Please show the lvm settings and /etc/fstab