[volunteers] RAID array rework

Rick Moen rick at linuxmafia.com
Mon Mar 19 14:33:49 PST 2007


Quoting Paul Reiber (reiber at gmail.com):

> I've tried to do the "destroy" part to no avail.  Can't seem to get
> mdadm to throw away the mirrors we made.  Once we're past that
> the rest should be pretty straightforward.

Er, you seem to have omitted detailing what you tried, so it's difficult
to understand what is going wrong.  You know, do the commands in a
terminal window, and copy/paste into your e-mail the relevant portion of
the command session.  Help us help you.

What happens if you just ignore the existing stripe information stored on
those drives and try to create new stripe sets using mdadm's "create"
mode?

If mdadm is actually balking at so doing, which would seem a really odd
thing for it to do, then wouldn't it suffice to just overwrite the first
few sectors of the drive using "dd"?  I mean, what happens after you do
that?  That's the natural way to zero out troublesome data on a hard
drive, right?


In case it will help others, here's what I wrote when you asked me about
this stuff a few weeks ago, in private mail:

> Can you help me construct the right set of commands to
> convert that mess into what it should be now?

Er, sorry to say, I have almost zero experience with the mdadm utility,
so I'm a bit at sea about details of its proper use.  Literally the only
time I've created an "md" driver array, I used the Debian "etch" 4.0
installer to do it, rather than wielding mdadm from the command line.
(I _do_ have a lot of experience with RAID at a prior firm, but it was
always hardware RAID.)

So, any "recipe" I attempt to conjure out of thin air is extremely
likely to be missing some essential steps, among other things.  For
example, can I just ignore what's currently on the drives and do "mdadm -C"
to create fresh array data?  I have no idea (though I do suspect one
can).

I'm unclear on how many good drives are now in the VA Linux model 9008
JBOD (but you would know).  For purposes of this mail, let's assume 8,
and that we're creating a single 6-drive RAID array with 2 spare drives.
I'll assume that /dev/sda through /dev/sdh each have a single partition
taking up the whole drive, having partition type "fd" (Linux raid
autodetect).

# mknod /dev/sdh1 b 8 113  ## You already did this step.
# mdadm --create --verbose /dev/md0 --level=5 --raid-devices=6 --spare-devices=2
 --chunk=256 /dev/sd[a-h]1
# mdadm --detail --scan >> /etc/mdadm/mdadm.conf
# mkfs.ext3 -b 4096 -R stride=8 /dev/md0

Then, create a mountpoint (/media/jbod, or whatever), mount it, and add
an appropriate line for /dev/md0 to /etc/fstab.

But I should stress that I really don't know what I'm doing, so the
above may have some holes in it.  I'm guesstimating that it's basically
right, though.





More information about the volunteers mailing list