linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Freemyer <greg.freemyer@gmail.com>
To: Rogier Wolff <R.E.Wolff@bitwizard.nl>
Cc: Eric Sandeen <sandeen@redhat.com>,
	Daniel Taylor <Daniel.Taylor@wdc.com>,
	linux-ext4@vger.kernel.org
Subject: Re: breaking ext4 to test recovery
Date: Tue, 29 Mar 2011 13:33:51 -0400	[thread overview]
Message-ID: <AANLkTinJ4-PPTi0q76fThmq9a_qe1PadVueObPtRLruY@mail.gmail.com> (raw)
In-Reply-To: <20110329143305.GA6057@bitwizard.nl>

On Tue, Mar 29, 2011 at 10:33 AM, Rogier Wolff <R.E.Wolff@bitwizard.nl> 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-03-29 17:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-29  2:45 breaking ext4 to test recovery Daniel Taylor
2011-03-29  3:10 ` Tao Ma
2011-03-29 13:50 ` Eric Sandeen
2011-03-29 14:33   ` Rogier Wolff
2011-03-29 17:33     ` Greg Freemyer [this message]
2011-03-29 22:26       ` Daniel Taylor
2011-03-29 22:33         ` Eric Sandeen
2011-03-31 22:11     ` Andreas Dilger
2011-03-31 22:22       ` Andreas Dilger
2011-03-31 22:21   ` Andreas Dilger
2011-03-31 22:44     ` Eric Sandeen
2011-04-01 15:26       ` Lukas Czerner
2011-04-01 15:52         ` Ric Wheeler
2011-04-02  2:15       ` Andreas Dilger
2011-04-02 12:38         ` Ric Wheeler
2011-04-02 18:50           ` Andreas Dilger
2011-04-03  2:37           ` Tao Ma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTinJ4-PPTi0q76fThmq9a_qe1PadVueObPtRLruY@mail.gmail.com \
    --to=greg.freemyer@gmail.com \
    --cc=Daniel.Taylor@wdc.com \
    --cc=R.E.Wolff@bitwizard.nl \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).