Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd v254 changes swapon output for zram device #23

Open
glitsj16 opened this issue Aug 2, 2023 · 0 comments
Open

systemd v254 changes swapon output for zram device #23

glitsj16 opened this issue Aug 2, 2023 · 0 comments

Comments

@glitsj16
Copy link

glitsj16 commented Aug 2, 2023

Hi, let me start by expressing my gratitude for creating/offering this excellent application. Have been using it without hiccups for a long time. But after my Arch Linux box got the systemd v254 recently, I did notice some peculiarity. Where before this upgrade swapon consistently reported /dev/zram0, it now shows /zram0 instead.

$ sudo swapon --noheadings --raw --show=name,size,used
/dev/sda2 4,2G 0B
/zram0 1024M 0B

UPDATE:
After doing some more experimenting it turned out we can keep PrivateNetwork and explicitly disable PrivateMounts.

Nothing crucial apparently, the zram device is created and still resides under /dev/zram0. But it's confusing and I opted to disable PrivateNetwork PrivateMounts to get back to the output one would expect from swapon.

PrivateNetwork=yes

$ cat /etc/systemd/system/zramd.service.d/fix-swapon-output.conf
[Service]
# systemd v254 introduced some changes that apparently affected
# swapon output - bring back known good behaviour
# https://github.com/systemd/systemd/commit/6b2d576f2b38c0385bb056af328754ec8966f9fd
PrivateMounts=no

Not sure whether there might be better ways to deal with this systemd change. I'll leave that up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant