linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Moron Destroyed RAID6 Array Superblocks
@ 2007-04-08  4:10 Aaron C. de Bruyn
  0 siblings, 0 replies; 5+ messages in thread
From: Aaron C. de Bruyn @ 2007-04-08  4:10 UTC (permalink / raw)
  To: linux-raid

Ok--I'm a moron.
Long story short, I was messing around with my RAID6 array and I managed
to screw up two of the drives in my 7-drive 1-spare array.
I had problems in the middle of a kernel upgrade and I kept getting
errors about various drives having bad superblocks.

So without knowing much about what I was doing, I did a
--zero-superblock on all the drives in the array.
So now I can't reassemble the array.

After reading through the linux-raid archives I have been lead to
believe that I can recover my array by doing a --create and listing the
7 drives in the exact order I originally created them in.  Is this correct?

If so, the kernel upgrade managed to shuffle the drive names around...is
there any way I can figure out what order they should be in?


-A

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Moron Destroyed RAID6 Array Superblocks
@ 2007-04-08 15:21 Andrew Burgess
  2007-04-14  2:59 ` Aaron C. de Bruyn
  2007-04-14  6:42 ` Aaron C. de Bruyn
  0 siblings, 2 replies; 5+ messages in thread
From: Andrew Burgess @ 2007-04-08 15:21 UTC (permalink / raw)
  To: aaron, linux-raid

>After reading through the linux-raid archives I have been lead to
>believe that I can recover my array by doing a --create and listing the
>7 drives in the exact order I originally created them in.  Is this correct?

>If so, the kernel upgrade managed to shuffle the drive names around...is
>there any way I can figure out what order they should be in?

If you know the old order just boot the old kernel and recreate there

If you are using kernel rpms, you always want to 'install' new kernels
and not 'upgrade', that keeps both the old and new kernel available.

Otherwise, if you pick just 5 for the 7 drives from a raid 6 array
it seems to me you have 5 factorial combinations = 120. You could write
a script that tries them all and then tests by trying a read-only mount?

Good luck. I mashed a 3.5 TB array once by rerunning the lvm
creation which zeros the first chunk of the resulting device. I was
used to mdadm not hurting user data when creating. Grrr.

BTW when you test recreate the array make sure you dont start syncing, thats
another reason to just use 5 drives.

HTH


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Moron Destroyed RAID6 Array Superblocks
  2007-04-08 15:21 Moron Destroyed RAID6 Array Superblocks Andrew Burgess
@ 2007-04-14  2:59 ` Aaron C. de Bruyn
  2007-04-14  7:28   ` Corey Hickey
  2007-04-14  6:42 ` Aaron C. de Bruyn
  1 sibling, 1 reply; 5+ messages in thread
From: Aaron C. de Bruyn @ 2007-04-14  2:59 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: linux-raid

Ok--I got moved in to my new place and am back and running on the 'net.
I sat down for a few hours and attempted to write a script to try all
possible combinations of drives...but I have to admit that I'm lost.

I have 8 drives in the array--and I can output every possible
combination of those.  But what the heck would be the logic to output
all combinations of the 8 drives using only 6 at a time?  My head hurts.

-A

On Sun, 2007-04-08 at 08:21 -0700, Andrew Burgess wrote:
> >After reading through the linux-raid archives I have been lead to
> >believe that I can recover my array by doing a --create and listing the
> >7 drives in the exact order I originally created them in.  Is this correct?
> 
> >If so, the kernel upgrade managed to shuffle the drive names around...is
> >there any way I can figure out what order they should be in?
> 
> If you know the old order just boot the old kernel and recreate there
> 
> If you are using kernel rpms, you always want to 'install' new kernels
> and not 'upgrade', that keeps both the old and new kernel available.
> 
> Otherwise, if you pick just 5 for the 7 drives from a raid 6 array
> it seems to me you have 5 factorial combinations = 120. You could write
> a script that tries them all and then tests by trying a read-only mount?
> 
> Good luck. I mashed a 3.5 TB array once by rerunning the lvm
> creation which zeros the first chunk of the resulting device. I was
> used to mdadm not hurting user data when creating. Grrr.
> 
> BTW when you test recreate the array make sure you dont start syncing, thats
> another reason to just use 5 drives.
> 
> HTH
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Moron Destroyed RAID6 Array Superblocks
  2007-04-08 15:21 Moron Destroyed RAID6 Array Superblocks Andrew Burgess
  2007-04-14  2:59 ` Aaron C. de Bruyn
