Move /home partition to /var/www/vhosts?
Posted: 2019/03/15 17:57:03
Hi all,
I keep my web server files under /var/www/vhosts and I notice my space is allocated to the /home directory instead.
How can I use the 1.4T for /var/www/vhosts instead of the /home directory?
Can I simply edit the /etc/fstab file and change
to
without losing what is in the /var/www/vhosts directory?
I keep my web server files under /var/www/vhosts and I notice my space is allocated to the /home directory instead.
Code: Select all
# lsblk -io NAME,TYPE,SIZE,MOUNTPOINT,FSTYPE,MODEL
NAME TYPE SIZE MOUNTPOINT FSTYPE MODEL
sdb disk 477G Samsung SSD 860
`-sdb1 part 477G LVM2_member
`-centos-home lvm 1.3T /home xfs
sr0 rom 1024M DRW-24B1ST j
sdc disk 477G Samsung SSD 860
`-sdc1 part 477G LVM2_member
`-centos-home lvm 1.3T /home xfs
sda disk 477G Samsung SSD 860
|-sda2 part 476G LVM2_member
| |-centos-swap lvm 31.5G [SWAP] swap
| |-centos-home lvm 1.3T /home xfs
| `-centos-root lvm 50G / xfs
`-sda1 part 1G /boot xfs
Code: Select all
# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 32G 0 32G 0% /dev
tmpfs 32G 0 32G 0% /dev/shm
tmpfs 32G 1.4M 32G 1% /run
tmpfs 32G 0 32G 0% /sys/fs/cgroup
/dev/mapper/centos-root 50G 3.1G 47G 7% /
/dev/sda1 1014M 253M 762M 25% /boot
/dev/mapper/centos-home 1.4T 33M 1.4T 1% /home
tmpfs 6.3G 0 6.3G 0% /run/user/1000
Can I simply edit the /etc/fstab file and change
Code: Select all
/dev/mapper/centos-home /home xfs defaults 0 0
Code: Select all
/dev/mapper/centos-home /var/www/vhosts xfs defaults 0 0