Increase HOME size

Hello there, as you can see my /home are just 31G and only 7.5G.

$ df -h -x tmpfs -x devtmpfs
Filesystem                               Size  Used Avail Use% Mounted on
/dev/mapper/fedora_localhost--live-root   63G   23G   37G  38% /
/dev/sdb3                                976M  232M  678M  26% /boot
/dev/mapper/fedora_localhost--live-home   31G   22G  7.5G  75% /home

7GB available space (HOME) is too small, I still have 63GB on root.

How I can take this ROOT free size into HOME?

Looks like you only have 37G available on root (not 63G). You can resize your volumes with lvm tools. Because you need to adjust the root volume and filesystem, you should do this from a live boot environment. The basic idea is this: First you need to free space from the root volume and then add that freed space to your home volume. These are not detailed steps but should give you basic idea so you can read the relevant documentation.

  1. Backup your data - you’re going to manipulate filesystems so data loss is a real concern. Be careful!
  2. Boot from a USB stick or other drive device into a live environment - you need to act on your volumes and filesystems unmounted.
  3. Check the filesystems on your root and home partitions with e2fsck to make sure there are no errors.
  4. Reduce the root filesystem size with resize2fs by the amount you intend to shrink the volume.
  5. Reduce the root volume size with lvreduce by the same amount as you reduced the filesystem.
  6. Increase the home volume size with lvextend by the amount you just freed from the root volume.
  7. Increase the home filesystem size with resize2fs
  8. lvdisplay should show you the new volume sizes.
  9. Mount your filesystems and make sure everything is ok.
  10. Reboot back into installed system with the newly resized volumes and filesystems.
1 Like

The only thing I’ll add to the advice from @zach is that if you use lvresize rather than lvreduce / lvextend, you can pass it the -r flag to have it also resize the filesystem for you. That replaces steps 3-6 with just 2 discrete lvresize -r steps, and you know the filesystem will be correctly sized to the LV.

Also, while it’s true the shrinking has to be done from a service environment, the same isn’t true for growing a volume. So, I wouldn’t be too quick to put all of that extra space in the /home volume immediately. In many ways it’s better to wait until you need it, because an LV can always be grown with free extents from the volume group at any time. Even on a live system, even while the volume is mounted read-write, and even while it’s in use.

I’ve grown LVs during file transfers, and the only impact it had was a marginal slowdown. (And even that’s probably not an issue if you’re using an SSD.) So as far as space allocations go, with LVM procrastination really is a virtue. As long as there are extents in the free pool, you can always put them wherever you end up needing the space.