Server crashed breaking the jfs file system

The file system on that hard drive is JFS. I chose it because it can work with huge files very well, deleting several Gigabytes in less than a second. In the past I only had to run fsck.jfs with a few arguments to get the file system back up and running. Today was different, as the allocation table (I am not sure how it is called in JFS) was broken. The recovery tool rebuild all files (yes all, and more) under a new directory called lost+found. Sadly most files in the root directory of the hard drive where renamed to something like I3030303.RCN. All files in the subdirectories where perfect (thanks to all developers of JFS!).

The real problem was, that al subdirectories where more or less unimportant. The root system had all my recordings… so I had to tell myself no to despair. After a nice breakfast I had figured out how to restore the right filenames. MythTV, being a well designed program, stores filename and file size in its database. So I took the "recorded" table in the database and compared it to the files in the lost+found directory. 'ls -al |grep I104705.RCN' for example gave me back the file size which I just had to compare with that of the database. Then rename the file with a quick 'mv I104705.RCN 31058_20060918155000.mpg'. I was too scared to create an automated script to do this for me, as I could have lost my files. After about 30 minutes of manual work it was done!

This is again a prime example why I ever more like my Linux system. Try this kind of recovery with a closed source OS (and I mean with the tools available by the OS manufacturer)!

This morning I was confronted with my server having overheated and locked up in the process (or the other way round). This is usually no problem as most Linux programs cope with this very gracefully. Today, though, was different as my storage hard drive where all my MythTV recordings are saved was corrupted.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.