Hi! I would like to know how well ext3/(ext2) will tolerate underlaying errors (I am planning to use loop-AES backed ext3 fs). So if there is 1024 bytes corruption of data what will be the worst case: - If this data belongs to some file, this part of data(file) has been lost? - If this data belongs to superblock, I have to repair ext3 and use another superblock? - If this data belongs to journaling system, I have to ??? or ??? will happen? - If this data is unused, it will not cause harm at all? Is above right? Is there any other case that I don't find? Thanks, Jani -- Jani Averbach
On Apr 20, 2002 15:31 +0300, Jani Averbach wrote:> I would like to know how well ext3/(ext2) will tolerate underlaying > errors (I am planning to use loop-AES backed ext3 fs).Ext2 (and ext3 by extension) has been in use for a long time, and has evolved to handle disk errors very well. However, one of the important mechanisms for keeping ext2/ext3 robust is that e2fsck is very good at finding and fixing errors. Even if you are using ext3 it is still a good idea to let the mount_count and check_interval counters force periodic fscks to detect data errors (you can use tune2fs to set the check intervals).> So if there is 1024 bytes corruption of data what will be the worst case: > > - If this data belongs to some file, this part of data(file) has been > lost?Correct.> - If this data belongs to superblock, I have to repair ext3 and use > another superblock?Correct. e2fsck will do this automatically.> - If this data belongs to journaling system, I have to ??? or ??? will > happen?At worst the journal recovery will copy a bad block to somewhere else in the filesystem, and then e2fsck will have to clean it up.> - If this data is unused, it will not cause harm at all?Correct. Cheers, Andreas -- Andreas Dilger http://www-mddsp.enel.ucalgary.ca/People/adilger/ http://sourceforge.net/projects/ext2resize/
Hi, On Sat, Apr 20, 2002 at 03:31:16PM +0300, Jani Averbach wrote:> I would like to know how well ext3/(ext2) will tolerate underlaying > errors (I am planning to use loop-AES backed ext3 fs). > > So if there is 1024 bytes corruption of data what will be the worst case:Define corruption. Do you mean lost data, or bogus data?> - If this data belongs to some file, this part of data(file) has been > lost?If you get "corruption" as opposed to unrecoverable data, then the file contents are not just lost, they are garbled silently. In other words, the application will get bogus data back, rather than being told there was a problem via an EIO error.> - If this data belongs to superblock, I have to repair ext3 and use > another superblock?Yes.> - If this data belongs to journaling system, I have to ??? or ??? will > happen?The journal area is mostly unused unless you crash. If that happens, e2fsck needs to take care of things. If the error is EIO, the worst that can happen right now is that e2fsck will complain, and you'll have to manually remove the journal (with tune2fs) then re-run e2fsck. If the error is data corruption, then either parts of the journal will be silently ignored (corrupting active metadata on the fs), or you'll end up copying garbage to active filesystem metadata.> Is above right? Is there any other case that I don't find?Bitmaps, inode tables, directories. --Stephen