Mapdb: no restore at startup for item status

So there’s a problem deep inside with the software tools ZRAM is based on that I cannot fix myself, but I’ve created a solution to hopefully work around that.

Flash your test system again (alpha image) to get the updated software installed
Edit /boot/openhabian.conf while the SD is still in your Windows box as explained here.
Set debugmode=maximum and clonebranch=master before you install.

EDIT: cross-check /usr/local/bin/zramsync and /etc/systemd/system/zram-config.service against the repo at https://github.com/mstormi/openhabian-zram to make sure they’re up to date (and eventually replace your local copy)

1 Like

i downloaded Release v1.6-alpha · openhab/openhabian · GitHub again

debug*mode*=maximum

now installing (wired)

mhm, i did not reboot after setup, and for now the service file seems ok, but zramsync doesn’t exist:

[13:54:34] root@openhab:/home/openhabian# diff zram-config.service /etc/systemd/system/zram-config.service
[13:55:00] root@openhab:/home/openhabian# diff zramsync /usr/local/bin/zramsync
diff: /usr/local/bin/zramsync: No such file or directory

it’s in /usr/local/sbin now

that directory exists, but it’s empty:

[13:57:11] root@openhab:/home/openhabian# cat /usr/local/sbin/zramsync
cat: /usr/local/sbin/zramsync: No such file or directory

[14:42:48] root@openhab:/usr/local/sbin# ls
[14:42:49] root@openhab:/usr/local/sbin#

it shouldn’t if you installed the very latest openhabian-zram.
Check .service file where it points to (bin or sbin)
Move or copy both, zram-config and zramsync, to /usr/local/sbin/

what can i say?
i used the image 1.6alpha (link from above), and didn’t install anything else.

here’s zram-config.service, it points to sbin:

[Service]
Type=oneshot
ExecStartPre=-/bin/rm -f /usr/local/share/zram-config/zram-device-list /usr/local/share/zram-config/zram-device-list.rev
ExecStartPre=-/usr/local/sbin/zramsync recover "/storage/zram"
ExecStartPost=-/usr/local/sbin/zramsync recover "/storage/zram"
ExecStart=-/usr/local/sbin/zram-config start
ExecStop=-/usr/local/sbin/zramsync sync "/storage/zram"
ExecStopPost=-/usr/local/sbin/zram-config stop
TimeoutSec=300
RemainAfterExit=yes

ok, copied both files to …/sbin
(zramsync from github and zram-config from …/bin)

total 16
-rwxr-xr-x 1 root root 11530 Aug 15 15:51 zram-config
-rwxr-xr-x 1 root root  1090 Aug 15 15:52 zramsync

now what? :slight_smile:

test?

alright! after first reboot:

