We are starting CHRISTMAS Sale. Get 30% OFF on lifetime licenses with code: FYSKK72

Configuring new home directory

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Posts: 1
Joined: Sun Aug 13, 2017 5:14 pm

Configuring new home directory

Postby webomg » Sun Aug 13, 2017 5:27 pm

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!

Posts: 138
Joined: Thu Jun 22, 2017 1:21 pm

Re: Configuring new home directory

Postby gecube_ru » Tue Aug 15, 2017 2:40 pm

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

Return to “Web Server”

Who is online

Users browsing this forum: Bing [Bot] and 7 guests