On Tue, Mar 29, 2011 at 10:33 AM, Rogier Wolff <R.E.Wolff@xxxxxxxxxxxx> wrote: > On Tue, Mar 29, 2011 at 08:50:18AM -0500, Eric Sandeen wrote: >> Another tool which can be useful for this sort of thing is >> fsfuzzer. It writes garbage; using dd to write zeros actually >> might be "nice" corruption. > > Besides writing blocks of "random data", you could write blocks with a > small percentage of bits (byte) set to non-zero, or just toggle a > configurable number of bits (bytes). This is slightly more devious than just > "random data". I don't know what exactly is being tested, but "hdparm --make-bad-sector" can be used to create a media error on a specific sector. Thus allowing you to simulate a sector failing in the middle of the journal. I assume that is a relevant test. fyi: --repair-sector undoes the damage. You may need to follow that with a normal write to put legit data there. If you try a normal data write without first repairing, the drive should mark the sector permanently bad and remap that sector to a spare sector. I have only used these tools with raw drives, no partitions, etc. So I've never had to worry about data loss, etc. Greg -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html