If one drive is down and you just replaced it you would do a :
raidhotadd /dev/md? /dev/sd??
So if you have a mirror array setup:
/dev/md0 /dev/sda1 /dev/sdb1
And sdb1 dies.. You would put a new disk in and recreate the partitions then do
a:
raidhotadd /dev/md0 /dev/sdb1
then cat /proc/mdstat and the raid array should start rebuilding..
I've never used raidhotremove.. I presume it's the same syntax but you would
remove the drive from the RAID array as if it failed.
Lawrence Dickson wrote:
> All,
> Michael McLagan pointed me to you (see below) - how do I actually use a
> raidhotremove and raidhotadd - and do they really work? (I've been watching
> some recent stuff on linux-raid about mirroring which is why the second
> question.)
> Thanks,
> Larry Dickson
>
> At 03:01 AM 6/5/99 -0400, Michael McLagan wrote:
> >On Thu, 03 Jun 1999 16:16:06 -0700, Lawrence Dickson wrote:
> >
> >> In the raidtools-0.90-3 RPM, there are links suggestively named
> >>raidhotadd and raidhotremove to raidstart, but the man files and the howto
> >>don't seem to say anything about how hot swapping is done. Where can I get
> >>that information?
> >
> >
> >Well, I've used them, or at least one of them.
> >
> > raidhotadd <md device> <hdd partition>
> >
> >It alerts the kernel to a new disk, based on the configuration file in
> >/etc/raidtab whether it's a sparedisk or a raiddisk. The kernel then
> proceeds
> >to rebuild the array if necessary to accomodate the new disk.
> >
> >raidhotremove does the opposite, as far as I know. I believe it will
> leave a
> >raid5 in degraded mode until it's replaced. It didn't seem to work on raid1
> >arrays when I tried it, but that may well be a glitch.
> >
> >[EMAIL PROTECTED] has a list, send 'subscribe linux-raid' and you
> can
> >post additional questions there. I just happened to put the RPM together
> while
> >I was messing around getting the systems for Linux Online up.
> >
> >Hope that helps,
> >
> > Michael McLagan
> > Linux Online!
> > The first stop for Linux information on the net!
> >
> > V:(301)490-7245
> > F:(301)490-7162
> >