Description of problem: I tried to setup zram with a writeback device using zram-generator. My config is: /etc/systemd/zram-generator.conf [zram0] zram-size=24576 compression-algorithm=lz4 writeback-device=/dev/disk/by-label/zram-writeback But that failed at boot with a permission denied error: Jan 05 15:11:11 rhea zram-generator[1108]: Error: Failed to configure write-back device into /sys/block/zram0/backing_dev Jan 05 15:11:11 rhea zram-generator[1108]: Caused by: Jan 05 15:11:11 rhea zram-generator[1108]: Permission denied (os error 13) Jan 05 15:11:11 rhea systemd[1]: systemd-zram-setup: Main process exited, code=exited, status=1/FAILURE Jan 05 15:11:11 rhea systemd[1]: systemd-zram-setup: Failed with result 'exit-code'. Jan 05 15:11:11 rhea systemd[1]: Failed to start Create swap on /dev/zram0. Jan 05 15:11:11 rhea systemd[1]: Dependency failed for Compressed Swap on /dev/zram0. Jan 05 15:11:11 rhea systemd[1]: dev-zram0.swap: Job dev-zram0.swap/start failed with result 'dependency'. Jan 05 15:11:11 rhea audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=systemd-zram-setup@zram0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed' Version-Release number of selected component (if applicable): zram-generator 1.1.1 How reproducible: each boot Steps to Reproduce: 1. Ensure that a block device is available to serve as zram write back device. 2. Create the above config and restart the system. Actual results: Permission denied errors in the log with no zram configured. Expected results: zram is configured with a block device.
It turned out Fedora kernel is not compiled with the CONFIG_ZRAM_WRITEBACK option. Thus, when zram-generator tries to write to /sys/block/zram0/backing_dev, it got the permission denied error. Still it will be nice if zram-generator can detect the absence of /sys/block/zramN/backing_dev and report that zram backing is not supported. Currently the error does not even include the name of the file zram-generator ties to write.
https://github.com/systemd/zram-generator/commit/1ec40215b1
FEDORA-2022-5e0fef8466 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-5e0fef8466
FEDORA-2022-c7f28019a2 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2022-c7f28019a2
FEDORA-2022-95003a8fd5 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-95003a8fd5
FEDORA-2022-5e0fef8466 has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-5e0fef8466` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-5e0fef8466 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-95003a8fd5 has been pushed to the Fedora 35 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-95003a8fd5` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-95003a8fd5 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-c7f28019a2 has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-c7f28019a2` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-c7f28019a2 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-95003a8fd5 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-5e0fef8466 has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-c7f28019a2 has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.