0

I've setup RHEL7 with default partitioning, and they partitioned it as following:

/dev/mapper/rhel-home 100GB /home
/dev/mapper/rhel-root 50GB /

Both are on xfs filesystem. How can i shift most of my diskspace from /home to / ?

I've tried the below code

umount /home
lvreduce -rL -10G /dev/mapper/rhel-home
lvextend -rL +10G /dev/mapper/thel-root

But it doesnt seem to work because xfs file system does not support shrinking.

stiffy
  • 23
  • 3

1 Answers1

0

Assuming you have space in your root filesystem, I would do:

mkdir /opt/home && mv /home/* /opt/home && umount /home && rmdir /home && ln -s /opt/home /home

At this point you can destroy your rhel-home volume and recreate it again with the desired (shrinked) size, adding the remaining space to your rhel-root volume, then:

rm /home && mkdir /home &&  mount /home && mv /opt/home/* /home/ && rmdir /opt/home

I know seems complicated but it works.

Fredi
  • 2,257
  • 10
  • 13