添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
  • Index
  • » Newbie Corner
  • » [SOLVED] zram0: /etc/udev/rules.d/99-zram.rules:1 Failed to write...
  • [SOLVED] zram0: /etc/udev/rules.d/99-zram.rules:1 Failed to write...

    I set Zram following the Arch Wiki steps https://wiki.archlinux.org/index.php/Im … m_or_zswap

    In my case I created a 4GB Zram diskspace and 1 device:

    (I have 16GB of RAM)

    # modprobe zram
    # echo lz4 > /sys/block/zram0/comp_algorithm
    # echo 4G > /sys/block/zram0/disksize
    # mkswap --label zram0 /dev/zram0
    # swapon --priority 100 /dev/zram0

    /etc/modules-load.d/zram.conf

    zram

    /etc/modprobe.d/zram.conf

    options zram num_devices=1

    /etc/udev/rules.d/99-zram.rules

    KERNEL=="zram0", ATTR{disksize}="4G" RUN="/usr/bin/mkswap /dev/zram0", TAG+="systemd"

    /etc/fstab

    /dev/zram0 none swap defaults 0 0


    And now I have this issue:

    Dec 20 15:56:17 aspire-e5-573 systemd-udevd[308]: zram0: /etc/udev/rules.d/99-zram.rules:1 Failed to write ATTR{/sys/devices/virtual/block/zram0/disksize}, ignoring: Device or resource busy

    And the file /sys/devices/virtual/block/zram0/disksize contains:

    4294967296

    So I need to know if I did something wrong, I don't see the problem, apparently, the Zram is working well, I have 4GB of swap space, but my doubt is if it's necessary to create 2 devices Zram0 and Zram1 according to the wiki?? Thanks smile

    Last edited by aaronglz23 (2019-12-20 17:13:59)