Re: /dev/sda

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, Dec 6, 2011 at 12:28 PM,  <m.roth@xxxxxxxxx> wrote:
> We're just using Linux software RAID for the first time - RAID1, and the
> other day, a drive failed. We have a clone machine to play with, so it's
> not that critical, but....
>
> I partitioned a replacement drive. On the clone, I marked the RAID
> partitions on /dev/sda failed, and remove, and pulled the drive. After
> several iterations, I waited a minute or two, until all messages had
> stopped, and there was only /dev/sdb*, and then put the new one in... and
> it appears as /dev/sdc. I don't want to reboot the box, and after googling
> a bit, it looks as though I *might* be able to use udevadm to change
> that... but the manpage leaves something to be desired... like a man page.
> The one that appears interesting to me is udevadm --test
> --action=<string>... and the actual command that would run, but there is
> *ZERO* information as to what actions are available, other than the
> default of "add".
>
> Clues for the poor, folks?

If your drive controllers support hot-swap, a freshly swapped drive
should appear at the lowest available sd? letter, and a removed one
should disappear fairly quickly leaving its identifier available for
re-use.     But, the disk name does not matter at all.  Put the disk
in, do a 'dmesg' to see the name the kernel picks for it, add the
matching partition and mark it as type 'FD' for future autoassembly.
Do a 'cat /proc/mdstat' to see the current raid status.  You probably
need to 'mdadm --remove /dev/md? /dev/sd?'  to remove the failed
partition from the running array.  Then use 'madam --add /dev/md?
/dev/sd? ' with the raid device and new partition names.  This will
start the mirror sync and should be all you need to do.   Then,
assuming you are using kernel autodetect  to assemble at boot time, it
won't matter if the disk is recognized as the same name at bootup, it
will still be paired correctly.

-- 
  Les Mikesell
    lesmikesell@xxxxxxxxx
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux