Changes to Filesystem gone after reboot - Raspberry Pi

Welches Modul/Treiber für welche Hardware, Kernel compilieren...
Antworten
Bra1nsen
Beiträge: 6
Registriert: 01.08.2022 16:31:25

Changes to Filesystem gone after reboot - Raspberry Pi

Beitrag von Bra1nsen » 04.11.2022 09:42:02

I know this topic has been raised on a few forums, but I can't find any clear instructions on how best to approach this problem.

The Raspberry is on a roof as part of a weather station and is very difficult to access, so I'd like to rule out everything else before touching the hardware.

Raspberry Pi 4B
Operating System: Raspbian GNU/Linux 11 (bullseye)
Kernel: Linux 5.15.61-v7l+
Architecture: arm

Code: Alles auswählen

pi@allskyLA:~ $ dmesg -l warn,err
[    0.181747] usb_phy_generic phy: supply vcc not found, using dummy regulator
[    0.181939] usb_phy_generic phy: dummy supplies not allowed for exclusive requests
[    3.662194] systemd[1]: /lib/systemd/system/plymouth-start.service:16: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
[    4.728827] systemd-journald[142]: File /var/log/journal/ef4df6d3a9a544f2a1705ace80cce517/system.journal corrupted or uncleanly shut down, renaming and replacing.
[    9.521497] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[    9.579984] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[    9.903194] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[    9.923730] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[   10.013183] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[   10.079700] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[   10.104212] rpivid_hevc: module is from the staging directory, the quality is unknown, you have been warned.
[   10.471445] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[   11.081430] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.bin failed with error -2
[   28.162526] ICMPv6: process `dhcpcd' is using deprecated sysctl (syscall) net.ipv6.neigh.eth0.retrans_time - use net.ipv6.neigh.eth0.retrans_time_ms instead
[   33.855175] mmc0: Got data interrupt 0x00000002 even though no data operation was in progress.
[   42.083177] mmc0: Got data interrupt 0x00000002 even though no data operation was in progress.
[  132.289786] v3d fec00000.v3d: MMU error from client CLE (4) at 0x2901000, pte invalid
[  243.675673] INFO: task kworker/2:4:711 blocked for more than 122 seconds.
[  243.675702]       Tainted: G         C        5.15.61-v7l+ #1579
[  243.675720] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  258.046311] unicam fe801000.csi: Failed to start media pipeline: -22
today i got suddenly this error:

Code: Alles auswählen

pi@allskyLA:~ $ dmesg -l warn,err
[92816.852757] systemd-journald[142]: Failed to write entry (25 items, 1342 bytes), ignoring: Cannot assign requested address
[92816.853039] systemd-journald[142]: Failed to write entry (25 items, 1333 bytes), ignoring: Cannot assign requested address
[92816.899275] systemd-journald[142]: Failed to write entry (25 items, 1342 bytes), ignoring: Cannot assign requested address
Any instructions on how to find the root cause (corruption sd card)? What happend?

Benutzeravatar
QT
Beiträge: 1235
Registriert: 22.07.2004 21:08:02
Wohnort: localhost

Re: Changes to Filesystem gone after reboot - Raspberry Pi

Beitrag von QT » 04.11.2022 10:38:03

Had to replace a few microSD cards in Raspis before I finally started to use only ENDURANCE ones. Currently such card is in use since almost 1 year and no problem so far. Fingers crossed.

That raspi is operating also with loads of write activity which must have caused the damages earlier.

I think in your case there might hardly any log detail that can prevent you from doing some climbing action :D

Let us know what you find out as the root cause of the issue...

Benutzeravatar
hikaru
Moderator
Beiträge: 13559
Registriert: 09.04.2008 12:48:59

Re: Changes to Filesystem gone after reboot - Raspberry Pi

Beitrag von hikaru » 04.11.2022 10:52:32

At least the/a(?) file system seems to be corrupted:

Code: Alles auswählen

[   10.471445] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
This may or may not be caused by a faulty SD card.
Most SD cards are not designed to be used as boot/system media (lots of small random writes), but as multimedia storage (big chunks of sequential writes). Consider using a more robust file system (e.g. ext4) and a more robust storage medium (e.g. a proper SSD or at least an industrial grade SD card).

As part of "a weather station on a roof" your RPi is probably exposed to some of the weather effects, even if the computer itself is not on (the outside of) the roof. Especially temperature changes might be extreme. You may want to reconsider whether a mere RPi is the right device for that environment. From 2nd hand experience with several "Beagle Bone Black Industrial" I can tell that it works well even in harsh environments.

Benutzeravatar
MSfree
Beiträge: 10686
Registriert: 25.09.2007 19:59:30

Re: Changes to Filesystem gone after reboot - Raspberry Pi

Beitrag von MSfree » 04.11.2022 11:28:07

hikaru hat geschrieben: ↑ zum Beitrag ↑
04.11.2022 10:52:32
This may or may not be caused by a faulty SD card.
Warum eigentlich englisch? Der OP hat bisher auch immer auf deutsch gepostet.

Doch, das kann bei einer defekten Karte passieren. Sollte gerade der Sektor kaputt sein, der beim umount beschrieben wird, um das Dateisystem als sauber zu markieren, bleibt das Dirty-Flag erhalten und beim nächsten Boot bekommt man die von dir zitierte Meldung.

Ich denke, daß die SD-Karte kaputt ist und der OP aufs Dach steigen muß, um sie auszutauschen.

Benutzeravatar
hikaru
Moderator
Beiträge: 13559
Registriert: 09.04.2008 12:48:59

Re: Changes to Filesystem gone after reboot - Raspberry Pi

Beitrag von hikaru » 04.11.2022 11:36:03

MSfree hat geschrieben: ↑ zum Beitrag ↑
04.11.2022 11:28:07
Warum eigentlich englisch? Der OP hat bisher auch immer auf deutsch gepostet.
Gute Frage! Nächste Frage! ;)
MSfree hat geschrieben: ↑ zum Beitrag ↑
04.11.2022 11:28:07
Doch, das kann bei einer defekten Karte passieren.
Ja, eine defekte Karte halte ich auch für die (zweit*)wahrscheinlichste Ursache.
"may or ay not" ist ja auch die englische Version von "kann sein oder auch nicht sein". Mit anderen Worten: Auf Basis der vorliegenden Infos lässt sich nur spekulieren.


*) Nr. 1 wäre für mich ein unsauberer Shutdown z.B. aufgrund eines Stromausfalls, der aber keine physischen Schäden hinterlassen hat. In dem Fals sollte ein fsck als Sofortreparatur ausreichen.

Benutzeravatar
Tintom
Moderator
Beiträge: 3029
Registriert: 14.04.2006 20:55:15
Wohnort: Göttingen

Re: Changes to Filesystem gone after reboot - Raspberry Pi

Beitrag von Tintom » 04.11.2022 11:44:32

Vielleicht wäre bei so einem Plug-and-forget-Setup an einem schwer zu erreichenden Ort der Einsatz eines overlay-Dateisystems angebracht. Dann würde eine handelsübliche SD-Karte als Lesemedium ausreichen, das Schreiben erfolgt dann in eine Ramdisk. Von dort kann man sich dann die Wetterdaten bei Bedarf per ssh/scp holen.

Benutzeravatar
MSfree
Beiträge: 10686
Registriert: 25.09.2007 19:59:30

Re: Changes to Filesystem gone after reboot - Raspberry Pi

Beitrag von MSfree » 04.11.2022 11:52:43

Tintom hat geschrieben: ↑ zum Beitrag ↑
04.11.2022 11:44:32
Vielleicht wäre bei so einem Plug-and-forget-Setup an einem schwer zu erreichenden Ort der Einsatz eines overlay-Dateisystems angebracht.
Raspis können seit dem Raspi-3 auch von USB booten. Man könnte also auch einfach eine 2.5"-SSD via USB-Adapter anschleßen und nutzen. SSDs haben den Vorteil, daß sie über Wearlevelling verfügen, bei SD-Karten weiß man das leider nicht so genau.

Bra1nsen
Beiträge: 6
Registriert: 01.08.2022 16:31:25

Re: Changes to Filesystem gone after reboot - Raspberry Pi

Beitrag von Bra1nsen » 06.11.2022 11:25:30

Danke für eure nützlichen Gedanken.

Der Pi ist gut geschützt. https://drive.google.com/file/d/1B4RCg9 ... share_link
So sieht die Station aus: https://drive.google.com/file/d/1sf_bD- ... share_link

So ganz kaputt scheint mir die SD Karte nicht, ich kann aktuell noch Änderungen vornehmen, Skripte laufen lassen etc.
Lediglich nach dem Reboot sind alle Änderungen gelöscht..

Das wurde heute ausgegeben:

Code: Alles auswählen

pi@allskyLA:~ $ dmesg -l warn,err
[    0.181764] usb_phy_generic phy: supply vcc not found, using dummy regulator
[    0.181956] usb_phy_generic phy: dummy supplies not allowed for exclusive requests
[    3.665910] systemd[1]: /lib/systemd/system/plymouth-start.service:16: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
[    4.650305] systemd-journald[143]: File /var/log/journal/ef4df6d3a9a544f2a1705ace80cce517/system.journal corrupted or uncleanly shut down, renaming and replacing.
[   15.381551] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[   15.477639] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[   15.791952] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[   15.799258] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[   15.871460] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[   15.871603] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[   15.874150] rpivid_hevc: module is from the staging directory, the quality is unknown, you have been warned.
[   15.890680] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[   16.242133] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Sieht jemand Wege, was ich probieren könnte, um die SD Karte zu reparieren?

DeletedUserReAsG

Re: Changes to Filesystem gone after reboot - Raspberry Pi

Beitrag von DeletedUserReAsG » 06.11.2022 11:30:05

Bra1nsen hat geschrieben: ↑ zum Beitrag ↑
06.11.2022 11:25:30
Sieht jemand Wege, was ich probieren könnte, um die SD Karte zu reparieren?
Der naheliegendste Ansatz steht ja schon in dem von dir selbst geposteten Text:
Bra1nsen hat geschrieben: ↑ zum Beitrag ↑
06.11.2022 11:25:30

Code: Alles auswählen

Please run fsck.

Benutzeravatar
schorsch_76
Beiträge: 2535
Registriert: 06.11.2007 16:00:42
Lizenz eigener Beiträge: MIT Lizenz

Re: Changes to Filesystem gone after reboot - Raspberry Pi

Beitrag von schorsch_76 » 06.11.2022 21:48:45

Wenn die Änderungen nach einem reboot weg sind ist vielleicht doch ein overlayfs aktiv.... Das wäre nämlich die exakte Funktion.

Zeig doch mal ein

Code: Alles auswählen

mount

Antworten