I’ havnig trouble with mirroring. I can’t boot from a mirrored SD card after more than one mirror. I’ve tried with multiple SD cards, the first mirror will work but any further full mirrors to the same SD card fail to boot. The mirror process completes without fail. I also had a working mirror fail to boot after re-syncing. I’ve tried with multiple pi’s and multiple SD cards. All with the same result. I then tried a fresh openhabian image. This mirrored but again the next mirror failed to boot.
Can you not re-mirror to an SD card that’s already been mirrored? Is there something I can change to have my mirror boot successfully?
In theory you can but probably noone ever tested but you.
You don’t give enough details it takes to answer. Do this upfront next time please.
And to be frank your description is confusing.
What HW do you use ?
How do you boot - by putting it into the internal SD slot? By specifying boot parameters (if so how?)
Do you have any card in the external reader when you try booting ?
Do you have any other mass storage attached?
How do you initiate mirroring ?
Set debugmode=maximum (see debug log) and initiate mirroring then repeat until you have a mirror that does not work then provide the log of its initiation and show the outputs of lsblk and blkid.
Interestingly I have run menu option 53 - Setup SD Mirroring 3 times since my first post and it worked each time. This kept failing to boot previously.
I then tried menu option 55 - Sync SD. After the process finished I tried booting from the synced card but it failed to boot. This fail twice in a row (menu item 53, susessful boot, menu item 55, failed to boot).
Below are answers to your questions and the output of menu option 55 - Sync SD, lsblk and blkid.
Raspberry Pi4 4gb
I’m booting from the internal SD slot
I haven’t changed any boot parameters
When booting from the mirrored drive I don’t have an external card reader attached. Just internal SD card (the mirror), power and ethernet
No mass storage attached
I’ve tried initiating mirroring using openhabian-config menu item 53 - Setup SD Mirroring, 54 - Raw copy SD and also using dd from my Mac with an external card reader.
Doesn’t the openhabian backup setup periodically full mirror? This is what led me to think that I was able to mirror to an SD with an existing mirror. I’ve tried formatting an SD card that is not booting and then mirroring to it again but this also didn’t boot.
I’ve tried include this output of the the Sync SD but it’s too long to be allowed to post. What the best way to share this?
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 58G 0 disk
├─sda1 8:1 1 256M 0 part
├─sda2 8:2 1 29.5G 0 part
└─sda3 8:3 1 28.3G 0 part /storage
mmcblk0 179:0 0 29.7G 0 disk
├─mmcblk0p1 179:1 0 256M 0 part /boot
└─mmcblk0p2 179:2 0 29.5G 0 part /
zram0 254:0 0 200M 0 disk [SWAP]
zram1 254:1 0 150M 0 disk /opt/zram/zram1
Well it doesn’t fail to boot does it.
Screenshots are unreadable therefore discouraged but it shows your box does boot.
It cannot mount a disk but I cannot see which one.
Just a guess: it’s sda3. If you use auto-back or manually setup Amanda, it’s there on the mirror.
But running mirroring again from the mirror will not mirror it, it’s just mirroring partitions 1 & 2 so
/dev/sda3 does not exist or is trash so cannot be mounted on boot.
Make an fsck of your failing SD and mount it as /mnt.
Try to remove /mnt/etc/systemd/system/storage.mount to see if it boots then.
Long story short: Only take mirrors of the original or adapt it afterwards.