How to Shrink /home and Expand Root on CentOS 7
This guide walks through shrinking the /home partition, extending the root filesystem on a CentOS 7 server, handling busy mount issues, installing missing tools like fuser and xfsdump, resizing XFS, and safely remounting the partitions.
Background
The log server was originally set up with an unreasonable partition layout, leaving the /home filesystem oversized and the root filesystem lacking space.
Goal
Reduce the /home partition to about 100 GB and enlarge the root ( /) partition to accommodate growth.
Step 1 – Identify and Stop Processes Using /home
Attempting umount /home fails with “target busy”. The fuser command can reveal the offending processes, but on CentOS 7 it is missing.
Install the missing utility: yum install psmisc Now locate the processes: fuser -m /home Kill the identified PID (example 11757): kill -9 11757 After the process stops, unmount the filesystem:
umount /homeSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
ITPUB
Official ITPUB account sharing technical insights, community news, and exciting events.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
