[systemd-devel] Fwd: System fails to create zram on startup, but I can do so manually
Torstein Sørnes
t.soernes at gmail.com
Wed Nov 20 08:59:29 UTC 2024
Do you have any more advice on this?
On Fri, Nov 8, 2024 at 7:26 PM Torstein Sørnes <t.soernes at gmail.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
>
> On Thu, Nov 7, 2024 at 7:35 PM Michal Koutný <mkoutny at suse.com> wrote:
>
>> Hello Torstein.
>>
>> On Tue, Nov 05, 2024 at 03:51:31PM GMT, Torstein Sørnes <
>> t.soernes at gmail.com> wrote:
>> > I have a Fedora 41 laptop with 32GB of ram.
>> >
>> > On startup, this shows in the journal:
>> > ```
>> > nov. 05 13:58:32 D2S3Q34 zram-generator[1059]: Error: Failed to
>> configure
>> > disk size into /sys/block/zram0/disksize
>> > nov. 05 13:58:32 D2S3Q34 zram-generator[1059]: Caused by:
>> > nov. 05 13:58:32 D2S3Q34 zram-generator[1059]: Cannot allocate
>> memory
>> > (os error 12)
>> > nov. 05 13:58:32 D2S3Q34 kernel: zram-generator: vmalloc error: size
>> > 131072000000000, exceeds total pages, mode:0xdc0(GFP_KERNEL|__GFP_ZERO),
>> ^^^^^^^^^^^^^^^
>> This value looks suspicious.
>>
>> > After starting up, I can execute this series of commands, and
>> successfully
>> > create a 32GB swap:
>> > ```
>> > sudo swapoff /dev/zram0
>> > sudo zramctl --reset /dev/zram0
>> > sudo zramctl --find --size 32G
>>
>> Notice zramctl operation may differ from zram-generator,
>> perhaps try with:
>> /usr/lib/systemd/system-generators/zram-generator --setup-device
>> /dev/zram0
>>
>> and what is in your zram-generator.conf?
>>
>> Thanks,
>> Michal
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20241120/0b711209/attachment.htm>
More information about the systemd-devel
mailing list