@ 2007-04-14  6:42 ` Aaron C. de Bruyn
  1 sibling, 0 replies; 5+ messages in thread
From: Aaron C. de Bruyn @ 2007-04-14  6:42 UTC (permalink / raw)
  To: Andrew Burgess; +Cc: linux-raid

If the array consisted of 7 drives, two of them would be parity and I'd
need to leave them out of the array in order to avoid resyncing.

Would I need to specify them as 'missing' so the drives are in the
correct order?

For example
mdadm --raid-devices=7 --level=6 --foo /dev/md0 /dev/sda1 /dev/sdc1
missing /dev/sdb1 /dev/sdg1 missing /dev/sdh1

Or alternatively with the --assume-clean switch, should I specify all 7
drives and see if it mounts?

-A


On Sun, 2007-04-08 at 08:21 -0700, Andrew Burgess wrote:
> >After reading through the linux-raid archives I have been lead to
> >believe that I can recover my array by doing a --create and listing the
> >7 drives in the exact order I originally created them in.  Is this correct?
> 
> >If so, the kernel upgrade managed to shuffle the drive names around...is
> >there any way I can figure out what order they should be in?
> 
> If you know the old order just boot the old kernel and recreate there
> 
> If you are using kernel rpms, you always want to 'install' new kernels
> and not 'upgrade', that keeps both the old and new kernel available.
> 
> Otherwise, if you pick just 5 for the 7 drives from a raid 6 array
> it seems to me you have 5 factorial combinations = 120. You could write
> a script that tries them all and then tests by trying a read-only mount?
> 
> Good luck. I mashed a 3.5 TB array once by rerunning the lvm
> creation which zeros the first chunk of the resulting device. I was
> used to mdadm not hurting user data when creating. Grrr.
> 
> BTW when you test recreate the array make sure you dont start syncing, thats
> another reason to just use 5 drives.
> 
> HTH
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Moron Destroyed RAID6 Array Superblocks
  2007-04-14  2:59 ` Aaron C. de Bruyn
@ 2007-04-14  7:28   ` Corey Hickey
  0 siblings, 0 replies; 5+ messages in thread
From: Corey Hickey @ 2007-04-14  7:28 UTC (permalink / raw)
  To: Aaron C. de Bruyn; +Cc: linux-raid

Aaron C. de Bruyn wrote:
> Ok--I got moved in to my new place and am back and running on the 'net.
> I sat down for a few hours and attempted to write a script to try all
> possible combinations of drives...but I have to admit that I'm lost.
> 
> I have 8 drives in the array--and I can output every possible
> combination of those.  But what the heck would be the logic to output
> all combinations of the 8 drives using only 6 at a time?  My head hurts.

You want only 5 at a time, don't you?
8 drives - 1 spare - 2 parity = 5

Anyway, a very quick-n-dirty way to get what you want is to:
1. calculate all permutations
2. strip away the last items of each permutation
3. get rid of duplicate lines

$ wget http://hayne.net/MacDev/Perl/permutations
$ perl permutations a b c d e f g h | cut -d' ' -f-5 | sort -u

The Perl script above is from:
http://hayne.net/MacDev/Perl/

-Corey

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-04-14  7:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-08 15:21 Moron Destroyed RAID6 Array Superblocks Andrew Burgess
2007-04-14  2:59 ` Aaron C. de Bruyn
2007-04-14  7:28   ` Corey Hickey
2007-04-14  6:42 ` Aaron C. de Bruyn
  -- strict thread matches above, loose matches on Subject: below --
2007-04-08  4:10 Aaron C. de Bruyn

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).