User avatar
SteveDee
Posts: 343
Joined: Thu Dec 29, 2011 2:18 pm
Location: Sunny Southern England
Contact: Website

Raspbian file system corruption?

Mon Apr 10, 2017 11:53 am

Just wondering if there are any recent file system corruption issues with Raspbian.

It has only started happening since the beginning of this year and I seem to have suffered 4 or 5 times. The failure mode appears to be very specific; I generally notice the problem when I try to browse the root directory as user Pi with either pcmanfm, or using ls from a terminal. I get an hour-glass, cant close the file manager, and have to force fsck on next boot (i.e. I type in terminal: sudo mkdir fsck).

This problem goes unnoticed if I'm just running applications as user Pi, so I don't know when it happens or what might be triggering it.

It has happened on at least 4 different boards (Zero, Pi2, 2 x Pi3) with variety of power sources, and the last time was on a new Pi3 with a new SD card.

unixcommando
Posts: 16
Joined: Sun Dec 04, 2016 6:08 pm

Re: Raspbian file system corruption?

Mon Apr 10, 2017 3:07 pm

Unlikely, Raspbian uses standard Unix file systems that have been tested over millions, possibly billions of run hours. If there's an issue it's most likely due to your storage which you don't identify. Consumer level SD cards are not meant to be tremendously robust, they're designed to be used to transfer data over the sneaker net and eventually disposed of as new larger capacity higher speed devices are produced. Further failure to properly eject an SD card rapidly reduces its run time, powering a Pi off and on without a shutdown either because you don't want to wait, don't have console, or you have unpredictable power and no UPS will contribute to this.

The reason your systems can run fine with FS damage is a feature of Linux. Once booted a Linux system no longer requires disk access unless/until new tasks are started. Even then if the libraries the new tasks require are loaded into memory it still won't need disk access, they'll just run. Based on what you say your file system(s) is/are unavailable and can't be accessed when you login and try to do things. Most likely this is a storage issue, but could also be a hardware issue, if the SD card reader or USB bus has a problem. You might consider updating your firmware, perhaps there's some condition that's going to cause your reader to wander off into the weeds. I have a Pi 3 that I've run 7/24 as a media server for the last year and I've had very few issues with it, but I'm also running it from a WD Pi drive and have it on UPS. I had a Zero I had running, also on a Pi drive, for several months with no issue but decided to power it off as I wasn't doing anything with it.

Cheers
-Bob

Return to “Troubleshooting”