Fedora 33 adds a compressed-memory-based swap device using zram. Cool! Now you can remove your old swap device, if you were a curmudgeon like me and even had one in the first place.
If you are NOT on an EFI system or not using LVM, be aware of this and make changes to these steps as needed. (Specifically, the path given in step 6 will be different.)
- After upgrading to Fedora 33, run
free
. Notice that swap size is the sum of the 4G zram device plus your previous disk-based swap device. Tryzramctl
andlsblk
commands for more info. - Stop swapping to the swap device we’re about to remove. If using LVM, expect the VG and LV names to be different.
swapoff /dev/vg0/swap
- If LVM, remove the no-longer-needed logical volume.
lvremove /dev/vg0/swap
- Edit
/etc/fstab
and remove (or comment out) the line for your swap device. - Edit
/etc/default/grub
.
In theGRUB_CMDLINE_LINUX
line, remove the “resume=” part referring to the now-gone swap partition, and the"rd.lvm.lv
=” part that also refers to it. - Apply above changes to actual GRUB configuration:
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Reboot and your system should come back up. Enjoy using that reclaimed disk space for more useful things — it’s now unused space in the LVM volume group. If you want to actually use it, look into lvextend
, and also resize2fs
or xfs_growfs
.