Re: File System corruption tool
Andreas Dilger <[email protected]> Sat, 18 Jan 2014 15:29:09 -0700
| Newsgroups | gmane.comp.file-systems.ext3.user |
|---|---|
| Message-ID | <[email protected]> |
--===============3408553349917961445== Content-Type: multipart/alternative; boundary=Apple-Mail-4557747F-3853-4ADC-BF1F-07D8F967B4C4 Content-Transfer-Encoding: 7bit --Apple-Mail-4557747F-3853-4ADC-BF1F-07D8F967B4C4 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable We have a script that adds corruption to ext2/3/4 filesystems and runs=20 e2fsck on it. It definitely could be improved, but it still catches some occasional errors: http://git.whamcloud.com/?p=3Dtools/e2fsprogs.git;a=3Dcommit;h=3Daee44c669be= be29bfdb8a1c86da443234f8bc257 It tries to format the filesystem with different features and options, then adds corruption from both random data and copying parts of the filesystem internally to some other part of the filesystem. It might be usef= ul to corrupt some random bits and bytes in the filesystem also, but it doesn't do that today. There is also fsfuzzer, which writes random data to the filesystem and tries to mount it, but I don't know if that has been tried with e2fsck.=20 The other major question I have is why you are trying to create a new proprietary filesystem? That is really a ten year effort, and you would be much better off to use one of the many existing filesystems. If the current ones don't meet your exact needs, add the missing features you need instead of creating a whole new one from scratch. While I'm a big fan of ext4, there are many other good filesystems out there - XFS, Btrfs, ZFS, and several flash filesystems.=20 Cheers, Andreas > On Jan 18, 2014, at 5:13, "Lakshmipathi.G" <[email protected]> wrot= e: >=20 > Hi -=20 >=20 > I'm searching for file system corruption tool, say it inject disk-errors l= ike > multiply owned blocks etc. Later an integrity scan process (like e2fsck) w= ill > verify on-disk layout and fix these errors.=20 >=20 > I'd like to read/understand such tools before writing one for an proprieta= ry > on-disk file system.=20 >=20 > Do we have such tools for ext{2,3,4}fs ? Thanks for any help or pointers! >=20 > --=20 > ---- > Cheers, > Lakshmipathi.G > FOSS Programmer. > www.giis.co.in > _______________________________________________ > Ext3-users mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/ext3-users --Apple-Mail-4557747F-3853-4ADC-BF1F-07D8F967B4C4 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D= utf-8"></head><body dir=3D"auto"><div style=3D"-webkit-text-size-adjust: aut= o;">We have a script that adds corruption to ext2/3/4 filesystems and runs&n= bsp;</div><div style=3D"-webkit-text-size-adjust: auto;">e2fsck on it. It de= finitely could be improved, but it still catches some</div><div style=3D"-we= bkit-text-size-adjust: auto;">occasional errors:</div><div style=3D"-webkit-= text-size-adjust: auto;"><br></div><div><span style=3D"-webkit-text-size-adj= ust: auto;"><a href=3D"http://git.whamcloud.com/?p=3Dtools/e2fsprogs.git;a=3D= commit;h=3Daee44c669bebe29bfdb8a1c86da443234f8bc257">http://git.whamcloud.co= m/?p=3Dtools/e2fsprogs.git;a=3Dcommit;h=3Daee44c669bebe29bfdb8a1c86da443234f= 8bc257</a></span></div><div><span style=3D"-webkit-text-size-adjust: auto;">= <br></span></div><div><span style=3D"-webkit-text-size-adjust: auto;">It tri= es to format the filesystem with different features and options, then</span>= </div><div><span style=3D"-webkit-text-size-adjust: auto;">adds corruption f= rom both random data and copying parts of the</span></div><div><span style=3D= "-webkit-text-size-adjust: auto;">filesystem internally to some other part o= f the filesystem. It might be useful to corrupt some random bits and bytes i= n the filesystem also,</span></div><div><span style=3D"-webkit-text-size-adj= ust: auto;">but it doesn't do that today.</span></div><div><span style=3D"-w= ebkit-text-size-adjust: auto;"><br></span></div><div><span style=3D"-webkit-= text-size-adjust: auto;">There is also fsfuzzer, which writes random data to= the filesystem and</span></div><div><span style=3D"-webkit-text-size-adjust= : auto;">tries to mount it, but I don't know if that has been tried with e2f= sck. </span></div><div><span style=3D"-webkit-text-size-adjust: auto;">= <br></span></div><div><span style=3D"-webkit-text-size-adjust: auto;">The ot= her major question I have is why you are trying to create a new</span></div>= <div><span style=3D"-webkit-text-size-adjust: auto;">proprietary filesystem?= That is really a ten year effort, and you would</span></div><div><spa= n style=3D"-webkit-text-size-adjust: auto;">be much better off to use one of= the many existing filesystems. If</span></div><div><span style=3D"-webkit-t= ext-size-adjust: auto;">the current ones don't meet your exact needs, add th= e missing</span></div><div><span style=3D"-webkit-text-size-adjust: auto;">f= eatures you need instead of creating a whole new one from scratch.</span></d= iv><div><span style=3D"-webkit-text-size-adjust: auto;"><br></span></div><di= v><span style=3D"-webkit-text-size-adjust: auto;">While I'm a big fan of ext= 4, there are many other good filesystems out</span></div><div><span style=3D= "-webkit-text-size-adjust: auto;">there - XFS, Btrfs, ZFS, and several flash= filesystems. </span></div><div><br><span style=3D"-webkit-text-size-ad= just: auto;">Cheers, Andreas</span></div><div style=3D"-webkit-text-size-adj= ust: auto;"><br>On Jan 18, 2014, at 5:13, "Lakshmipathi.G" <<a href=3D"ma= ilto:[email protected]">[email protected]</a>> wrote:<br><b= r></div><blockquote type=3D"cite" style=3D"-webkit-text-size-adjust: auto;">= <div><div dir=3D"ltr">Hi - <br><div class=3D"gmail_quote"><div dir=3D"l= tr"><div><br></div><div>I'm searching for file system corruption tool, say i= t inject disk-errors like<br></div><div><div>multiply owned blocks etc. Late= r an integrity scan process (like e2fsck) will</div> <div>verify on-disk layout and fix these errors. </div><div><br></div><= div>I'd like to read/understand such tools before writing one for an proprie= tary</div><div>on-disk file system. </div><div><br></div> <div>Do we have such tools for ext{2,3,4}fs ? Thanks for any help or pointer= s!</div><span class=3D"HOEnZb"><font color=3D"#888888"><div><br></div></font= ></span></div><span class=3D"HOEnZb"><font color=3D"#888888"><div><span styl= e=3D"color:rgb(34,34,34)">-- </span><br> </div></font></span></div></div>----<br>Cheers,<br>Lakshmipathi.G<br>FOSS Pr= ogrammer.<br><a href=3D"http://www.giis.co.in" target=3D"_blank">www.giis.co= .in</a> </div> </div></blockquote><blockquote type=3D"cite" style=3D"-webkit-text-size-adju= st: auto;"><div><span>_______________________________________________</span>= <br><span>Ext3-users mailing list</span><br><span><a href=3D"mailto:Ext3-use= [email protected]">[email protected]</a></span><br><span><a href=3D"https://= www.redhat.com/mailman/listinfo/ext3-users">https://www.redhat.com/mailman/l= istinfo/ext3-users</a></span></div></blockquote></body></html>= --Apple-Mail-4557747F-3853-4ADC-BF1F-07D8F967B4C4-- --===============3408553349917961445== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Ext3-users mailing list [email protected] https://www.redhat.com/mailman/listinfo/ext3-users --===============3408553349917961445==--