i’m moving over from here:
started with openhabian-pi-raspios32-202008040929-git5b513cb-crcd22e9bfb.img.xz
installed mapdb persistence binding with
* : strategy = everyChange,restoreOnStartup
created 7 test items
ztamctl before and after every reboot gave this output:
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram2 lzo 500M 24.8M 69.5K 332K 4 /opt/zram/zram2
/dev/zram1 lzo 500M 16.5M 17K 176K 4 /opt/zram/zram1
/dev/zram0 lzo 600M 4K 89B 12K 4 [SWAP]
after first reboot(1) the test items were restored correctly. i switched some of these items and made another reboot(2)… well, the items are restored with the same state from the first reboot(1) > not correctly.
[10:31:33] root@openhab:/home/openhabian# systemctl status zram-config
â—Ź zram-config.service - zram-config
Loaded: loaded (/etc/systemd/system/zram-config.service; enabled; vendor preset: enabled)
Active: active (exited) since Fri 2020-08-07 10:29:13 BST; 2min 34s ago
Process: 345 ExecStartPre=/bin/rm -f /usr/local/share/zram-config/zram-device-list /usr/local/share/zram-config/zram-d
Process: 363 ExecStart=/usr/local/bin/zram-config start (code=exited, status=0/SUCCESS)
Main PID: 363 (code=exited, status=0/SUCCESS)
Aug 07 10:29:13 openhab zram-config[363]: + chmod 755 /opt/zram/zram2/upper /opt/zram/zram2/workdir /var/log
Aug 07 10:29:13 openhab zram-config[363]: + echo 'log /zram2 /var/log /log.
Aug 07 10:29:13 openhab zram-config[363]: + invoke-rc.d rsyslog start
Aug 07 10:29:13 openhab zram-config[363]: + invoke-rc.d nginx start
Aug 07 10:29:13 openhab zram-config[363]: + journalctl --flush
Aug 07 10:29:13 openhab zram-config[363]: + '[' '!' -z '' ']'
Aug 07 10:29:13 openhab zram-config[363]: + echo 'createZlog no oldlog dir in ztab'
Aug 07 10:29:13 openhab zram-config[363]: + read -r line
Aug 07 10:29:13 openhab zram-config[363]: + '[' false = true ']'
Aug 07 10:29:13 openhab systemd[1]: Started zram-config.
changed the items to the same value as on reboot(2), made another reboot(3), and suddenly items were restored with value from reboot(2)=reboot(3).
another test:
different values, reboot(4) > restored values from reboot(1)
another reboot(5) without changing items > still restored reboot(1) values
seems i “lost” zram during these reboots:
[10:53:21] root@openhab:/home/openhabian# zramctl
[10:53:27] root@openhab:/home/openhabian# systemctl status zram-config
â—Ź zram-config.service - zram-config
Loaded: loaded (/etc/systemd/system/zram-config.service; enabled; vendor preset: enabled)
Active: inactive (dead)
after another reboot it’s there again:
[10:59:51] root@openhab:/home/openhabian# zramctl
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram2 lzo 500M 24.8M 74.3K 408K 4 /opt/zram/zram2
/dev/zram1 lzo 500M 16.5M 17K 184K 4 /opt/zram/zram1
/dev/zram0 lzo 600M 4K 89B 12K 4 [SWAP]
[10:59:54] root@openhab:/home/openhabian# systemctl status zram-config
â—Ź zram-config.service - zram-config
Loaded: loaded (/etc/systemd/system/zram-config.service; enabled; vendor preset: enabled)
Active: active (exited) since Fri 2020-08-07 10:56:03 BST; 4min 0s ago
Process: 245 ExecStartPre=/bin/rm -f /usr/local/share/zram-config/zram-device-list /usr/local/share/zram-config/zram-d
Process: 271 ExecStart=/usr/local/bin/zram-config start (code=exited, status=0/SUCCESS)
Main PID: 271 (code=exited, status=0/SUCCESS)
Aug 07 10:56:03 openhab zram-config[271]: + chmod 755 /opt/zram/zram2/upper /opt/zram/zram2/workdir /var/log
Aug 07 10:56:03 openhab zram-config[271]: + echo 'log /zram2 /var/log /log.
Aug 07 10:56:03 openhab zram-config[271]: + invoke-rc.d rsyslog start
Aug 07 10:56:03 openhab zram-config[271]: + invoke-rc.d nginx start
Aug 07 10:56:03 openhab zram-config[271]: + journalctl --flush
Aug 07 10:56:03 openhab zram-config[271]: + '[' '!' -z '' ']'
Aug 07 10:56:03 openhab zram-config[271]: + echo 'createZlog no oldlog dir in ztab'
Aug 07 10:56:03 openhab zram-config[271]: + read -r line
Aug 07 10:56:03 openhab zram-config[271]: + '[' false = true ']'
Aug 07 10:56:03 openhab systemd[1]: Started zram-config.
was still active on the next 2 reboots,
but items are still restored with wrong values.
with ~10 reboots values were twice restored with correct values and 8 times with wrong values.
i swear i didn’t do anything else except:
- install mapdb binding
- create test.items
- create mapdb.persist and
* : strategy = everyChange,restoreOnStartup
mutliple times 4-6:
4. change item values via habpanel
5. reboot
6. check restored value