James Knott wrote:
> Rui Santos wrote:
>> Rui Santos wrote:
>>   
>>> James Knott wrote:
>>>     
>>>> I've now got SUSE 10.2 set up with RAID and LVM on my server.  However,
>>>> I don't seem to be able to re-add a "failed" drive, without rebooting. 
>>>> The drives are hot-swapable.  When I use the command mdadm  /dev/md0/
>>>> -add /dev/sdxx I get a "device busy" error message.  Even removing the
>>>> drive with the --remove option, before the add command doesn't help.  I
>>>> still have to reboot to add the drive.  Is there something I'm missing?
>>>>       
>>> If a drive/partition is marked as "failed", you need to remove it from
>>> the RAID first with:
>>>     
>> Sorry - forgot this:
>>
>> mdadm --manage --set-faulty /dev/mdx /dev/sdxx
>>
>>   
>>> mdadm --manage --remove /dev/mdx /dev/sdxx
>>>
>>> Then you can add it again with:
>>>
>>> mdadm --manage --add /dev/mdx /dev/sdxx
>>>
>>> Hope it helps.
>>>
>>>     
>>>> tnx jk
>>>>
>>>>       
>>   
> If I go through the --set-faulty, --fail, --add sequence from the
> command line, I have no problem adding the drive back.  However, if I
> simulate a drive failure by pulling the drive, that sequence fails with
> the error message "mdadm: add new device failed for /dev/sdd2 as 4:
> Invalid argument".  If I then reboot the computer, I can then use --add
> to add the drive again.  So, there appears to be some difference between
> using commands to remove a drive and an actual hardware failure.

The --set-faulty and --fail options are the same... if you say you can
execute a --set-faulty, then re-add the device, that is new for me.

About you pulling out a hot-swap device, the device should be considered
failed at that time. Before you add the drive back into the slot, do you
 use the --remove option on the already removed drive...at that time it
should still be a part of the RAID but, in faulty mode. You have to firt
remove it by issuing 'mdadm --manage --remove /dev/mdx /dev/sdxx'. Have
you done this?

Only then you're able to plug the device back in and re-add the device.

At least that's how I use it... never tryed on hot-swap though, but the
--set-faulty is supposed to do just that.

There's one other issue: The kernel driver of the device you use should
be able to disconnect and re-connect the device cleanly. Check 'dmesg'
to see if it happens as it should...


> 
> 
> 

-- 
Rui Santos
http://www.ruisantos.com/

Veni, vidi, Linux!
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to