You are not logged in.
I have already zram setup for some week, and now i want a backup device for have more "unified memory"
So i follow what the wiki said, with no more resultat than the erroron the title.
I tried to change the udev rule
ACTION=="add", KERNEL=="zram0", ATTR{comp_algorithm}="zstd", ATTR{disksize}="8G", RUN="/usr/bin/mkswap -U clear /dev/%k", TAG+="systemd", ATTR{backing_dev}="/dev/volgroup0/lv_swap"with no succes too.
i tried a bunch of other combinastion of tee and echo command and everything i can rember who can write on the file, but not i can seems to write on /sys/block/zram0/backing_dev
Some system info :
Kernel : Linux 6.12.10-hardened1-1-hardened
zramctl from util-linux 2.40.4
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 1 0B 0 disk
zram0 253:0 0 8G 0 disk [SWAP]
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 1G 0 part /efi
└─nvme0n1p2 259:2 0 475.9G 0 part
└─lv_root 254:0 0 475.9G 0 crypt
├─volgroup0-lv_root 254:1 0 50G 0 lvm /
├─volgroup0-lv_home 254:2 0 300G 0 lvm /home
└─volgroup0-lv_swap 254:3 0 24G 0 lvm and /dev/volgroup0/lv_swap is the partion i want to use for baking device
Last edited by Wateir (2025-02-13 22:37:01)
Offline
So i follow what the wiki said, with no more resultat than the erroron the title.
which exact part of the wiki article? what's the exact sections?
Offline
which exact part of the wiki article? what's the exact sections?
Manually part here
https://wiki.archlinux.org/title/Zram#E … zram_block
Offline
The "Device or resource busy" error shows because the udev rule gets run twice. The wiki page was recently updated to fix this by additionally matching the state of the zram device with
ATTR{initstate}=="0"Add that to your udev rule (as shown in the wiki page) and try again.
AFAIK, all parameters must be set while initializing the device, so the manual method shouldn't work after the zram device already has been assigned a disksize.
Offline
Sorry for late respond
So i have a solution. If it can help somone.
all parameters must be set while initializing the device, so the manual method shouldn't work after the zram device already has been assigned a disksize.
So this not true, because i can do that.
For use manual methode after setup zram and start using it, for change all kind of thing that the error "ressource busy" don't allow you
swapoff -aThis gonna disable swap
modprob -r zramThis gonna "kill" (i don't have the right term, i'm sorry) zram
whatever command you need to run for change on zrammodprob zramReboot and enjoy youre change.
The wiki page was recently updated to fix this by additionally matching the state of the zram device with
Gonna read that, thanks mate
Offline
Sorry for late respond
So i have a solution. If it can help somone.
all parameters must be set while initializing the device, so the manual method shouldn't work after the zram device already has been assigned a disksize.
So this not true, because i can do that.
For use manual methode after setup zram and start using it, for change all kind of thing that the error "ressource busy" don't allow you
swapoff -aThis gonna disable swap
modprob -r zramThis gonna "kill" (i don't have the right term, i'm sorry) zram
whatever command you need to run for change on zrammodprob zramReboot and enjoy youre change.
The wiki page was recently updated to fix this by additionally matching the state of the zram device with [SOLVED] Enable zram backend device : Device or resource busy
https://bbs.archlinux.org/viewtopic.php?id=303196Gonna read that, thanks mate
How exactly did this work for you? Once you "kill" zram as you say, the device is no longer mounted and the directories become inaccessible.
If zram is active I can't write to it cause it's in use. If i kill it it doesn't work cause it isn't active.
Offline