Raw copy SD (option 54) copies all 3 partitions if source is mirrored card (ie result of option 53)

  • Platform information:
    • Hardware: Raspberry Pi 4
    • OS: Openhabian 1.6 main with latest updates
    • Java Runtime Environment: Zulu11.50+19-CA (build 11.0.12+7-LTS)
    • openHAB version: 3.2 latest milestone

With some help from mstormi on someone else’s thread https://community.openhab.org/t/cannot-open-access-to-console-the-root-account-is-locked/118646/13 and from various other threads in the forum, I’ve finally managed to set up reliable/functional mirroring (option 53 in openhabian config) and can do a manual raw copy SD (option 54) that boots if needed. This leaves me nearly ready to take a plunge in to the world of Amanda - and proper backups.

However, when testing that my mirror (32 GB SD card with three partitions) will save me when I really need it, I find that doing a raw copy SD to a new destination SD card creates all three partitions and is the same size as the source card… which is twice the size of the original 16 GB card.

This new card boots OK but, unless I delete the third partition (to be used for Amanda on the mirror but not required on the main running card) it seems to me that this will leave me needing to increase the size of SD cards every time I go through this cycle.

I’m wondering:

  • Is the above by design?
  • Can I delete the third partition - and maybe resize the disk - on the 32 GB mirror before doing the raw copy SD to a new smaller (16 GB same size as original) card?
  • am I solving a problem that doesn’t exist or won’t eventuate :thinking: ie zram is enabled and SD card size is growing rapidly… may double more frequently than my main card fails.

If I understood it right, you made a mirror of the mirror to a third card. So no it isn’t.

Yeah I’d think so.
Should you really suffer from multiple outages and really need to shrink back, then you can install from scratch and import your config.

1 Like

I was simulating what I would need to do if the original first card became corrupt… ie the mirror (created with option 53) would be used to boot and a new (third) card would be created using option 54. This new third card would then be used as the card running openhabian. I may have mistaken the documentation - though I’ve read it many times and also a number of threads on here.

That makes sense… rather than going down the rabbit hole I was approaching. Much appreciated.