Fedora – Fun with ZRAM..
Fedora 33 will be using ZRAM as standard for swap, rather than a partition or swapfile on disk. I had no problem with this on a new F33 install (Odroid H2Plus) but after upgrading an existing Fedora 32 system it refused to initialise, and ‘/dev/zram0‘ did not exist. Research revealed that the documentation for much of this was very out-of-date, but I eventually managed to fix the problem..
For older systems (Fedora 32 and earlier), the config file was /etc/systemd/zram-generator.conf – and this was blank. The ‘new’ F33 config (with default parameters) is /usr/lib/systemd/zram-generator.conf.
At boot time, the old/empty config was still being accessed, and nothing was happening.. The fix is simple – just delete the old file at /etc/systemd/zram-generator.conf and reboot:
[root@rgz220 ~]# ll /dev/zram*
brw-rw---- 1 root disk 253, 0 Sep 4 16:29 /dev/zram0
[root@rgz220 ~]# swapon
NAME TYPE SIZE USED PRIO
/dev/zram0 partition 4G 0B 100
Robert Gadsdon. September 5th 2020.
Fedora – Fun with ZRAM.. — No Comments