hreinecke / zramcfg

ZRAM configuration
0 stars 2 forks source link

Doesn't seem to work on openSUSE Tumbleweed #2

Open alexjp opened 8 years ago

alexjp commented 8 years ago

Hi,

I am testing this on openSUSE Tumbleweed, and it doesn't seem to work. It properly loads the configuration, but from what it seems, the zram device doesnt have a valid swap header.

doing a mkswap "zram device" and then swapon "zram device" works.

Thanks

janondrusek commented 6 years ago

Same here - using openSUSE Tumbleweed and cannot make it work:

# cat /etc/os-release 
NAME="openSUSE Tumbleweed"
# VERSION="20180613"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20180613"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20180613"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"

# zramcfg -c /etc/zram.cfg save
Save configuration for /dev/zram1
Traceback (most recent call last):
  File "/usr/sbin/zramcfg", line 139, in <module>
    zram.save(args.force)
  File "/usr/sbin/zramcfg", line 52, in save
    with open(attrname, 'r') as f:
IOError: [Errno 13] Permission denied: '/sys/block/zram1/mem_limit'

# zramctl 
NAME       ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram1 lzo             1G   4K   81B   12K       4 [SWAP]
/dev/zram0 lzo             1G   4K   81B   12K       4 [SWAP]

# ls -la /sys/block/zram0/mem_limit
--w------- 1 root root 4096 Jun 16 19:54 /sys/block/zram0/mem_limit
\

mem_limit file is not set to be readable. Is there an example of the .cfg file somewhere? I'd create manually as a workaround.

codebori commented 5 years ago

Same problem here.