Robert Davidson
2009-Apr-21 09:17 UTC
Superblock missing, FS corruption after power outage
Hi all, I'm wondering if its possible that an ext3 filesystem with journaling enabled and so on (defaults really) could lose its primary superblock and lose, in this case, a whole directory which contained a virtual server. It is possible in this case that a fair chunk of data could have been lost as the RAID card has a 256mb cache with no battery backup for cached data, but it seems somewhat extreme that the superblock went missing (according to mount the filesystem didn't exist, according to fsck.ext3 it had to use a backup superblock), and that a whole directory disappeared and didn't end up in lost+found. During the fsck there were lots of claims of inodes claiming the same data blocks as some other inodes and as such the fsck chose to clone those blocks. In some instances - well, at least one, a directory that contained PostgreSQL databses became a symbolic link to some python file after the fsck. So I'd like to know if all of this is possible just from a power failure, or if there is something else going on that was possibly causing file system corruption that wasn't noticed until the reboot. Thanks. -- Regards, Robert Davidson.
On Apr 21, 2009 19:17 +1000, Robert Davidson wrote:> It is possible in this case that a fair chunk of data could have been lost as > the RAID card has a 256mb cache with no battery backup for cached data,At this point, all bets are off - ext3+jbd expects when the disk reports that data is safe on disk that it really is safe.> seems somewhat extreme that the superblock went missing (according to mount > the filesystem didn't exist, according to fsck.ext3 it had to use a backup > superblock), and that a whole directory disappeared and didn't end up in > lost+found.Well, if you lost 256MB at the start of the filesystem then that could easily contain the whole directory, which might only be a few blocks in size. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc.