← Back to Dashboard

Merging /home into the Root (/) Partition

Target: Oracle Linux / RHEL / CentOS (LVM-based systems)

⚠️ CRITICAL WARNING: DATA DELETION

This process will permanently delete all data in /home. You must backup your files to external storage before proceeding. Failure to update /etc/fstab will result in a boot failure.

1 Terminate Processes & Unmount

The system cannot remove /home if files are in use. Log in as root.

# Kill all processes using /home
fuser -km /home

# Unmount the volume
umount /home

2 Remove the Home Logical Volume

Delete the LV to return the space to the Volume Group pool.

# Remove the Home LV (Confirm with 'y')
lvremove /dev/ol/home

3 Extend the Root Logical Volume

Reallocate the 100% of the newly freed space to the root partition.

# Extend the Root LV
lvextend -l +100%FREE /dev/ol/root

4 Grow the Filesystem

Stretch the filesystem to fill the expanded container.

# For XFS (Default on Oracle/RHEL)
xfs_growfs /

# For Ext4 (Alternative)
# resize2fs /dev/ol/root

5 Update the Filesystem Table

Prevent the system from hanging at boot by removing the old mount point.

# Open fstab
vi /etc/fstab

# Comment out the /home line (Add # at the start)
# /dev/mapper/ol-home  /home  xfs  defaults  0 0

6 Recreate User Home Directory

Recreate your user folder on the root disk so you can log back in.

mkdir -p /home/$USER
chown $USER:$USER /home/$USER
chmod 700 /home/$USER
Verification: Run lsblk and df -h. The / partition should now reflect the combined total size.