⚠️ WARNING: DATA DELETION
This process will permanently delete everything currently stored in /home.
-
Backup: Copy important files to an external drive or cloud storage before starting.
-
User Access: After this process, you must manually recreate your user directory to allow logins.
Step 1: Terminate Processes & Unmount
The system will not allow you to remove /home if any files are being accessed (usually by your user session).
-
Log in as root (or use
sudo). -
Kill all processes using the
/homepartition:Bash
fuser -km /home(Note: If you are logged in as a standard user, your session will end. Log back in immediately as root.)
-
Unmount the volume:
Bash
umount /home
Step 2: Remove the Home Logical Volume
Now that the partition is unmounted, you can delete it to return the space to the Volume Group pool.
-
Remove the LV:
Bash
lvremove /dev/ol/homeType
ywhen asked to confirm.
Step 3: Extend the Root Logical Volume
Next, tell the root partition to grow and take up all the newly available space.
-
Extend the LV:
Bash
lvextend -l +100%FREE /dev/ol/root
Step 4: Grow the Filesystem
The "container" is now larger, but the filesystem needs to be stretched to fill it. Based on your output, you are likely using XFS.
-
Grow the XFS filesystem:
Bash
xfs_growfs /(If using ext4, use:
resize2fs /dev/ol/rootinstead.)
Step 5: Update the Filesystem Table (fstab)
You must prevent the system from trying to mount the deleted volume at boot.
-
Open the fstab file:
Bash
vi /etc/fstab -
Find the line for
/homeand delete it or comment it out by adding a#at the start:Plaintext
#/dev/mapper/ol-home /home xfs defaults 0 0 -
Save and exit.
Step 6: Recreate User Home Directory
Since the physical partition is gone, /home is now just a folder on your root disk. You must recreate your user's space:
Bash
mkdir -p /home/$USER
chown $USER:$USER /home/$USER
chmod 700 /home/$USER
Verification: Run lsblk and df -h to confirm / now shows the increased size .