ecdye / zram-config

A complete zram-config utility for swap, directories, and logs to reduce SD, NAND and eMMC block wear.
MIT License
412 stars 53 forks source link

It doesn't mount correctlly. #58

Closed yutayu closed 3 years ago

yutayu commented 3 years ago

I install this script at raspbian and run . It doesn't work well at all. Try it please.

uname -a Linux raspberrypi 5.10.11-v7+ #1399 SMP Thu Jan 28 12:06:05 GMT 2021 armv7l GNU/Linux

yutayu commented 3 years ago

zram-config doesn't mount depending on ztab correctly.

yutayu commented 3 years ago
pi@raspberrypi:~ $ journalctl -xe | grep zram
Feb 08 02:26:35 raspberrypi systemd[1]: Started zram-config.
-- Subject: A start job for unit zram-config.service has finished successfully
-- A start job for unit zram-config.service has finished successfully.
Feb 08 02:26:37 raspberrypi zram-config[520]: + TMPDIR=/tmp
Feb 08 02:26:37 raspberrypi zram-config[520]: + ZSHARE=/usr/local/share/zram-config
Feb 08 02:26:37 raspberrypi zram-config[520]: + ZLOG=/usr/local/share/zram-config/log/zram-config.log
Feb 08 02:26:37 raspberrypi zram-config[520]: + ZDIR=/opt/zram
Feb 08 02:26:37 raspberrypi zram-config[520]: + [[ '' == \s\h\u\t\d\o\w\n ]]
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$1" in
Feb 08 02:26:37 raspberrypi zram-config[520]: ++ date +%Y-%m-%d-%H:%M:%S
Feb 08 02:26:37 raspberrypi zram-config[520]: + echo 'zram-config start 2021-02-08-02:26:37'
Feb 08 02:26:37 raspberrypi zram-config[520]: + rm -fv /tmp/zram-device-list.new
Feb 08 02:26:37 raspberrypi zram-config[520]: + file=/etc/ztab
Feb 08 02:26:37 raspberrypi zram-config[520]: + ZTAB_EMPTY=true
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + continue
Feb 08 02:26:37 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + set -- swap lzo-rle 250M 750M 75 0 80
Feb 08 02:26:37 raspberrypi zram-config[520]: + echo 'ztab create swap lzo-rle 250M 750M 75 0 80  '
Feb 08 02:26:37 raspberrypi zram-config[520]: + ZTAB_EMPTY=false
Feb 08 02:26:37 raspberrypi zram-config[520]: + ZTYPE=swap
Feb 08 02:26:37 raspberrypi zram-config[520]: + ALG=lzo-rle
Feb 08 02:26:37 raspberrypi zram-config[520]: + MEM_SIZE=250M
Feb 08 02:26:37 raspberrypi zram-config[520]: + DISK_SIZE=750M
Feb 08 02:26:37 raspberrypi zram-config[520]: + [[ -f /tmp/zram-device-list ]]
Feb 08 02:26:37 raspberrypi zram-config[520]: + test -f /tmp/zram-device-list.new
Feb 08 02:26:37 raspberrypi zram-config[520]: + case "$1" in
Feb 08 02:26:37 raspberrypi zram-config[520]: + PRIORITY=75
Feb 08 02:26:37 raspberrypi zram-config[520]: + PAGE_CLUSTER=0
Feb 08 02:26:37 raspberrypi zram-config[520]: + SWAPPINESS=80
Feb 08 02:26:37 raspberrypi zram-config[520]: + createZswap
Feb 08 02:26:37 raspberrypi zram-config[520]: + createZdevice
Feb 08 02:26:37 raspberrypi zram-config[520]: + [[ -d /sys/class/zram-control ]]
Feb 08 02:26:37 raspberrypi zram-config[520]: + modprobe --verbose zram
Feb 08 02:26:38 raspberrypi zram-config[520]: ++ zramctl --find
Feb 08 02:26:38 raspberrypi kernel: zram: Added device: zram0
Feb 08 02:26:38 raspberrypi zram-config[520]: ++ tr -dc 0-9
Feb 08 02:26:38 raspberrypi zram-config[520]: + RAM_DEV=0
Feb 08 02:26:38 raspberrypi zram-config[520]: + [[ -z 0 ]]
Feb 08 02:26:38 raspberrypi zram-config[520]: + zramctl --size 250M --algorithm lzo-rle /dev/zram0
Feb 08 02:26:38 raspberrypi kernel: zram0: detected capacity change from 0 to 262144000
Feb 08 02:26:38 raspberrypi zram-config[520]: + [[ -n 250M ]]
Feb 08 02:26:38 raspberrypi zram-config[520]: + echo 250M
Feb 08 02:26:38 raspberrypi zram-config[520]: + echo 'zram0 created comp_algorithm=lzo-rle mem_limit=250M disksize=750M'
Feb 08 02:26:38 raspberrypi zram-config[520]: + mkswap --label zram-config0 /dev/zram0
Feb 08 02:26:38 raspberrypi zram-config[520]: + [[ -n 75 ]]
Feb 08 02:26:38 raspberrypi zram-config[520]: + swapon -v -p 75 /dev/zram0
Feb 08 02:26:38 raspberrypi zram-config[520]: + [[ -n 0 ]]
Feb 08 02:26:38 raspberrypi zram-config[520]: + sysctl vm.page-cluster=0
Feb 08 02:26:38 raspberrypi kernel: Adding 255996k swap on /dev/zram0.  Priority:75 extents:1 across:255996k SSFS
Feb 08 02:26:38 raspberrypi zram-config[520]: + [[ -n 80 ]]
Feb 08 02:26:38 raspberrypi zram-config[520]: + sysctl vm.swappiness=80
Feb 08 02:26:38 raspberrypi zram-config[520]: + echo 'swap                /zram0                zram-config0'
Feb 08 02:26:38 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:38 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:38 raspberrypi zram-config[520]: + continue
Feb 08 02:26:38 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:38 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:38 raspberrypi zram-config[520]: + continue
Feb 08 02:26:38 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:38 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:38 raspberrypi zram-config[520]: + continue
Feb 08 02:26:38 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:38 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:38 raspberrypi zram-config[520]: + continue
Feb 08 02:26:38 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:38 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:38 raspberrypi zram-config[520]: + continue
Feb 08 02:26:38 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:38 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:38 raspberrypi zram-config[520]: + continue
Feb 08 02:26:38 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:38 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:38 raspberrypi zram-config[520]: + continue
Feb 08 02:26:38 raspberrypi zram-config[520]: + read -r line
Feb 08 02:26:38 raspberrypi zram-config[520]: + case "$line" in
Feb 08 02:26:38 raspberrypi zram-config[520]: + set -- log lzo-rle 50M 150M /var/log /log.bind /opt/zram/oldlog
Feb 08 02:26:38 raspberrypi zram-config[520]: + echo 'ztab create log lzo-rle 50M 150M /var/log /log.bind /opt/zram/oldlog  '
Feb 08 02:26:38 raspberrypi zram-config[520]: + ZTAB_EMPTY=false
Feb 08 02:26:38 raspberrypi zram-config[520]: + ZTYPE=log
Feb 08 02:26:38 raspberrypi zram-config[520]: + ALG=lzo-rle
Feb 08 02:26:38 raspberrypi zram-config[520]: + MEM_SIZE=50M
Feb 08 02:26:38 raspberrypi zram-config[520]: + DISK_SIZE=150M
Feb 08 02:26:38 raspberrypi zram-config[520]: + [[ -f /tmp/zram-device-list ]]
Feb 08 02:26:38 raspberrypi zram-config[520]: + [[ log == \s\w\a\p ]]
Feb 08 02:26:38 raspberrypi zram-config[520]: ++ grep 'log.*/var/log' /tmp/zram-device-list
Feb 08 02:26:38 raspberrypi zram-config[520]: + entry=
Feb 08 02:26:38 raspberrypi zram-config[520]: + [[ -n '' ]]
Feb 08 02:26:38 raspberrypi zram-config[520]: + test -f /tmp/zram-device-list.new
Feb 08 02:26:38 raspberrypi zram-config[520]: + case "$1" in
Feb 08 02:26:38 raspberrypi zram-config[520]: + TARGET_DIR=/var/log
Feb 08 02:26:38 raspberrypi zram-config[520]: + BIND_DIR=/log.bind
Feb 08 02:26:38 raspberrypi zram-config[520]: + OLDLOG_DIR=/opt/zram/oldlog
Feb 08 02:26:38 raspberrypi zram-config[520]: + serviceConfiguration stop
Feb 08 02:26:38 raspberrypi zram-config[520]: + [[ stop == \s\t\o\p ]]
Feb 08 02:26:38 raspberrypi zram-config[520]: + echo 'Stopping services that interfere with zram device configuration'
Feb 08 02:26:38 raspberrypi zram-config[520]: ++ systemctl is-active rsyslog.service
Feb 08 02:26:39 raspberrypi zram-config[520]: + [[ inactive == \a\c\t\i\v\e ]]
Feb 08 02:26:39 raspberrypi zram-config[520]: ++ systemctl is-active systemd-journald.service
Feb 08 02:26:39 raspberrypi zram-config[520]: + [[ active == \a\c\t\i\v\e ]]
Feb 08 02:26:39 raspberrypi zram-config[520]: + export journaldActive=true
Feb 08 02:26:39 raspberrypi zram-config[520]: + journaldActive=true
Feb 08 02:26:39 raspberrypi zram-config[520]: + journalctl --flush
Feb 08 02:26:39 raspberrypi zram-config[520]: + systemctl stop systemd-journald.socket systemd-journald-audit.socket systemd-journald-dev-log.socket
Feb 08 02:26:39 raspberrypi systemd[1]: Condition check resulted in /dev/zram0 being skipped.
-- Subject: A start job for unit dev-zram0.device has finished successfully
-- A start job for unit dev-zram0.device has finished successfully.
Feb 08 02:26:39 raspberrypi systemd[1]: Created slice system-zram\x2dsetup.slice.
-- Subject: A start job for unit system-zram\x2dsetup.slice has finished successfully
-- A start job for unit system-zram\x2dsetup.slice has finished successfully.
Feb 08 02:26:42 raspberrypi systemd[1155]: zram-setup@zram0.service: Failed to connect stdout to the journal socket, ignoring: Connection refused
Feb 08 02:26:42 raspberrypi systemd[1166]: zram-setup@zram0.service: Failed to connect stdout to the journal socket, ignoring: Connection refused
Feb 08 02:26:42 raspberrypi systemd[1167]: zram-setup@zram0.service: Failed to connect stdout to the journal socket, ignoring: Connection refused
Feb 08 02:26:42 raspberrypi kernel: zram: Added device: zram1
Feb 08 02:26:42 raspberrypi systemd[1208]: zram-setup@zram1.service: Failed to connect stdout to the journal socket, ignoring: Connection refused
Feb 08 02:26:42 raspberrypi systemd[1209]: zram-setup@zram1.service: Failed to connect stdout to the journal socket, ignoring: Connection refused
Feb 08 02:26:42 raspberrypi systemd[1211]: zram-setup@zram1.service: Failed to connect stdout to the journal socket, ignoring: Connection refused
yutayu commented 3 years ago
pi@raspberrypi:~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       916G  797G   74G  92% /
devtmpfs        430M     0  430M   0% /dev
tmpfs           463M   51M  412M  11% /dev/shm
tmpfs           463M   13M  450M   3% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           463M     0  463M   0% /sys/fs/cgroup
tmpfs           463M  412K  462M   1% /tmp
/dev/mmcblk0p1  253M   48M  205M  19% /boot
tmpfs            93M  8.0K   93M   1% /run/user/1000
pi@raspberrypi:~ $ zramctl
NAME       ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lzo-rle       250M   4K   86B   12K       4 [SWAP]
yutayu commented 3 years ago