[16:29:06] root@openhab:/home/openhabian# zramctl
NAME       ALGORITHM DISKSIZE  DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram2 lzo-rle       500M 24.8M 71.1K  416K       4 /opt/zram/zram2
/dev/zram1 lzo-rle       500M 16.4M  7.1K   88K       4 /opt/zram/zram1
/dev/zram0 lzo-rle       600M    4K   87B   12K       4 [SWAP]
[16:29:16] root@openhab:/home/openhabian# systemctl status zram-config.service
● zram-config.service - zram-config
   Loaded: loaded (/etc/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sat 2020-08-15 16:28:19 CEST; 1min 6s ago
  Process: 219 ExecStartPre=/bin/rm -f /usr/local/share/zram-config/zram-device-list /usr/local/share/zram-config/zram-d
  Process: 237 ExecStartPre=/usr/local/sbin/zramsync recover /storage/zram (code=exited, status=0/SUCCESS)
  Process: 274 ExecStart=/usr/local/sbin/zram-config start (code=exited, status=0/SUCCESS)
  Process: 546 ExecStartPost=/usr/local/sbin/zramsync recover /storage/zram (code=exited, status=0/SUCCESS)
 Main PID: 274 (code=exited, status=0/SUCCESS)

Aug 15 16:28:19 openhab zramsync[546]: + echo 'zramsync recovery recover starting @ Sat 15 Aug 16:28:19 CEST 2020'
Aug 15 16:28:19 openhab zramsync[546]: zramsync recovery recover starting @ Sat 15 Aug 16:28:19 CEST 2020
Aug 15 16:28:19 openhab zramsync[546]: + rsync -avrh /storage/zram/ /
Aug 15 16:28:19 openhab zramsync[546]: sending incremental file list
Aug 15 16:28:19 openhab zramsync[546]: zramsync.log
Aug 15 16:28:19 openhab zramsync[546]: var/lib/openhab2/persistence/
Aug 15 16:28:19 openhab zramsync[546]: sent 742 bytes  received 49 bytes  1.58K bytes/sec
Aug 15 16:28:19 openhab zramsync[546]: total size is 434  speedup is 0.55
Aug 15 16:28:19 openhab zramsync[546]: + exit 0
Aug 15 16:28:19 openhab systemd[1]: Started zram-config.
[16:29:27] root@openhab:/home/openhabian# date > /var/lib/openhab2/persistence/date
[16:29:30] root@openhab:/home/openhabian# cat /var/lib/openhab2/persistence/date
Sat 15 Aug 16:29:30 CEST 2020

REBOOT, file didn’t survive:

[16:34:49] root@openhab:/home/openhabian# zramctl
NAME       ALGORITHM DISKSIZE  DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram2 lzo-rle       500M 24.8M   66K  440K       4 /opt/zram/zram2
/dev/zram1 lzo-rle       500M 16.4M  7.1K   88K       4 /opt/zram/zram1
/dev/zram0 lzo-rle       600M    4K   87B   12K       4 [SWAP]
[16:34:54] root@openhab:/home/openhabian# systemctl status zram-config.service
● zram-config.service - zram-config
   Loaded: loaded (/etc/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sat 2020-08-15 16:31:06 CEST; 3min 55s ago
  Process: 222 ExecStartPre=/bin/rm -f /usr/local/share/zram-config/zram-device-list /usr/local/share/zram-config/zram-d
  Process: 250 ExecStartPre=/usr/local/sbin/zramsync recover /storage/zram (code=exited, status=0/SUCCESS)
  Process: 294 ExecStart=/usr/local/sbin/zram-config start (code=exited, status=0/SUCCESS)
  Process: 563 ExecStartPost=/usr/local/sbin/zramsync recover /storage/zram (code=exited, status=0/SUCCESS)
 Main PID: 294 (code=exited, status=0/SUCCESS)

Aug 15 16:31:06 openhab zramsync[563]: + echo 'zramsync recovery recover starting @ Sat 15 Aug 16:31:06 CEST 2020'
Aug 15 16:31:06 openhab zramsync[563]: zramsync recovery recover starting @ Sat 15 Aug 16:31:06 CEST 2020
Aug 15 16:31:06 openhab zramsync[563]: + rsync -avrh /storage/zram/ /
Aug 15 16:31:06 openhab zramsync[563]: sending incremental file list
Aug 15 16:31:06 openhab zramsync[563]: zramsync.log
Aug 15 16:31:06 openhab zramsync[563]: var/lib/openhab2/persistence/
Aug 15 16:31:06 openhab zramsync[563]: sent 1.08K bytes  received 49 bytes  2.26K bytes/sec
Aug 15 16:31:06 openhab zramsync[563]: total size is 773  speedup is 0.68
Aug 15 16:31:06 openhab zramsync[563]: + exit 0
Aug 15 16:31:06 openhab systemd[1]: Started zram-config.
[16:35:03] root@openhab:/home/openhabian# cat /var/lib/openhab2/persistence/date
cat: /var/lib/openhab2/persistence/date: No such file or directory

try again and use journalctl -xu zram-config.service --no-pager to see what it does on start but more important on stop (at reboot). You should see a rsync line. See if the file(s) get stored under /storage/zram/<original path>.

before reboot:

[16:37:10] root@openhab:/home/openhabian# date > /var/lib/openhab2/persistence/date
[18:24:26] root@openhab:/home/openhabian# cat /var/lib/openhab2/persistence/date
Sat 15 Aug 18:24:26 CEST 2020
[18:25:00] root@openhab:/home/openhabian# cat /storage/zram/var/lib/openhab2/persistence/date
cat: /storage/zram/var/lib/openhab2/persistence/date: No such file or directory

reboot
here’s journalctl with 3 rsync lines:

-- The job identifier is 107.
Aug 15 18:27:16 openhab systemd[1]: Stopping zram-config...
-- Subject: A stop job for unit zram-config.service has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit zram-config.service has begun execution.
--
-- The job identifier is 690.
Aug 15 18:27:16 openhab zramsync[2903]: + STORAGE=/storage/zram
Aug 15 18:27:16 openhab zramsync[2903]: + LOG=/storage/zram/zramsync.log
Aug 15 18:27:16 openhab zramsync[2903]: + dir=/storage/zram
Aug 15 18:27:16 openhab zramsync[2903]: + [[ 2 -ne 2 ]]
Aug 15 18:27:16 openhab zramsync[2903]: + [[ ! -f /etc/ztab ]]
Aug 15 18:27:16 openhab zramsync[2903]: + [[ ! -d /storage/zram ]]
Aug 15 18:27:16 openhab zramsync[2903]: + tee -a /storage/zram/zramsync.log
Aug 15 18:27:16 openhab zramsync[2903]: ++ date
Aug 15 18:27:16 openhab zramsync[2903]: + echo 'zramsync sync @ Sat 15 Aug 18:27:16 CEST 2020'
Aug 15 18:27:16 openhab zramsync[2903]: zramsync sync @ Sat 15 Aug 18:27:16 CEST 2020
Aug 15 18:27:16 openhab zramsync[2903]: + [[ sync = \r\e\c\o\v\e\r ]]
Aug 15 18:27:16 openhab zramsync[2903]: + [[ sync != \s\y\n\c ]]
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + set -- swap lz4 200M 600M 75 0 90
Aug 15 18:27:16 openhab zramsync[2903]: + [[ swap = \d\i\r ]]
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + set -- dir lz4 150M 500M /var/lib/openhab2/persistence /persistence.bind
Aug 15 18:27:16 openhab zramsync[2903]: + [[ dir = \d\i\r ]]
Aug 15 18:27:16 openhab zramsync[2903]: + tee -a /storage/zram/zramsync.log
Aug 15 18:27:16 openhab zramsync[2903]: ++ date
Aug 15 18:27:16 openhab zramsync[2903]: + echo 'zramsync creating backup dir @ Sat 15 Aug 18:27:16 CEST 2020'
Aug 15 18:27:16 openhab zramsync[2903]: zramsync creating backup dir @ Sat 15 Aug 18:27:16 CEST 2020
Aug 15 18:27:16 openhab zramsync[2903]: + rsync -avRh /var/lib/openhab2/persistence /storage/zram
Aug 15 18:27:16 openhab zramsync[2903]: sending incremental file list
Aug 15 18:27:16 openhab zramsync[2903]: sent 304 bytes  received 23 bytes  654.00 bytes/sec
Aug 15 18:27:16 openhab zramsync[2903]: total size is 95  speedup is 0.29
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + continue
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zramsync[2903]: + case "$line" in
Aug 15 18:27:16 openhab zramsync[2903]: + set -- log lzo 150M 500M /var/log /log.bind
Aug 15 18:27:16 openhab zramsync[2903]: + [[ log = \d\i\r ]]
Aug 15 18:27:16 openhab zramsync[2903]: + read -r line
Aug 15 18:27:16 openhab zram-config[2926]: + ZSHARE=/usr/local/share/zram-config
Aug 15 18:27:16 openhab zram-config[2926]: + ZLOG=/usr/local/share/zram-config/log/zram-config.log
Aug 15 18:27:16 openhab zram-config[2926]: + ZDIR=/opt/zram
Aug 15 18:27:16 openhab zram-config[2926]: + [[ -f /boot/cmdline.txt ]]
Aug 15 18:27:16 openhab zram-config[2926]: + ZEPHEMERAL=false
Aug 15 18:27:16 openhab zram-config[2926]: + case "$1" in
Aug 15 18:27:16 openhab zram-config[2926]: ++ date +%Y-%m-%d-%H:%M:%S
Aug 15 18:27:16 openhab zram-config[2926]: + echo 'zram-config stop 2020-08-15-18:27:16'
Aug 15 18:27:16 openhab zram-config[2926]: + tac /usr/local/share/zram-config/zram-device-list
Aug 15 18:27:16 openhab zram-config[2926]: + file=/usr/local/share/zram-config/zram-device-list.rev
Aug 15 18:27:16 openhab zram-config[2926]: + read -r line
Aug 15 18:27:16 openhab zram-config[2926]: + case "$line" in
Aug 15 18:27:16 openhab zram-config[2926]: + set -- log /zram2 /var/log /log.bind
Aug 15 18:27:16 openhab zram-config[2926]: + echo 'ztab remove log /zram2 /var/log /log.bind'
Aug 15 18:27:16 openhab zram-config[2926]: + case "$1" in
Aug 15 18:27:16 openhab zram-config[2926]: + ZTYPE=log
Aug 15 18:27:16 openhab zram-config[2926]: + ZRAM_DEV=/zram2
Aug 15 18:27:16 openhab zram-config[2926]: + TARGET_DIR=/var/log
Aug 15 18:27:16 openhab zram-config[2926]: + BIND_DIR=/log.bind
Aug 15 18:27:16 openhab zram-config[2926]: + '[' false = false ']'
Aug 15 18:27:16 openhab zram-config[2926]: + removeZlog
Aug 15 18:27:16 openhab zram-config[2926]: + '[' '!' -z '' ']'
Aug 15 18:27:16 openhab zram-config[2926]: + echo /zram2
Aug 15 18:27:16 openhab zram-config[2926]: ++ echo /zram2
Aug 15 18:27:16 openhab zram-config[2926]: ++ tr -dc 0-9
Aug 15 18:27:16 openhab zram-config[2926]: + DEV_NUM=2
Aug 15 18:27:16 openhab zram-config[2926]: + '[' '!' -z /var/log ']'
Aug 15 18:27:16 openhab zram-config[2926]: + invoke-rc.d rsyslog stop
Aug 15 18:27:16 openhab zram-config[2926]: + invoke-rc.d nginx stop
Aug 15 18:27:16 openhab zram-config[2926]: + umount --verbose /var/log/
Aug 15 18:27:16 openhab zram-config[2926]: + sleep .1
Aug 15 18:27:17 openhab zram-config[2926]: + invoke-rc.d rsyslog stop
Aug 15 18:27:17 openhab zram-config[2926]: + invoke-rc.d nginx stop
Aug 15 18:27:17 openhab zram-config[2926]: + umount --verbose -l /var/log/
Aug 15 18:27:17 openhab zram-config[2926]: + mergeOverlay
Aug 15 18:27:17 openhab zram-config[2926]: + return 1
Aug 15 18:27:17 openhab zram-config[2926]: + read -r line
Aug 15 18:27:17 openhab zram-config[2926]: + case "$line" in
Aug 15 18:27:17 openhab zram-config[2926]: + set -- dir /zram1 /var/lib/openhab2/persistence /persistence.bind
Aug 15 18:27:17 openhab zram-config[2926]: + echo 'ztab remove dir /zram1 /var/lib/openhab2/persistence /persistence.bind'
Aug 15 18:27:17 openhab zram-config[2926]: + case "$1" in
Aug 15 18:27:17 openhab zram-config[2926]: + ZTYPE=dir
Aug 15 18:27:17 openhab zram-config[2926]: + ZRAM_DEV=/zram1
Aug 15 18:27:17 openhab zram-config[2926]: + TARGET_DIR=/var/lib/openhab2/persistence
Aug 15 18:27:17 openhab zram-config[2926]: + BIND_DIR=/persistence.bind
Aug 15 18:27:17 openhab zram-config[2926]: + '[' false = false ']'
Aug 15 18:27:17 openhab zram-config[2926]: + removeZdir
Aug 15 18:27:17 openhab zram-config[2926]: + echo /zram1
Aug 15 18:27:17 openhab zram-config[2926]: ++ echo /zram1
Aug 15 18:27:17 openhab zram-config[2926]: ++ tr -dc 0-9
Aug 15 18:27:17 openhab zram-config[2926]: + DEV_NUM=1
Aug 15 18:27:17 openhab zram-config[2926]: + '[' '!' -z /var/lib/openhab2/persistence ']'
Aug 15 18:27:17 openhab zram-config[2926]: + umount --verbose /var/lib/openhab2/persistence/
Aug 15 18:27:17 openhab zram-config[2926]: + sleep .1
Aug 15 18:27:17 openhab zram-config[2926]: + umount --verbose -l /var/lib/openhab2/persistence/
Aug 15 18:27:17 openhab zram-config[2926]: + return 1
Aug 15 18:27:17 openhab zram-config[2926]: + read -r line
Aug 15 18:27:17 openhab zram-config[2926]: + case "$line" in
Aug 15 18:27:17 openhab zram-config[2926]: + set -- swap /zram0 zram-config0
Aug 15 18:27:17 openhab zram-config[2926]: + echo 'ztab remove swap /zram0 zram-config0 '
Aug 15 18:27:17 openhab zram-config[2926]: + case "$1" in
Aug 15 18:27:17 openhab zram-config[2926]: + ZTYPE=swap
Aug 15 18:27:17 openhab zram-config[2926]: + ZRAM_DEV=/zram0
Aug 15 18:27:17 openhab zram-config[2926]: + LABEL=zram-config0
Aug 15 18:27:17 openhab zram-config[2926]: + removeZswap
Aug 15 18:27:17 openhab zram-config[2926]: ++ echo /zram0
Aug 15 18:27:17 openhab zram-config[2926]: ++ tr -dc 0-9
Aug 15 18:27:17 openhab zram-config[2926]: + DEV_NUM=0
Aug 15 18:27:17 openhab zram-config[2926]: + swapoff /dev/zram0
Aug 15 18:27:17 openhab zram-config[2926]: + echo 0
Aug 15 18:27:17 openhab zram-config[2926]: + /sbin/zramctl -r /dev/zram0
Aug 15 18:27:17 openhab zram-config[2926]: + echo '/dev/zram0 removed'
Aug 15 18:27:17 openhab zram-config[2926]: + read -r line
Aug 15 18:27:17 openhab zram-config[2926]: + rm -fv /usr/local/share/zram-config/zram-device-list.rev /usr/local/share/zram-config/zram-device-list
Aug 15 18:27:17 openhab systemd[1]: zram-config.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit zram-config.service has successfully entered the 'dead' state.
Aug 15 18:27:17 openhab systemd[1]: Stopped zram-config.
-- Subject: A stop job for unit zram-config.service has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit zram-config.service has finished.
--
-- The job identifier is 690 and the job result is done.
-- Reboot --
Aug 15 18:27:18 openhab systemd[1]: Starting zram-config...
-- Subject: A start job for unit zram-config.service has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit zram-config.service has begun execution.
--
-- The job identifier is 71.
Aug 15 18:27:18 openhab zramsync[258]: + STORAGE=/storage/zram
Aug 15 18:27:18 openhab zramsync[258]: + LOG=/storage/zram/zramsync.log
Aug 15 18:27:18 openhab zramsync[258]: + dir=/storage/zram
Aug 15 18:27:18 openhab zramsync[258]: + [[ 2 -ne 2 ]]
Aug 15 18:27:18 openhab zramsync[258]: + [[ ! -f /etc/ztab ]]
Aug 15 18:27:18 openhab zramsync[258]: + [[ ! -d /storage/zram ]]
Aug 15 18:27:18 openhab zramsync[258]: + tee -a /storage/zram/zramsync.log
Aug 15 18:27:18 openhab zramsync[258]: ++ date
Aug 15 18:27:18 openhab zramsync[258]: + echo 'zramsync recover @ Sat 15 Aug 18:27:18 CEST 2020'
Aug 15 18:27:18 openhab zramsync[258]: zramsync recover @ Sat 15 Aug 18:27:18 CEST 2020
Aug 15 18:27:18 openhab zramsync[258]: + [[ recover = \r\e\c\o\v\e\r ]]
Aug 15 18:27:18 openhab zramsync[258]: + [[ -d /storage/zram/var ]]
Aug 15 18:27:18 openhab zramsync[258]: + tee -a /storage/zram/zramsync.log
Aug 15 18:27:18 openhab zramsync[258]: ++ date
Aug 15 18:27:18 openhab zramsync[258]: + echo 'zramsync recovery recover starting @ Sat 15 Aug 18:27:18 CEST 2020'
Aug 15 18:27:18 openhab zramsync[258]: zramsync recovery recover starting @ Sat 15 Aug 18:27:18 CEST 2020
Aug 15 18:27:18 openhab zramsync[258]: + rsync -avrh /storage/zram/ /
Aug 15 18:27:18 openhab zramsync[258]: sending incremental file list
Aug 15 18:27:18 openhab zramsync[258]: zramsync.log
Aug 15 18:27:18 openhab zramsync[258]: sent 1.30K bytes  received 42 bytes  2.68K bytes/sec
Aug 15 18:27:18 openhab zramsync[258]: total size is 996  speedup is 0.74
Aug 15 18:27:18 openhab zramsync[258]: + exit 0
Aug 15 18:27:18 openhab zram-config[300]: + ZSHARE=/usr/local/share/zram-config
Aug 15 18:27:18 openhab zram-config[300]: + ZLOG=/usr/local/share/zram-config/log/zram-config.log
Aug 15 18:27:18 openhab zram-config[300]: + ZDIR=/opt/zram
Aug 15 18:27:18 openhab zram-config[300]: + [[ -f /boot/cmdline.txt ]]
Aug 15 18:27:18 openhab zram-config[300]: + ZEPHEMERAL=false
Aug 15 18:27:18 openhab zram-config[300]: + case "$1" in
Aug 15 18:27:18 openhab zram-config[300]: ++ date +%Y-%m-%d-%H:%M:%S
Aug 15 18:27:18 openhab zram-config[300]: + echo 'zram-config start 2020-08-15-18:27:18'
Aug 15 18:27:18 openhab zram-config[300]: + rm -f /usr/local/share/zram-config/zram-device-list.new
Aug 15 18:27:18 openhab zram-config[300]: + file=/etc/ztab
Aug 15 18:27:18 openhab zram-config[300]: + ZTAB_EMPTY=true
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + continue
Aug 15 18:27:18 openhab zram-config[300]: + read -r line
Aug 15 18:27:18 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:18 openhab zram-config[300]: + set -- swap lz4 200M 600M 75 0 90
Aug 15 18:27:18 openhab zram-config[300]: + echo 'ztab create swap lz4 200M 600M 75 0 90  '
Aug 15 18:27:18 openhab zram-config[300]: + ZTAB_EMPTY=false
Aug 15 18:27:18 openhab zram-config[300]: + ZTYPE=swap
Aug 15 18:27:18 openhab zram-config[300]: + ALG=lz4
Aug 15 18:27:18 openhab zram-config[300]: + MEM_SIZE=200M
Aug 15 18:27:18 openhab zram-config[300]: + DISK_SIZE=600M
Aug 15 18:27:18 openhab zram-config[300]: + '[' -f /usr/local/share/zram-config/zram-device-list ']'
Aug 15 18:27:18 openhab zram-config[300]: + test -f /usr/local/share/zram-config/zram-device-list.new
Aug 15 18:27:18 openhab zram-config[300]: + case "$1" in
Aug 15 18:27:18 openhab zram-config[300]: + PRIORITY=75
Aug 15 18:27:18 openhab zram-config[300]: + PAGE_CLUSTER=0
Aug 15 18:27:18 openhab zram-config[300]: + SWAPPINESS=90
Aug 15 18:27:18 openhab zram-config[300]: + createZswap
Aug 15 18:27:18 openhab zram-config[300]: + createZdevice
Aug 15 18:27:18 openhab zram-config[300]: + '[' '!' -d /sys/class/zram-control ']'
Aug 15 18:27:18 openhab zram-config[300]: + modprobe --verbose zram
Aug 15 18:27:18 openhab zram-config[300]: + RAM_DEV=0
Aug 15 18:27:18 openhab zram-config[300]: + '[' '!' -z 200M ']'
Aug 15 18:27:18 openhab zram-config[300]: + echo 200M
Aug 15 18:27:18 openhab zram-config[300]: + '[' '!' -z 600M ']'
Aug 15 18:27:18 openhab zram-config[300]: + echo 600M
Aug 15 18:27:18 openhab zram-config[300]: + '[' '!' -z lz4 ']'
Aug 15 18:27:18 openhab zram-config[300]: + echo lz4
Aug 15 18:27:19 openhab zram-config[300]: + echo 'zram0 created comp_algorithm=lz4 mem_limit=200M disksize=600M'
Aug 15 18:27:19 openhab zram-config[300]: + mkswap --label zram-config0 /dev/zram0
Aug 15 18:27:19 openhab zram-config[300]: + '[' '!' -z 75 ']'
Aug 15 18:27:19 openhab zram-config[300]: + swapon -v -p 75 /dev/zram0
Aug 15 18:27:19 openhab zram-config[300]: + '[' '!' -z 0 ']'
Aug 15 18:27:19 openhab zram-config[300]: + sysctl vm.page-cluster=0
Aug 15 18:27:19 openhab zram-config[300]: + '[' '!' -z 90 ']'
Aug 15 18:27:19 openhab zram-config[300]: + sysctl vm.swappiness=90
Aug 15 18:27:19 openhab zram-config[300]: + echo 'swap                /zram0                zram-config0'
Aug 15 18:27:19 openhab zram-config[300]: + read -r line
Aug 15 18:27:19 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:19 openhab zram-config[300]: + continue
Aug 15 18:27:19 openhab zram-config[300]: + read -r line
Aug 15 18:27:19 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:19 openhab zram-config[300]: + continue
Aug 15 18:27:19 openhab zram-config[300]: + read -r line
Aug 15 18:27:19 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:19 openhab zram-config[300]: + set -- dir lz4 150M 500M /var/lib/openhab2/persistence /persistence.bind
Aug 15 18:27:19 openhab zram-config[300]: + echo 'ztab create dir lz4 150M 500M /var/lib/openhab2/persistence /persistence.bind   '
Aug 15 18:27:19 openhab zram-config[300]: + ZTAB_EMPTY=false
Aug 15 18:27:19 openhab zram-config[300]: + ZTYPE=dir
Aug 15 18:27:19 openhab zram-config[300]: + ALG=lz4
Aug 15 18:27:19 openhab zram-config[300]: + MEM_SIZE=150M
Aug 15 18:27:19 openhab zram-config[300]: + DISK_SIZE=500M
Aug 15 18:27:19 openhab zram-config[300]: + '[' -f /usr/local/share/zram-config/zram-device-list ']'
Aug 15 18:27:19 openhab zram-config[300]: + '[' dir = swap ']'
Aug 15 18:27:19 openhab zram-config[300]: ++ egrep 'dir.*/var/lib/openhab2/persistence' /usr/local/share/zram-config/zram-device-list
Aug 15 18:27:19 openhab zram-config[300]: + entry=
Aug 15 18:27:19 openhab zram-config[300]: + '[' -n '' ']'
Aug 15 18:27:19 openhab zram-config[300]: + test -f /usr/local/share/zram-config/zram-device-list.new
Aug 15 18:27:19 openhab zram-config[300]: + case "$1" in
Aug 15 18:27:19 openhab zram-config[300]: + TARGET_DIR=/var/lib/openhab2/persistence
Aug 15 18:27:19 openhab zram-config[300]: + BIND_DIR=/persistence.bind
Aug 15 18:27:19 openhab zram-config[300]: + '[' false = false ']'
Aug 15 18:27:19 openhab zram-config[300]: + createZdir
Aug 15 18:27:19 openhab zram-config[300]: + '[' '!' -z /persistence.bind ']'
Aug 15 18:27:19 openhab zram-config[300]: + mkdir -p /opt/zram/persistence.bind
Aug 15 18:27:19 openhab zram-config[300]: + '[' '!' -z /var/lib/openhab2/persistence ']'
Aug 15 18:27:19 openhab zram-config[300]: ++ stat -c %a /var/lib/openhab2/persistence
Aug 15 18:27:19 openhab zram-config[300]: + dirPerm=775
Aug 15 18:27:19 openhab zram-config[300]: ++ stat -c %u /var/lib/openhab2/persistence
Aug 15 18:27:19 openhab zram-config[300]: + dirUser=110
Aug 15 18:27:19 openhab zram-config[300]: ++ stat -c %g /var/lib/openhab2/persistence
Aug 15 18:27:19 openhab zram-config[300]: + dirGroup=115
Aug 15 18:27:19 openhab zram-config[300]: + echo 'dirPerm /var/lib/openhab2/persistence 775 110:115'
Aug 15 18:27:19 openhab zram-config[300]: + mount --verbose --bind /var/lib/openhab2/persistence/ /opt/zram/persistence.bind/
Aug 15 18:27:19 openhab zram-config[300]: + mount --verbose --make-private /opt/zram/persistence.bind/
Aug 15 18:27:19 openhab zram-config[300]: ++ awk -v a=/opt/zram/persistence.bind '$2 == a {print $4}' /proc/mounts
Aug 15 18:27:19 openhab zram-config[300]: ++ head -1
Aug 15 18:27:19 openhab zram-config[300]: + dirMountOpt=rw,noatime
Aug 15 18:27:19 openhab zram-config[300]: ++ awk -v a=/opt/zram/persistence.bind '$2 == a {print $3}' /proc/mounts
Aug 15 18:27:19 openhab zram-config[300]: ++ head -1
Aug 15 18:27:19 openhab zram-config[300]: + dirFsType=ext4
Aug 15 18:27:19 openhab zram-config[300]: + echo 'dirMountOpt rw,noatime dirFsType ' ext4
Aug 15 18:27:19 openhab zram-config[300]: + createZdevice
Aug 15 18:27:19 openhab zram-config[300]: + '[' '!' -d /sys/class/zram-control ']'
Aug 15 18:27:19 openhab zram-config[300]: ++ cat /sys/class/zram-control/hot_add
Aug 15 18:27:19 openhab zram-config[300]: + RAM_DEV=1
Aug 15 18:27:19 openhab zram-config[300]: + '[' '!' -z 150M ']'
Aug 15 18:27:19 openhab zram-config[300]: + echo 150M
Aug 15 18:27:19 openhab zram-config[300]: + '[' '!' -z 500M ']'
Aug 15 18:27:19 openhab zram-config[300]: + echo 500M
Aug 15 18:27:19 openhab zram-config[300]: + '[' '!' -z lz4 ']'
Aug 15 18:27:19 openhab zram-config[300]: + echo lz4
Aug 15 18:27:19 openhab zram-config[300]: + echo 'zram1 created comp_algorithm=lz4 mem_limit=150M disksize=500M'
Aug 15 18:27:19 openhab zram-config[300]: + mke2fs -v -t ext4 /dev/zram1
Aug 15 18:27:19 openhab zram-config[300]: + mkdir -p /opt/zram/zram1
Aug 15 18:27:20 openhab zram-config[300]: + mount --verbose --types ext4 -o rw,noatime /dev/zram1 /opt/zram/zram1/
Aug 15 18:27:20 openhab zram-config[300]: + mkdir -p /opt/zram/zram1/upper /opt/zram/zram1/workdir /var/lib/openhab2/persistence
Aug 15 18:27:20 openhab zram-config[300]: + mount --verbose --types overlay -o redirect_dir=on,lowerdir=/opt/zram/persistence.bind,upperdir=/opt/zram/zram1/upper,workdir=/opt/zram/zram1/workdir overlay1 /var/lib/openhab2/persistence
Aug 15 18:27:20 openhab zram-config[300]: + chown 110:115 /opt/zram/zram1/upper /opt/zram/zram1/workdir /var/lib/openhab2/persistence
Aug 15 18:27:20 openhab zram-config[300]: + chmod 775 /opt/zram/zram1/upper /opt/zram/zram1/workdir /var/lib/openhab2/persistence
Aug 15 18:27:20 openhab zram-config[300]: + echo 'dir                /zram1                /var/lib/openhab2/persistence                /persistence.bind'
Aug 15 18:27:20 openhab zram-config[300]: + read -r line
Aug 15 18:27:20 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:20 openhab zram-config[300]: + continue
Aug 15 18:27:20 openhab zram-config[300]: + read -r line
Aug 15 18:27:20 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:20 openhab zram-config[300]: + continue
Aug 15 18:27:20 openhab zram-config[300]: + read -r line
Aug 15 18:27:20 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:20 openhab zram-config[300]: + continue
Aug 15 18:27:20 openhab zram-config[300]: + read -r line
Aug 15 18:27:20 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:20 openhab zram-config[300]: + continue
Aug 15 18:27:20 openhab zram-config[300]: + read -r line
Aug 15 18:27:20 openhab zram-config[300]: + case "$line" in
Aug 15 18:27:20 openhab zram-config[300]: + set -- log lzo 150M 500M /var/log /log.bind
Aug 15 18:27:20 openhab zram-config[300]: + echo 'ztab create log lzo 150M 500M /var/log /log.bind   '
Aug 15 18:27:20 openhab zram-config[300]: + ZTAB_EMPTY=false
Aug 15 18:27:20 openhab zram-config[300]: + ZTYPE=log
Aug 15 18:27:20 openhab zram-config[300]: + ALG=lzo
Aug 15 18:27:20 openhab zram-config[300]: + MEM_SIZE=150M
Aug 15 18:27:20 openhab zram-config[300]: + DISK_SIZE=500M
Aug 15 18:27:20 openhab zram-config[300]: + '[' -f /usr/local/share/zram-config/zram-device-list ']'
Aug 15 18:27:20 openhab zram-config[300]: + '[' log = swap ']'
Aug 15 18:27:20 openhab zram-config[300]: ++ egrep 'log.*/var/log' /usr/local/share/zram-config/zram-device-list
Aug 15 18:27:20 openhab zram-config[300]: + entry=
Aug 15 18:27:20 openhab zram-config[300]: + '[' -n '' ']'
Aug 15 18:27:20 openhab zram-config[300]: + test -f /usr/local/share/zram-config/zram-device-list.new
Aug 15 18:27:20 openhab zram-config[300]: + case "$1" in
Aug 15 18:27:20 openhab zram-config[300]: + TARGET_DIR=/var/log
Aug 15 18:27:20 openhab zram-config[300]: + BIND_DIR=/log.bind
Aug 15 18:27:20 openhab zram-config[300]: + OLDLOG_DIR=
Aug 15 18:27:20 openhab zram-config[300]: + '[' false = false ']'
Aug 15 18:27:20 openhab zram-config[300]: + createZlog
Aug 15 18:27:20 openhab zram-config[300]: + invoke-rc.d rsyslog stop
Aug 15 18:27:20 openhab zram-config[300]: + invoke-rc.d nginx stop
Aug 15 18:27:20 openhab zram-config[300]: + createZdir
Aug 15 18:27:20 openhab zram-config[300]: + '[' '!' -z /log.bind ']'
Aug 15 18:27:20 openhab zram-config[300]: + mkdir -p /opt/zram/log.bind
Aug 15 18:27:20 openhab zram-config[300]: + '[' '!' -z /var/log ']'
Aug 15 18:27:20 openhab zram-config[300]: ++ stat -c %a /var/log
Aug 15 18:27:20 openhab zram-config[300]: + dirPerm=755
Aug 15 18:27:20 openhab zram-config[300]: ++ stat -c %u /var/log
Aug 15 18:27:20 openhab zram-config[300]: + dirUser=0
Aug 15 18:27:20 openhab zram-config[300]: ++ stat -c %g /var/log
Aug 15 18:27:20 openhab zram-config[300]: + dirGroup=0
Aug 15 18:27:20 openhab zram-config[300]: + echo 'dirPerm /var/log 755 0:0'
Aug 15 18:27:20 openhab zram-config[300]: + mount --verbose --bind /var/log/ /opt/zram/log.bind/
Aug 15 18:27:20 openhab zram-config[300]: + mount --verbose --make-private /opt/zram/log.bind/
Aug 15 18:27:20 openhab zram-config[300]: ++ awk -v a=/opt/zram/log.bind '$2 == a {print $4}' /proc/mounts
Aug 15 18:27:20 openhab zram-config[300]: ++ head -1
Aug 15 18:27:20 openhab zram-config[300]: + dirMountOpt=rw,noatime
Aug 15 18:27:20 openhab zram-config[300]: ++ awk -v a=/opt/zram/log.bind '$2 == a {print $3}' /proc/mounts
Aug 15 18:27:20 openhab zram-config[300]: ++ head -1
Aug 15 18:27:20 openhab zram-config[300]: + dirFsType=ext4
Aug 15 18:27:20 openhab zram-config[300]: + echo 'dirMountOpt rw,noatime dirFsType ' ext4
Aug 15 18:27:20 openhab zram-config[300]: + createZdevice
Aug 15 18:27:20 openhab zram-config[300]: + '[' '!' -d /sys/class/zram-control ']'
Aug 15 18:27:20 openhab zram-config[300]: ++ cat /sys/class/zram-control/hot_add
Aug 15 18:27:20 openhab zram-config[300]: + RAM_DEV=2
Aug 15 18:27:20 openhab zram-config[300]: + '[' '!' -z 150M ']'
Aug 15 18:27:20 openhab zram-config[300]: + echo 150M
Aug 15 18:27:20 openhab zram-config[300]: + '[' '!' -z 500M ']'
Aug 15 18:27:20 openhab zram-config[300]: + echo 500M
Aug 15 18:27:20 openhab zram-config[300]: + '[' '!' -z lzo ']'
Aug 15 18:27:20 openhab zram-config[300]: + echo lzo
Aug 15 18:27:20 openhab zram-config[300]: + echo 'zram2 created comp_algorithm=lzo mem_limit=150M disksize=500M'
Aug 15 18:27:20 openhab zram-config[300]: + mke2fs -v -t ext4 /dev/zram2
Aug 15 18:27:21 openhab zram-config[300]: + mkdir -p /opt/zram/zram2
Aug 15 18:27:21 openhab zram-config[300]: + mount --verbose --types ext4 -o rw,noatime /dev/zram2 /opt/zram/zram2/
Aug 15 18:27:21 openhab zram-config[300]: + mkdir -p /opt/zram/zram2/upper /opt/zram/zram2/workdir /var/log
Aug 15 18:27:21 openhab zram-config[300]: + mount --verbose --types overlay -o redirect_dir=on,lowerdir=/opt/zram/log.bind,upperdir=/opt/zram/zram2/upper,workdir=/opt/zram/zram2/workdir overlay2 /var/log
Aug 15 18:27:21 openhab zram-config[300]: + chown 0:0 /opt/zram/zram2/upper /opt/zram/zram2/workdir /var/log
Aug 15 18:27:21 openhab zram-config[300]: + chmod 755 /opt/zram/zram2/upper /opt/zram/zram2/workdir /var/log
Aug 15 18:27:21 openhab zram-config[300]: + echo 'log                /zram2                /var/log                /log.bind'
Aug 15 18:27:21 openhab zram-config[300]: + invoke-rc.d rsyslog start
Aug 15 18:27:21 openhab zram-config[300]: + invoke-rc.d nginx start
Aug 15 18:27:21 openhab zram-config[300]: + journalctl --flush
Aug 15 18:27:21 openhab zram-config[300]: + '[' '!' -z '' ']'
Aug 15 18:27:21 openhab zram-config[300]: + echo 'createZlog no oldlog dir in ztab'
Aug 15 18:27:21 openhab zram-config[300]: + read -r line
Aug 15 18:27:21 openhab zram-config[300]: + '[' false = true ']'
Aug 15 18:27:21 openhab zramsync[564]: + STORAGE=/storage/zram
Aug 15 18:27:21 openhab zramsync[564]: + LOG=/storage/zram/zramsync.log
Aug 15 18:27:21 openhab zramsync[564]: + dir=/storage/zram
Aug 15 18:27:21 openhab zramsync[564]: + [[ 2 -ne 2 ]]
Aug 15 18:27:21 openhab zramsync[564]: + [[ ! -f /etc/ztab ]]
Aug 15 18:27:21 openhab zramsync[564]: + [[ ! -d /storage/zram ]]
Aug 15 18:27:21 openhab zramsync[564]: + tee -a /storage/zram/zramsync.log
Aug 15 18:27:21 openhab zramsync[564]: ++ date
Aug 15 18:27:21 openhab zramsync[564]: + echo 'zramsync recover @ Sat 15 Aug 18:27:21 CEST 2020'
Aug 15 18:27:21 openhab zramsync[564]: zramsync recover @ Sat 15 Aug 18:27:21 CEST 2020
Aug 15 18:27:21 openhab zramsync[564]: + [[ recover = \r\e\c\o\v\e\r ]]
Aug 15 18:27:21 openhab zramsync[564]: + [[ -d /storage/zram/var ]]
Aug 15 18:27:21 openhab zramsync[564]: + tee -a /storage/zram/zramsync.log
Aug 15 18:27:21 openhab zramsync[564]: ++ date
Aug 15 18:27:21 openhab zramsync[564]: + echo 'zramsync recovery recover starting @ Sat 15 Aug 18:27:21 CEST 2020'
Aug 15 18:27:21 openhab zramsync[564]: zramsync recovery recover starting @ Sat 15 Aug 18:27:21 CEST 2020
Aug 15 18:27:21 openhab zramsync[564]: + rsync -avrh /storage/zram/ /
Aug 15 18:27:21 openhab zramsync[564]: sending incremental file list
Aug 15 18:27:21 openhab zramsync[564]: zramsync.log
Aug 15 18:27:21 openhab zramsync[564]: var/lib/openhab2/persistence/
Aug 15 18:27:21 openhab zramsync[564]: sent 1.42K bytes  received 49 bytes  2.94K bytes/sec
Aug 15 18:27:21 openhab zramsync[564]: total size is 1.11K  speedup is 0.76
Aug 15 18:27:21 openhab zramsync[564]: + exit 0
Aug 15 18:27:21 openhab systemd[1]: Started zram-config.
-- Subject: A start job for unit zram-config.service has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit zram-config.service has finished successfully.
--
-- The job identifier is 71.
[18:28:35] root@openhab:/home/openhabian# zramctl
NAME       ALGORITHM DISKSIZE  DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram2 lzo-rle       500M 24.8M 71.4K  420K       4 /opt/zram/zram2
/dev/zram1 lzo-rle       500M 16.4M  7.1K   84K       4 /opt/zram/zram1
/dev/zram0 lzo-rle       600M    4K   87B   12K       4 [SWAP]
[18:29:41] root@openhab:/home/openhabian# systemctl status zram-config.service
● zram-config.service - zram-config
   Loaded: loaded (/etc/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sat 2020-08-15 18:27:21 CEST; 2min 29s ago
  Process: 241 ExecStartPre=/bin/rm -f /usr/local/share/zram-config/zram-device-list /usr/local/share/zram-config/zram-d
  Process: 258 ExecStartPre=/usr/local/sbin/zramsync recover /storage/zram (code=exited, status=0/SUCCESS)
  Process: 300 ExecStart=/usr/local/sbin/zram-config start (code=exited, status=0/SUCCESS)
  Process: 564 ExecStartPost=/usr/local/sbin/zramsync recover /storage/zram (code=exited, status=0/SUCCESS)
 Main PID: 300 (code=exited, status=0/SUCCESS)

Aug 15 18:27:21 openhab zramsync[564]: + echo 'zramsync recovery recover starting @ Sat 15 Aug 18:27:21 CEST 2020'
Aug 15 18:27:21 openhab zramsync[564]: zramsync recovery recover starting @ Sat 15 Aug 18:27:21 CEST 2020
Aug 15 18:27:21 openhab zramsync[564]: + rsync -avrh /storage/zram/ /
Aug 15 18:27:21 openhab zramsync[564]: sending incremental file list
Aug 15 18:27:21 openhab zramsync[564]: zramsync.log
Aug 15 18:27:21 openhab zramsync[564]: var/lib/openhab2/persistence/
Aug 15 18:27:21 openhab zramsync[564]: sent 1.42K bytes  received 49 bytes  2.94K bytes/sec
Aug 15 18:27:21 openhab zramsync[564]: total size is 1.11K  speedup is 0.76
Aug 15 18:27:21 openhab zramsync[564]: + exit 0
Aug 15 18:27:21 openhab systemd[1]: Started zram-config.

file is not there:

[18:30:21] root@openhab:/home/openhabian# cat /var/lib/openhab2/persistence/date
cat: /var/lib/openhab2/persistence/date: No such file or directory

have i done something wrong?

No. I’m seeing this behavior as well but cannot explain for the time being.

1 Like

Add the following line to the [Unit] section of /etc/systemd/system/zram-config.service and issue systemctl daemon-reload, then reboot once and then try again with mapdb

RequiresMountsFor=/opt/zram/zram1/upper /opt/zram/zram2/upper

And show your final zram-config.service please.

just a quick test before installing mapdb and dateitem:

[19:16:57] root@openhab:/home/openhabian# systemctl daemon-reload
[19:17:08] root@openhab:/home/openhabian# cat /etc/systemd/system/zram-config.service
[Unit]
Description=zram-config
After=local-fs.target
Before=smbd.service openhab2.service
PartOf=openhab2.service
RequiresMountsFor=/opt/zram/zram1/upper /opt/zram/zram2/upper

[Service]
Type=oneshot
ExecStartPre=-/bin/rm -f /usr/local/share/zram-config/zram-device-list /usr/local/share/zram-config/zram-device-list.rev
ExecStartPre=-/usr/local/sbin/zramsync recover "/storage/zram"
ExecStartPost=-/usr/local/sbin/zramsync recover "/storage/zram"
ExecStart=-/usr/local/sbin/zram-config start
ExecStop=-/usr/local/sbin/zramsync sync "/storage/zram"
ExecStopPost=-/usr/local/sbin/zram-config stop
TimeoutSec=300
RemainAfterExit=yes

[Install]
WantedBy=openhab2.service
[19:17:42] root@openhab:/home/openhabian# date > /var/lib/openhab2/persistence/date
[19:17:58] root@openhab:/home/openhabian# cat /var/lib/openhab2/persistence/date
Tue 25 Aug 19:17:58 CEST 2020
[19:18:05] root@openhab:/home/openhabian# reboot

i don’t think zram started properly:

[19:22:46] root@openhab:/home/openhabian# journalctl -xu zram-config.service --no-pager
-- Logs begin at Sat 2020-08-15 16:31:02 CEST, end at Tue 2020-08-25 19:22:46 CEST. --
Aug 15 16:31:03 openhab systemd[1]: Starting zram-config...
-- Subject: A start job for unit zram-config.service has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit zram-config.service has begun execution.
--
-- The job identifier is 107.
Aug 15 16:31:03 openhab zramsync[250]: + STORAGE=/storage/zram
Aug 15 16:31:03 openhab zramsync[250]: + LOG=/storage/zram/zramsync.log
.
.
.
Aug 15 18:27:21 openhab zramsync[564]: total size is 1.11K  speedup is 0.76
Aug 15 18:27:21 openhab zramsync[564]: + exit 0
Aug 15 18:27:21 openhab systemd[1]: Started zram-config.
-- Subject: A start job for unit zram-config.service has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit zram-config.service has finished successfully.
--
-- The job identifier is 71.

there are no entries from today in the log above…

[19:22:48] root@openhab:/home/openhabian# zramctl
[19:22:50] root@openhab:/home/openhabian# cat /var/lib/openhab2/persistence/date
cat: /var/lib/openhab2/persistence/date: No such file or directory

should i proceed with mapdb nonetheless?

No. Hang on we’re still working on that.

1 Like

Try again please. Flash from new, edit openhabian.conf to set clonebranch=master before installing.

ok, started again with 1.6 alpha. i haven’t changed debugmodein openhabian.conf, please say so if needed.

after install (and no reboot):

[10:21:24] root@openhab:/home/openhabian# zramctl
[10:21:26] root@openhab:/home/openhabian# systemctl status zram-config.service
● zram-config.service - zram-config
   Loaded: loaded (/etc/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: inactive (dead)

reboot

[10:23:52] root@openhab:/home/openhabian# zramctl
[10:24:00] root@openhab:/home/openhabian# systemctl status zram-config.service
● zram-config.service - zram-config
   Loaded: loaded (/etc/systemd/system/zram-config.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2020-08-30 10:22:28 CEST; 1min 33s ago
  Process: 234 ExecStartPre=/usr/local/sbin/zramsync recover /storage/zram (code=exited, status=0/SUCCESS)
  Process: 260 ExecStart=/usr/local/sbin/zram-config start (code=exited, status=203/EXEC)
 Main PID: 260 (code=exited, status=203/EXEC)

Aug 30 10:22:28 openhab systemd[1]: Starting zram-config...
Aug 30 10:22:28 openhab systemd[234]: zram-config.service: Executable /usr/local/sbin/zramsync missing, skipping: No such file or directory
Aug 30 10:22:28 openhab systemd[260]: zram-config.service: Failed to execute command: No such file or directory
Aug 30 10:22:28 openhab systemd[260]: zram-config.service: Failed at step EXEC spawning /usr/local/sbin/zram-config: No such file or directory
Aug 30 10:22:28 openhab systemd[1]: zram-config.service: Main process exited, code=exited, status=203/EXEC
Aug 30 10:22:28 openhab systemd[1]: zram-config.service: Failed with result 'exit-code'.
Aug 30 10:22:28 openhab systemd[1]: Failed to start zram-config.

still not running.

I don’t know what but something went wrong because binaries are missing.
Try find / -name zram-config to see if they’re somewhere else.

Then try again with a recent image such as the one from https://github.com/openhab/openhabian/actions/runs/230501406
And yes enable debugmode=maximum this time and post /boot/first-boot.log afterwards.

Are you sure you have set clonebranch=master before first boot ?
If that does not work try with clonebranch=testbuild, too.

[10:24:01] root@openhab:/home/openhabian# find / -name zram-config
/usr/local/bin/zram-config
/usr/local/lib/zram-config
/usr/local/share/zram-config
/etc/logrotate.d/zram-config
/opt/zram/openhabian-zram/zram-config

yes, 100% sure

ok.