So last week, the hard-drive in my MythTV box started acting up — it was happily transcoding when all of a sudden, it showed an empty Recordings-list. I’ve had that before, so knew that MySQL was having problems due to not enough diskspace. Checking the logfiles however, I noticed more scary stuff was going on, the data partition was giving me filesystem errors.
This wouldn’t be a ‘real’ issue if the machine was just storing recordings but, no, of course I had to cram the HD with all my photo’s-, video- and music collection, to free up space on the other machines.
Running fsck gave me *severe* errors, and the logfile was barfing up errors about group descriptors being corrupted. That did not look good at all.
I have had problems with drives before but I never had the pleasure getting thrown the warning **SEVERE DATA LOSS POSSIBILITY** at me. I quickly aborted the filesystem check because, to me, it seemed like the superblock was corrupted or something. Knowing the filesystem stores backup superblocks, I tried running it with an alternate one….. That seemed succesful … until … fsck hit me with a segmentation fault. Ouch.
That did not seem good. (All-in-all things were hopeful because I could mount the drive (with errors though) and access the data — and my adrenaline-level lowered.)
A bit of googling revealed that the problem could be solved by adding some swap space, there might be too little. I didn’t see the machine with 1G internal memory use any swap during the check process, but hell, I gave it a shot anyways, using dd, mkswap and swapon to make a temporary swapfile another 1 G in size.
That didn’t help either … As soon as it hit:
i_frag for inode 302 (...) is 152, should be zero.
Clear
i_fsize for inode 302 (...) is 170, should be zero.
Clear
Segmentation fault
Yikes. After a bit more googling I learned that this specific issue, segfaulting on setting the i_fsize for an inode, should be resolved in the latest version of e2fsprogs.
So I downloaded, compiled, and ran it on the seemingly un-fixable partition to see it nicely fix all the errors without hitting me with the segmentation fault again.
The machine is now up and running again, playing Eric B and Rakim as I write this. So I’m happy.
on
April 12th 2007 at 6:01 am in
no comments 