swap lzo-rle 250M 750M 75 0 80

swap lzo-rle 400M 1200M 75 0 80

dir lzo-rle 50M 150M /home/pi /pi.bind

dir lzo-rle 100M 300M /home/pi /pi.bind

log lzo-rle 50M 150M /var/log /log.bind /opt/zram/oldlog

log lzo-rle 50M 150M /var/log /log.bind /opt/zram/oldlog

ecdye commented 3 years ago

This tells me nothing, what is your issue zram-config seems to be working from the output you provided. Please describe what your issue is not just make blanket statements about it not working.

yutayu commented 3 years ago

I wanted to set swap size 750M, but at last 250M. and to set /var/log on zram but it is not on zram.

ecdye commented 3 years ago

It seems that it is working fine for the swap. Have you tried to reboot before starting zram for the log? Additionally make sure that if there are services accessing the log directory that they are stopped before starting zram-config. I have tested this on my systems and never observed an issue.

yutayu commented 3 years ago

In this case , 250M on ztab is as memlimit of swap. and I rebooted pi again , it re-produces.

No problem ? strange.

ecdye commented 3 years ago

Yes that is correct. I don't see what your issue is.

yutayu commented 3 years ago

swap alg mem_limit disk_size swap_priority page-cluster swappiness swap lzo-rle 250M 750M 75 0 80

