[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D914DAF.6060600@tao.ma>
Date: Tue, 29 Mar 2011 11:10:39 +0800
From: Tao Ma <tm@....ma>
To: Daniel Taylor <Daniel.Taylor@....com>
CC: linux-ext4@...r.kernel.org
Subject: Re: breaking ext4 to test recovery
On 03/29/2011 10:45 AM, Daniel Taylor wrote:
> I would like to be able to break our ext4 file system
> (specifically corrupt the journal) to be sure that we
> can automatically notice the problem and attempt an
> autonomous fix.
>
> dumpe2fs tells me the inode, but not, that I can see, the
> blocks where the journal exists (for "dd"ing junk to it).
yeah, AFAICS, you can corrupt it by dd.
As for the journal, normally the journal file uses the inode no 8.
So use
debugfs -R 'stat <8>' /dev/sdx.
Then you will get the disk layout of your journal.
In my box, it looks as:
Inode: 8 Type: regular Mode: 0600 Flags: 0x80000
Generation: 0 Version: 0x00000000:00000000
User: 0 Group: 0 Size: 33554432
File ACL: 0 Directory ACL: 0
Links: 1 Blockcount: 65536
Fragment: Address: 0 Number: 0 Size: 0
ctime: 0x4d86f9ad:00000000 -- Mon Mar 21 15:09:33 2011
atime: 0x4d86f9ad:00000000 -- Mon Mar 21 15:09:33 2011
mtime: 0x4d86f9ad:00000000 -- Mon Mar 21 15:09:33 2011
crtime: 0x4d86f9ad:00000000 -- Mon Mar 21 15:09:33 2011
Size of extra inode fields: 28
EXTENTS:
(0-8191): 131072-139263
So see, you get the file's physical block number of that file
131072-139263.
Now corrupt the file as you wish with dd. ;)
Regards,
Tao
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists