Managing root partition on desktop

I wish I could take credit for the idea, just passing on a tip I’ve learned from others over the years.

Today I was able to convert the /home to an ext4 50 Gb filesystem.
But I could not create logical volumes in that mode, even after a “mount -o remount,rw /” so I had to create the lvm devices in normal mode and do the move mounting the new lv on /mnt.
Let’s see if I can turn /var into a fs. I think there’s no need to do the same to /etc. the size looks to be static.
I repeat, I have no real need to do this, I’m just playing around. :slight_smile: So far I’m having fun.

Red Hat warns about that in their docs. Some /var/* is used early in boot, so mounting /var should occur in initramfs stage.
Most subdirs of /var ought to be safe to mount “later” in boot.

Sorry to cut in, but…

Do you know where in the docs I can find that? I’m really interested to read up on that, since I have /var on a separate partition (in a LVM) + I have my swapfile in there as well. I’ve always used that setup on my systems, and haven’t run into anything, yet (knock-on-wood).

$ type diskList && diskList
diskList is aliased to `mount | grep ^/dev | cut -d ' ' -f 1-5'
/dev/mapper/rl8-root on / type xfs
/dev/mapper/rl8-home on /home type xfs
/dev/mapper/rl8-srv on /srv type xfs
/dev/mapper/rl8-var on /var type xfs
/dev/sda2 on /boot type ext2

$ swapon -s
Filename            Type    Size        Used    Priority
/var/vm/swapfile0   file    4194300     788992  -2

That’s what I usually go with. (In this case there’s also a 2MB biospartition for GPT that doesn’t show there.)

Trying to find the equalent of “9.15.5. Recommended Partitioning Scheme” for RHEL8 or 9. That one’s for RHEL6.

And that one has /var on a separate partition (Table 9.3, 9.5) - with a few warnings, and just make sure it’s big enough.

If you could find that doc you mentioned, I’d appreciate that. :+1: 'Cause if it’s recommended not to, I might have to rethink my setup.

Thanks for that info.
Some digging told me that I had to add “[VAR_VG_NAME]/[VAR_LV_NAME]” to GRUB_CMDLINE_LINUX
Regenerate grub config with grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg
Copy the current initramfs image to a safe place
Recreate initramfs image with dracut -v -f /boot/initramfs-$(uname -r).img $(uname -r)

1 Like

Thanks! :+1:


Ok, so I think I’m ok then. It’s way over 5GB, + my /srv partition (for Apache, etc) is 5GB as well, and it’s a local/standard drive (ie. non-iSCSI or FCoE). :crossed_fingers:

Maybe it is this you’re looking for

Thanks! Yes, that’s the same link I got from @jlehtone a few posts up,
…and where I quoted the text from.