I set swapsize 750M as disk_size, but zram-config made 250M.

This is problem.

ecdye commented 3 years ago

250 is the memory limit, 750 is the disk limit. The maximum data allowed in uncompressed size will be 750M, but the zram will limit the memory or RAM usage of this to 250M which is about right for the compression algorithm used. It is working properly.

Please read the documentation at https://github.com/ecdye/zram-config#configure

yutayu commented 3 years ago

see , zram-config made 250M as DISKSIZE. so It should be 750M as DISKSIZE.

yutayu commented 3 years ago

at ztab swap lzo-rle 250M 750M 75 0 80 at ztamctl /dev/zram0 lzo-rle 250M 4K 86B 12K 4 [SWAP]

This is not correct result.

ecdye commented 3 years ago

Thank you for finally telling me the issue, it is now fixed.

yutayu commented 3 years ago

Thank you for fixing , DISKSIZE is correct.

next is disk number. zram-config made 1 zram. It should be 2 zrams.

yutayu commented 3 years ago

Second case at ztab swap lzo-rle 400M 1600M 75 0 80 dir lzo-rle 50M 200M /home/pi /pi.bind log lzo-rle 12M 48M /var/log /log.bind /opt/zram/oldlog

at zramctl NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT /dev/zram1 lzo-rle 48M 4.3M 32.6K 264K 4 /opt/zram/zram1 /dev/zram0 lzo-rle 1.6G 4K 87B 12K 4 [SWAP]

it should be 3 zrams.

yutayu commented 3 years ago

zram.txt journalctl -xe | grep zram-config > zram.txt

ecdye commented 3 years ago

Not helpful, please provide the logs located at /usr/local/share/zram-config/log/zram-config.log

yutayu commented 3 years ago

zram-config.log

ecdye commented 3 years ago

Thank you, you appear to only have the log and swap options enabled.

Please give the output of running the following:

cat /etc/ztab
yutayu commented 3 years ago

zram2.txt

ecdye commented 3 years ago

My best guess is you might be using more RAM then you have as I have no issues with creating all the devices on my side. This is not an issue with the code and as such I am not willing to debug it any further.

yutayu commented 3 years ago

ok