opensubscriber
   Find in this group all groups
 
Unknown more information…

l : linux-raid@vger.kernel.org 9 April 2008 • 1:25AM -0400

Re: Re-assembling a software RAID in which device names have changed.
by Michael Tokarev

REPLY TO AUTHOR
 
REPLY TO GROUP




Sean H. wrote:
> To preface, I'm a fairly new Linux user, and have little experience
> with RAID. I've taken this question several places and have yet to get
> an answer which solves my problem, so I figured I'd come to the
> experts.
>
> I have a five-disk RAID 5, and one of the disks is failing. Every few
> days it'll start buzzing, and will continue buzzing until the drive is
> forced to spin down and back up, by either a restart or suspending to
> RAM.
>
>  Now, today, I wanted to determine which disk was failing, so I
> unmounted my array and unplugged drives - Specifically, three. The
> third was the culprit, and I plugged the drives back in and rebooted.
>
>  The gift, or in this case, curse of my motherboard is that it
> supports hot-swapping of SATA drives. So the drives didn't just
> disappear inside the OS and reappear after a reboot. They disappeared
> and re-appeared in the OS with incorrect /dev/sd* locations, and then
> I rebooted.
>
>  I was unable to boot until I removed the line detailing the array
> from my fstab. Now, when I manually 'mdadm --assemble /dev/md0' mdadm
> finds the two untouched drives, then stops and tells me that they're
> not enough to start the array.
>
>  So... How can I reassemble the array without knowing what order the
> drives are in?

Don't list individual component devices in mdadm.conf.
Use array UUIDs instead.

I.e., instead of:

--- WRONG ---
ARRAY /dev/md1 devices=/dev/sda1,/dev/sdb1,/dev/sdc1
--- WRONG ---

use this:

--- RIGHT ---
ARRAY /dev/md1 UUID=11111111:22222222:33333333:44444444
--- RIGHT ---

Or use modern ways to assemble the arrays - such as homehost
(requires version 1 superblock).

In either case mdadm will find the relevant components (assuming
DEVICE line in mdadm.conf is correct) and figure out the right
order.

/mjt
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.