Page 1 of 1

Merging HDD

Posted: 2018/02/15 20:46:44
by Tehranshop
Hi
I have a VPS with CentOS 7
100GB HDD and it's my problem
df -h
/dev/mapper/centos-root 50G 28G 23G 55% /
devtmpfs 910M 0 910M 0% /dev
tmpfs 920M 0 920M 0% /dev/shm
tmpfs 920M 8.5M 912M 1% /run
tmpfs 920M 0 920M 0% /sys/fs/cgroup
/dev/sda1 1014M 189M 826M 19% /boot
/dev/mapper/centos-home 47G 33M 47G 1% /home
tmpfs 184M 0 184M 0% /run/user/0

centos-home 47GB
centos-root 50GB

I want to merge the centos-home space to centos-root
because all of my files working in /var/www/html

please help me
thanks

Re: Merging HDD

Posted: 2018/02/16 15:59:11
by chemal
Merging isn't possible.

Backup /home/* somewhere on centos-root. Then umount /home and lvremove centos-home. This gives you free space to lvextend centos-root. Then update /etc/fstab and move the home dirs from the backup to /home.