All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc MERLIN <marc_news@merlins.org>
To: Dan Williams <dan.j.williams@gmail.com>
Cc: linux-raid@vger.kernel.org, richard@sauce.co.nz
Subject: Re: mdadm create corrupted md data?
Date: Tue, 6 May 2008 23:56:57 -0700	[thread overview]
Message-ID: <20080507065657.GA21697@merlins.org> (raw)
In-Reply-To: <e9c3a7c20805062238l36674d8akffda7ea9aec78371@mail.gmail.com>

On Tue, May 06, 2008 at 10:38:27PM -0700, Dan Williams wrote:
> >  During my first post, and up to this mornhing, I had:
> >  Layout : left-symmetric
> >  Chunk Size : 64K
> >  md5 : active raid5 sdf1[0] sdc1[3] sdg1[2] sde1[1]
> >       1953535744 blocks level 5, 64k chunk, algorithm 2 [5/4] [UUUU_]
> >
> >  gargamel:~# cat /proc/mdstat | grep -1 md5 | tail -n+2
> >  md5 : active raid5 sdg1[3] sdf1[2] sde1[1] sdc1[0]
> >       1953535744 blocks level 5, 64k chunk, algorithm 2 [5/4] [UUUU_]
> 
> You may have created the array with a different disk order than when
> the array was originally created.  It would help if you had a dump of
> the original superblocks.  I'm guessing your original array might have
> been the following order "/dev/sdc1 missing /dev/sde1 /dev/sdf1
> /dev/sdg1"  where your last attempt changed this order to "/dev/sdc1
> /dev/sde1 /dev/sdf1 /dev/sdg1 missing"... however this assumes that
> the device names haven't changed.

Doh! I feel so silly considering how blindingly obvious this is now
now that you mention it :)

Yes, that was of course my problem, and the correct order of the drives
was shown as numbers in the first mdstat:
The winning command was therefore:
mdadm --create /dev/md5 --level=5 --raid-devices=5  /dev/sdf1 /dev/sde1 /dev/sdg1 /dev/sdc1 missing
or
mdadm --create /dev/md5 --level=5 --raid-devices=5  /dev/sdf1 missing /dev/sdg1 /dev/sdc1 /dev/sdd1

After that, I get my pv back, and my VG.

I did try an e2fsck -f -n -C 0 /dev/dshelf2/space when in the configuration
with sdd1 (i.e. the drive I first tried to rebuild parity on, until I found
out it was sde1 that had bad sectors), and it is showing some pretty scary
errors that probably show that my fs is mostly toast if I elect to use sdd1
instead of sde1.
Considering that sde1 is the soon to be dead drive, I guess backups is where
I go next.

I'm however surprised that rebuilding parity on sdd1 wasn't effectively a
no-op since sde1 only had one bad sector, about 100GB from its beginning,
and that rebuilding parity on sdd1 caused some no trivial FS damage.

Oh well...

If I can provide more useful info before I rebuild this array altogether,
let me know.

Thanks,
Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/  

  reply	other threads:[~2008-05-07  6:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-06  5:48 how to recreate a raid5 array with n-1 drives? Marc MERLIN
2008-05-06  7:17 ` Richard Scobie
2008-05-06 23:08 ` mdadm create corrupted md data? Marc MERLIN
2008-05-07  5:38   ` Dan Williams
2008-05-07  6:56     ` Marc MERLIN [this message]
2008-05-07  9:29       ` David Greaves
2008-05-07 15:08         ` Marc MERLIN

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=20080507065657.GA21697@merlins.org \
    --to=marc_news@merlins.org \
    --cc=dan.j.williams@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=richard@sauce.co.nz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.