Shrink /home partition - CentOS 7 +XFS +VirtFS
We need to reallocate space from /home to root / due to a space issue. You cannot shrink XFS partitions. While I have no problem backing up /home, deleting the partition reallocating the space and recreating /home, and restoring the data, there is this lovely caveat called VirtFS in Cpanel, which is running in /home. I'm unsure how to deal with VirtFS in this regard safely. Please help!
-
Hey there! For your specific plan, you can ignore the VirtFS area, as that will be recreated as necessary. It's just important that you don't delete data from within VirtFS on a live server. 0 -
Hey there! For your specific plan, you can ignore the VirtFS area, as that will be recreated as necessary. It's just important that you don't delete data from within VirtFS on a live server.
Does this sound like a solid plan to you? (referencing some of this from a serverfault.com article) Step1. - backup the contents of /home (tarball and ftp off contents) Step2. - umount /dev/mapper/centos-home Step3. - lvremove /dev/mapper/centos-home Step4. - lvcreate -L 200GB -n home centos - mkfs.xfs /dev/centos/home - mount /dev/mapper/centos-home Step5. - lvextend -r -l +100%FREE /dev/mapper/centos-root Step6. - ftp tarball back, extract to /home0 -
I really can't say for sure about the lvextend and lvcreate commands as that isn't something we do. I'd hate to say "yes" and then have something explode on your end. 0
Please sign in to leave a comment.
Comments
3 comments