Centos by default creates a separate LVM with /home , which is un-necessary in certain installs , to remove it, follow the procedure

To check the current status:

rgin:12px'>
[root@localhost ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       50G  1.2G   46G   3% /
tmpfs                 935M     0  935M   0% /dev/shm
/dev/xvda1            485M   55M  405M  12% /boot
/dev/mapper/VolGroup-lv_home
                       45G  180M   43G   1% /home

Executing the changes:

umount /home
lvm lvremove /dev/mapper/VolGroup-lv_home
lvm lvresize -l+100%FREE /dev/mapper/VolGroup-lv_root
resize2fs /dev/mapper/VolGroup-lv_root

Checking size again:


[root@localhost /]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       95G  1.2G   89G   2% /
tmpfs                 935M     0  935M   0% /dev/shm
/dev/xvda1            485M   55M  405M  12% /boot

Modifying /etc/fstab to remove the mount point for /home

#
# /etc/fstab
# Created by anaconda on Thu Jul  3 11:57:44 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup-lv_root /                       ext4    defaults        1 1
UUID=bba0a5bb-7a8a-4d63-896f-c38b23422de3 /boot                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_home /home                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
Remove /home partition on CentOS 6

Leave a Reply

Your email address will not be published. Required fields are marked *