[systemd-devel] Fwd: System fails to create zram on startup, but I can do so manually

Andy Pieters systemd at andypieters.me.uk
Wed Nov 20 11:54:27 UTC 2024


On Fri, 8 Nov 2024 at 18:31, Torstein Sørnes <mkoutny at suse.com> wrote:

> I get an error that the device is not found even though it seems to exist
> with ls.
> $ /usr/lib/systemd/system-generators/zram-generator --setup-device
> /dev/zram0
>              (base) 19:25:17
> Error: Device /dev/zram0 not found
> $ ls -Ah -l /dev/zram0
>
>     (base) 19:25:19
> brw-rw----. 1 root disk 252, 0 2024-11-08 19:22 /dev/zram0
>
> $ cat /etc/systemd/zram-generator.conf
>
>     (base) 19:25:26
> [zram0]
> zram-size = 32G
>
>
>From the user manual


 zram-size=

Sets the size of the zram device as a function of MemTotal, available as
the ram variable.


Arithmetic operators (^%/*-+), e, π, SI suffixes, log(), int(), ceil(),
floor(), round(), abs(), min(), max(), and trigonometric functions are
supported.


Defaults to min(ram / 2, 4096)



Do you have >32G in your machine, how much. Maybe set the value a bit lower
or define it as a fraction
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20241120/6418aac7/attachment.htm>


More information about the systemd-devel mailing list