Sdrsync seems not working

  • Platform information:
  • Hardware: Raspi 4
  • OS: Linux openhabian 6.1.21
  • Java Runtime Environment: openjdk version “17.0.9” 2023-10-17
    OpenJDK Runtime Environment (build 17.0.9+9-Raspbian-1deb11u1rpt1)
    OpenJDK Client VM (build 17.0.9+9-Raspbian-1deb11u1rpt1, mixed mode, emulated-client)
  • openHAB version: 4.1.1 - release build
  • Issue of the topic:
    I did perform a fresh setup to migrate to OH4. Used a new SD card with the following image:
    openhabian-pi-raspios32-202402051947-git4f124c2-crc903d2975.img.xz
    Nothing changed there, performed initial setup, when OH was up and running installed successfully Phoscon, Mosquitto, Samba and loaded the previous config from OH 3.3.
    System runs - I’m quite happy. Decided to organize the first half of the backup strategy - SD copy - using Option 53.
    Obviously the installation was successfull, the new (twice the size) card was partitioned with 3 partitions.
 $ lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    1 59.5G  0 disk
├─sda1        8:1    1  256M  0 part
├─sda2        8:2    1 29.6G  0 part
└─sda3        8:3    1 29.6G  0 part /storage
mmcblk0     179:0    0 29.8G  0 disk
├─mmcblk0p1 179:1    0  256M  0 part /boot
└─mmcblk0p2 179:2    0 29.6G  0 part /
zram0       254:0    0    1G  0 disk [SWAP]
zram1       254:1    0  750M  0 disk /opt/zram/zram1
zram2       254:2    0    1G  0 disk /opt/zram/zram2

Sdrawcopy seems did run (at least it took half an hour or so and the success was reported). Timers are set and obviously the sdrsync.service did run

systemctl list-timers
NEXT                         LEFT                 LAST                        PASSED             UNIT                         ACTIVATES
Thu 2024-02-22 20:39:02 CET  2h 17min left        Wed 2024-02-21 20:39:02 CET 21h ago            systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
Fri 2024-02-23 00:00:00 CET  5h 38min left        Thu 2024-02-22 00:00:02 CET 18h ago            exim4-base.timer             exim4-base.service
Fri 2024-02-23 00:00:00 CET  5h 38min left        Thu 2024-02-22 00:00:02 CET 18h ago            logrotate.timer              logrotate.service
Fri 2024-02-23 00:00:00 CET  5h 38min left        Thu 2024-02-22 00:00:02 CET 18h ago            man-db.timer                 man-db.service
Fri 2024-02-23 02:07:20 CET  7h left              Thu 2024-02-22 02:07:02 CET 16h ago            sdrsync.timer                sdrsync.service
Fri 2024-02-23 05:01:30 CET  10h left             Thu 2024-02-22 03:54:57 CET 14h ago            firemotd.timer               firemotd.service
Fri 2024-02-23 05:03:26 CET  10h left             Thu 2024-02-22 11:41:22 CET 6h ago             apt-daily.timer              apt-daily.service
Fri 2024-02-23 06:50:13 CET  12h left             Thu 2024-02-22 06:30:24 CET 11h ago            apt-daily-upgrade.timer      apt-daily-upgrade.service
Sun 2024-02-25 03:10:06 CET  2 days left          Sun 2024-02-18 03:10:59 CET 4 days ago         e2scrub_all.timer            e2scrub_all.service
Mon 2024-02-26 00:23:46 CET  3 days left          Mon 2024-02-19 00:13:09 CET 3 days ago         fstrim.timer                 fstrim.service
Mon 2024-07-01 01:15:00 CEST 4 months 7 days left Sun 2024-02-11 13:48:33 CET 1 weeks 4 days ago sdrawcopy.timer              sdrawcopy.service

11 timers listed.
Pass --all to see loaded but inactive timers, too.

But I don’t see any files stored - although I did change one file in Home directory on purpose - just as test. I thought the changed files would land in sda3 mounted as storage - but its completely empty.

openhabian@openhabian:~ $ cd /storage
openhabian@openhabian:/storage $ ls
lost+found  syncmount
openhabian@openhabian:/storage $ cd syncmount/
openhabian@openhabian:/storage/syncmount $ ls
openhabian@openhabian:/storage/syncmount $

Any hint? Is there a logfile where I would see the reason?
Cheers and thanks Frank

Nah that isnt how it is supposed to work how do you come to think that?

The mirror target is a separate partitition which is not mounted by default.

I thought the raw copy is a 1:1 - performed initially and twice a year , so sda1 and sda2 would contain a 1:1 copy of my working internal card and then there is the "incremental part - running once a day and copying only the changed files?
Probably misunderstanding - couldnt find it in detail in the docs.

thats about right. but the target sda2 is not
mounted as /storage (thats sda3)

So the changed files land also on sda2 (its overwriting the previos “older” files)?
How would I check the success?
And sda3 is purely prepared for Amanda?

mount it

yes

ok, thanks.
Created a testdirectory in media , mounted /dev/sd2 to it. Did see my original files and structure - but it doesnt contain the “newest version” (so my changed testfile) - but only the original one. So something went wrong.

Don’t know what was causing the non-functioning incremental copy.
Just to be sure I put a new SD card into the card reader, went again to option 53.
Now it works. If I change/add files they appear the day after in sda2.
The only thing which is a bit odd: After the fresh setup of SD mirroring and the initial (raw) copy sda2 was not mountable - I did reboot and only than could mount sda2. But this can’t be the reason, because before when the incremental copy was not working I could mount sda2. Strange.
Nevertheless its working now.
So thanks for the hint (and the patience with beginners).

Seems the Cardreader was one of the reasons of confusion. Running the external SD card in a different USB stick ( Cardreader) now - works perfectly.