Move space from /home to /root in OEL 6

Spread the love

Before, we are going to start check out the filesystem info using this command.

# df  -h

Then,  unmount the /howe drive .

Use this command

# umount /home

Shrink the /home filesystem

# fsck -f /dev/mapper/VolGroup-lv_home

The resize2fs  will resize ext2 or ext3 file systems. It can be used to enlarge or shrink an unmounted file system located on device.

#  resize2fs /dev/mapper/VolGroup-lv_home 5G

Shrink the /home logical volume
#  lvreduce -L -1G /dev/mapper/VolGroup-lv_home

Check the free space .

# vgs

extend the /root logical volume
#  lvextend -L +1G /dev/mapper/VolGroup-lv_root

Now, mount home directory and check disk.

You can view the logical view of drives. Using below command.

# lvdisplay

 

Leave a Reply

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