Extend XFS root part

Beginner user here. I use Rocky Linux 9.5 for VFX platform. Did default GUI install from live ISO.

Now after a week I notice that my root partition is getting full - 70G.

Can someone please give me step by step guide how to securely shrink down my home and extend root?

I have searched a lot about this topic with conflicting guidelines. I would like to avoid botching up my system.

Thank you.

Depends on partition layout, whether using LVM or not, and whether you are using ext4 as the filesystem. If using the default filesystem of XFS you cannot shrink.

If using LVM, you could backup /home, then delete /home, resize your root partition and make it bigger, and then recreate /home with a new smaller size and restore data. That’s about the only realistic way. Either that, or backup and reinstall the system.

Thank you, I will do a full reinstall.
I am not yet confident I would not break something.

Volume group is LVM, root & home filesystem is XFS.

Which tool would you recommend for full backup? I looked into ReaR, ISO backup to USB. Is it reliable enough?

Another point/question:
What does use space from the root volume?
One can (start to) look at usage (see man du about the optons) with:

sudo du -hx -d1 /

There is an alternative for resize (for some data).
Lets say that system has ‘httpd’ and lots of pages in /var/www
One could create /home/www and move the data. Then there are two options:
A. Tell the httpd that data is in /home/www
B. Bind mount (see man mount) the /home/www to /var/www. That way the httpd will still see data in /var/www
In both cases there might be need for some fixing of permissions, particularly SELinux.

Sudo ncdu -x / shows me that. I have checked several times.

Mostly installed apps which I use - Davinci Resolve, Fusion Resolve, Houdini, Octane Render, some Flatpak libs, but the biggest one is Unreal Engine which downloads content into cache located in root.

Flatpak libs I can point to different location in /home. But other mentioned apps I would not touch in order not to break them.

Biggest problem is Unreal cache which can take up to 50 gigs LOL. I did not know this before I installed Rocky, otherwise would give /root at least 350 gigs of free space.

Lets go back to why the /home is on separate volume from the /?
Surely it is easier to put files into one big volume?
Yes. Easier to put, but is it easier to manage?

When one has to (re)install a system, there are three types of files:

  • System files. These are from packages. Their reinstall is easy, if you have a list of packages
  • System config. (This includes list af accounts: names, uids, gids, etc.) This is relatively small set of files to edit or add. There are configuration management systems that can read desired config from “recipe/playbook” – easy to backup files – and write (deploy) to the system. (This includes list of packages)
  • User data. This definitely has to be restored from backup

If you have one big volume, then you have to (1) install system files, (2) deploy config, and (3) restore user data.

If user data was on separate volume(s), then you still have to (1) install system files and (2) deploy config, but you can simply mount the existing volumes of user data to the new system. Those volumes do not have to be touched in the operation.

Furthermore, if backups are low level images of whole volume, then you don’t have large blob with everything in it, but smaller blobs for each volume (that needs backup at all).

Moreover, if something (Unreal) writes to a volume (/) and fills it up, then other things that also need to write there (e.g dnf) get issues. The /tmp and /var/tmp are also on the / by default, so regular programs that use temporary files are an issue too. If the /tmp were on a separate volume, then filling it will not choke the root volume.


In other words, keeping separate type of data in separate volumes gives more control over it – at expense of risk that space allocation is not perfect.


For example, the files of Unreal Engine (under /var, I presume) could be on its own, dedicated volume. During install of Rocky it is possible to add volume for that and set it mount to right path.

It is also possible to change the filesystem type from the default XFS to something else. The ext4 does allow shrink.

1 Like

Thank you for your valid points. Those are great observations. Will note down for next time I do clean install of Rocky Linux for those VFX purposes.

I’m not exactly answering your question, but maybe it will help you to decide how big the partition should be. I had to reinstall the workstations in our studio several times to get it right - at least for the moment :-).

Most dccs install to /opt . Notable exception is Autodesk Maya which installs to /usr (maybe can be modified…). Some apps let you decide and I always install them to /opt (Foundry, Houdini, Resolve, Unreal etc). Hence I bind mount /opt to /home/opt (that means I do not have to reinstall the dcc, when I have to reinstall rocky) with this line in /etc/fstab:

/home/opt /opt none defaults,bind 0 0

Flatpaks also use a lot of space - my /var/lib/flatpaks is around 40Gb atm. Hence I have my root partition at 256Gb - just to be save. But in the future it might need to be bind mounted too. Also make your /boot partition 1Gb - if you use nvidia, the /boot/initramfs-* files can get quite big.

As @jlehtone already said, best is to keep the home directory on a separate volume - this will let you reinstall the os without loosing all the user files.

Here’s the output of lsblk:

➜  ~ lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
nvme0n1     259:0    0  1.8T  0 disk
├─nvme0n1p1 259:1    0  600M  0 part /boot/efi
├─nvme0n1p2 259:2    0    1G  0 part /boot
└─nvme0n1p3 259:3    0  1.8T  0 part
  ├─cs-root 253:0    0  256G  0 lvm  /
  ├─cs-home 253:1    0  1.6T  0 lvm  /opt
  │                                  /home
  └─cs-swap 253:2    0    4G  0 lvm  [SWAP]

This might be an overkill for your setup, but for our studio I use tftp boot with a minimal kickstart to setup all the partitions, bind mounts and a ansible-pull script. This script will take over as soon as the installation reboots and finishes all necessary customization. Only the apps that install something to / need to be reinstalled (f.ex. Autodesk Maya, Pixar Tractor, TVpaint, Huion Drivers etc.). Hence I can reinstall a workstation between 20 to 40 minutes.

If you are using Nvidia hardware just be prepared to always have to deal with it - almost after each update you need somehow to reinstall the nvidia-driver. Embrace it, don’t fight it! See the other topics on this forum how to deal with it.

Good luck with your setup end enjoy the ride!

1 Like

Thank you for this valuable input :heart_suit:I appreciate it a lot. Getting info from someone who is deploying Linux at VFX studios.

Yea it is definitely a ride, but once setup correctly I hope it will be stable enough.

While we are at the studio topic @robbott how do you backup your rocky systems? In case something goes south?