vlambrecht
Posts: 9
Joined: Mon Jul 02, 2012 2:23 am

So for some reason my filesystem is corrupt...

Tue Oct 16, 2012 1:24 am

Hello all,
I think I am posting in the right forum area, but here's my story.

I've been experimenting with the Pi for quite a while, currently with it being a perfectly happy Subversion server. However, I had an issue today.
It appeared that my subversion repo was corrupted. I tried repairing, but to no avail, I thought it was just the repo. I tried to restart (who knows, maybe this would solve the trick), however that was the breaking point - the Pi never got to the main shell.

dmeseg output is a whole lot of
EXT4-fs error (device mmcblk0p2): ext4_iget:3939 inode#31723: comm tput: bogus i_mode (110644)

What do I try to do? well repair the filesystem - fsck -p /dev/mmcblk0p2
it tells me that there are errors, try to repair - yes - fail.
Error storing directory block information.....memory allocation failed.

Okay, that seems odd - it shouldn't fail, as the RAM is almost free (free -h reports only about 20 mb used), but what the heck, lets try to do the fsck disk caching (http://linux.die.net/man/5/e2fsck.conf) - after I configure the disk cache, same error.

So What have I done after? tried to do repair the SD card under another Linux server I have running, and same thing as well - "Memory allocation failed".

I am starting to think that I can't bring the install back to life.
PS: It probably happened because of the turbo mode overclock, I hear that SD card corruption can happen.

If anyone has any clues as to how one would go about fixing it, please let me know,
PS: Below is the error message that I get, regardless of where I run it at (the fsck command)
Image

vlambrecht
Posts: 9
Joined: Mon Jul 02, 2012 2:23 am

Re: So for some reason my filesystem is corrupt...

Tue Oct 16, 2012 10:55 am

So I may have found the cause to the above memory allocation error.
In the attempt to look for inode 31723, I noticed - abnormal - file sizes - well totalling just under 700,000GiB. (that's 700TB!)
There is obviously something afoot there... Not sure how the heck this happened, but I think I will just start over, as there is no way to allocate enough space for those kinds of files (the SSL folder had certificates that sized just over 100GiB)

At least I was able to get the configs off (most of them)

Mantrid
Posts: 33
Joined: Thu Jun 21, 2012 8:44 am
Location: Middlesbrough/Armagh

Re: So for some reason my filesystem is corrupt...

Tue Oct 16, 2012 12:38 pm

The only time I get filesystem corruption is when my wife unplugs the powered hub from the power outlet and the webcam/usb stick (where the main fs is) fight for power and eventually the stick loses and I just reflash it

Do you have any other hardware attached that might be stealing power from the pi maybe?

vlambrecht
Posts: 9
Joined: Mon Jul 02, 2012 2:23 am

Re: So for some reason my filesystem is corrupt...

Tue Oct 16, 2012 11:28 pm

Nope.
The Pi is just a standalone server, the only thing that is connected to it is the ethernet link going to my switch.

I wonder though... My Pi is hooked up to a server - via USB (USB3.0). I was thinking it was running well.
USB3 is 5v @ 1A (or 900mA).

The server is never off and on a UPS backup as well, so not sure if that could have caused the issue.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12536
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: So for some reason my filesystem is corrupt...

Wed Oct 17, 2012 1:53 am

I have read a post were someone had similar problems, but fixed it by adding another 100nF capacitor over the power pins of the SD-card. Perhaps your card gets corrupted if during a write action to the card there is a sudden spike in curent consumption that your PSU doesn't handle too well (long and thin micro-USB cable perhaps.) so that the SD-card power dips below some limit and the card's logic crashes, something like that. But it just a theory nothing more.... On further thinking about it the SD-card is 3V3 powered, so its not that sensitive to power dips, unless they go below say 4V, but I have no clue why that would happen.

thogue
Posts: 131
Joined: Wed Sep 19, 2012 2:16 am

Re: So for some reason my filesystem is corrupt...

Wed Oct 17, 2012 2:27 am

check out the overclocking thread (http://www.raspberrypi.org/phpBB3/viewt ... =29&t=6201) , Dom + community is working to try to figure the corruption related to overclocking out. It also seems to vary from SD card to SD card, one of my cards would almost always corrupt if over 800, and another card would work fine at 1000.

portets
Posts: 186
Joined: Sat Oct 29, 2011 6:24 am

Re: So for some reason my filesystem is corrupt...

Wed Oct 17, 2012 3:38 am

Corruption might be fixed in the latest firmware. I was one of the people that tried to help find the issue. No more corruption for me so far.

Return to “Raspbian”