On Mon, 2007-06-25 at 11:49 +0200, Carlos E. R. wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> The Sunday 2007-06-24 at 23:06 -0400, James Knott wrote:
> 
> 
> > netfinity:~ # mdadm --add /dev/md0 /dev/sdd2
> > mdadm: add new device failed for /dev/sdd2 as 4: Invalid argument
> > 
> > If I now reboot, I'll be able to add the drive, using the same command,
> > like so.
> 
> I would say that the kernel does not support hot swapping of disks. In 
> fact, I read time ago it didn't and was work in progress. I don't know 
> what is the current state.

The kernel does indeed support hot swapping. However, the quality of
this depends on the underlying hardware. For example, the intel ICHx
chips require that there be a disk in the machine when it is powered on.
After that you can hotswap.  Don't forget the hotplug option
in /etc/fstab (or wherever you put the mount options). Also, the ICHx
chipset seems to require time to sense that a swap has indeed happened.
So I always:

1. umount the disks to be removed.

2. remove the disks

3. wait, say, 30 seconds. During this time you should see messages
in /car/log/messages that the disks have been removed. If you are using
intel ICHx chips, you may even see messages about disks being removed
and waiting for the hardware to calm down.

4. insert the new disks.

I do this in a system with 4 swappable SATA disks. I think it requires a
kernel newer that 2.6.17. Otherwise you need to update the libata in
your kernel to a newer version. Hotswapping (intel ICHx at least) did
not really work in kernels older than 2.6.17.

I do no know about hot swapping on other hardware. My understanding is
that in most hardware it works ok. Only the intel ICHx stuff is
problematic to some odd hardware quirks.

One more thing: I have a udev rule so my SATA disks have the same kernel
name when they are put in the same physical slot (I have 4 removable
SATS disks bays). If you do not have this, sdd can become sde (and so
on) after a swap. /var/log/messages tells what the inserted disk is
known as. Perhaps it is as simple as that.

> 
> - -- 
> Cheers,
>        Carlos E. R.
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (GNU/Linux)
> Comment: Made with pgp4pine 1.76
> 
> iD8DBQFGf4/ntTMYHG2NR9URAsXRAJ0ft2C+Rjsr5XrOc9yyx9E5Z7HiNACbBMKv
> AufTjctO9G3gujccqtriZHk=
> =8fcA
> -----END PGP SIGNATURE-----
> 
-- 
Roger Oberholtzer

OPQ Systems / Ramböll RST

Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to