Commit 1912831
Fix SD mirroring of zram-managed data and first-boot zram failure
Address findings from community test bench report (#2156):
- Sync SD (diff mode) rsynced live /var/log and openHAB persistence into
/opt/zram/*.bind on the target, but zram-config bind-mounts the target
directory over those paths at boot, so the synced data was shadowed and
never used. Worse, the main rsync's --one-file-system + --delete emptied
the clone's lower /var/log and persistence directories because they are
overlay mountpoints on the running system. Rsync now targets the plain
lower paths that zram-config uses as overlay lowerdir.
- Both raw and diff copies carried over the live system's
/usr/local/lib/zram-config/zram-device-list, causing zram-config on the
clone's first boot to skip device creation. The state file is now
removed from the target in both paths.
- Run sync and udevadm settle between dd and set-partuuid to avoid
intermittent PARTUUID assignment failures on loaded systems.
- Document that raw copies cannot capture data still held in zram.
Fixes #2156
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 8fcbd2d commit 1912831
2 files changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
419 | 422 | | |
420 | 423 | | |
421 | 424 | | |
| |||
428 | 431 | | |
429 | 432 | | |
430 | 433 | | |
| 434 | + | |
| 435 | + | |
431 | 436 | | |
432 | 437 | | |
433 | 438 | | |
| |||
453 | 458 | | |
454 | 459 | | |
455 | 460 | | |
456 | | - | |
457 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
458 | 467 | | |
459 | 468 | | |
460 | 469 | | |
| |||
0 commit comments