Egy ideje szívok az alábbival.
Debian 12 9, embedded rendszeren. Overlayfs használatával van egy alap image és egy overlay, ami jelen esetben ext2.
Ezt a scriptet adaptáltam a saját rendszerre (ez fut init helyett/előtt):
https://wiki.psuter.ch/doku.php?id=solve_raspbian_sd_card_corruption_is…
Módosítottam a scriptben, hogy az e2fsck lefusson, mielőtt felcsatolja az rw overlay-t.
A probléma: hiába állítom le szabályosan, az fsck mindig panaszkodik:
/dev/mmcblk1p4 was not cleanly unmounted, check forced.
Leállításkor elvileg umount-ol mindent:
Unmounting /rw...
Unmounting /ro...
Unmounting /tmp...
Unmounting /run/user/0...
[ OK ] Unmounted /rw.
[ OK ] Unmounted /ro.
[ OK ] Unmounted /run/user/0.
[ OK ] Unmounted /tmp.
[ OK ] Reached target Unmount All Filesystems.
Ha kézzel remount-olom read-only-ra az overlay-t, akkor nem panaszkodik.
Mondom, akkor nézzük meg, hogyan történik az umount. Én naivan:
# cat /lib/systemd/systemd-shutdown
ELF(5:4▒a4
Hogy törne le a keze, aki ezt kitalálta...
Van bárkinek ötlete, hogy mi lehet a probléma? Mert így nyomozni elég nehéz. Olyanra gondolok, hogy valamelyik parancs esetleg felcsatolva hagyja a régi helyén (mount --move vagy pivot_root, esetleg chroot?).
Így amikor véget ér a rendszer futása, ott még felcsatolva maradna? A /proc/mounts nem mutatja, hogy fel lenne csatolva máshol az ext2.
- 138 megtekintés
Hozzászólások
Valami fogja...
- A hozzászóláshoz be kell jelentkezni
Ez rendben, de miért nem dob rá hibát? Miért hazudja (ha hazudja) azt, hogy sikeres az unmount?
- A hozzászóláshoz be kell jelentkezni
Közben javítottam, a fenti üzenetek debian 9 esetén voltak, de a 12-n is ugyanaz a hiba, csak az üzenetek mások leállításkor:
[ OK ] Stopped target local-fs.target - Local File Systems.
Unmounting ro.mount - /ro...
Unmounting run-credentials…dentials/systemd-sysctl.service...
Unmounting run-credentials…ntials/systemd-sysusers.service...
Unmounting run-credentials…temd-tmpfiles-setup-dev.service...
Unmounting rw.mount - /rw...
[ OK ] Stopped systemd-sysctl.service - Apply Kernel Variables.
[ OK ] Stopped systemd-modules-lo…service - Load Kernel Modules.
[ OK ] Unmounted ro.mount - /ro.
[ OK ] Unmounted run-credentials-…redentials/systemd-sysctl.service.
[ OK ] Unmounted run-credentials-…dentials/systemd-sysusers.service.
[ OK ] Unmounted run-credentials-…ystemd-tmpfiles-setup-dev.service.
[ OK ] Unmounted rw.mount - /rw.
[ OK ] Stopped target local-fs-pr…reparation for Local File Systems.
[ OK ] Reached target umount.target - Unmount All Filesystems.
[ OK ] Stopped systemd-tmpfiles-s…reate Static Device Nodes in /dev.
[ OK ] Stopped systemd-sysusers.service - Create System Users.
[ OK ] Stopped systemd-remount-fs…ount Root and Kernel File Systems.
[ OK ] Reached target shutdown.target - System Shutdown.
[ OK ] Reached target final.target - Late Shutdown Services.
[ OK ] Finished systemd-poweroff.service - System Power Off.
[ OK ] Reached target poweroff.target - System Power Off.
systemd-shutdown[1]: Syncing filesystems and block devices.
systemd-shutdown[1]: Sending SIGTERM to remaining processes...
systemd-journald[640]: Received SIGTERM from PID 1 (systemd-shutdow).
systemd-shutdown[1]: Sending SIGKILL to remaining processes...
systemd-shutdown[1]: Unmounting file systems.
(sd-remount)[1674]: Remounting '/' read-only with options 'lowerdir=/mnt/lower,upperdir=/mnt/rw/upper,workdir=/m
nt/rw/work'.
systemd-shutdown[1]: All filesystems unmounted.
systemd-shutdown[1]: Deactivating swaps.
systemd-shutdown[1]: All swaps deactivated.
systemd-shutdown[1]: Detaching loop devices.
systemd-shutdown[1]: All loop devices detached.
systemd-shutdown[1]: Stopping MD devices.
systemd-shutdown[1]: All MD devices stopped.
systemd-shutdown[1]: Detaching DM devices.
systemd-shutdown[1]: All DM devices detached.
systemd-shutdown[1]: All filesystems, swaps, loop devices, MD devices and DM devices detached.
systemd-shutdown[1]: Syncing filesystems and block devices.
systemd-shutdown[1]: Powering off.
Itt sem panaszkodik, hogy valami ne sikerült volna.
- A hozzászóláshoz be kell jelentkezni