Re: init scripts problems ?

denis bonnenfant <[email protected]> Thu, 08 Dec 2005 10:06:56 +0100
Newsgroups gmane.linux.enbd.general
Message-ID <[email protected]>
Peter T. Breuer wrote:
> "Also sprach denis bonnenfant:"
> [Charset ISO-8859-1 unsupported, filtering to ASCII...]
> 
>>denis bonnenfant wrote:
>>
>>>Peter T. Breuer wrote:
>>>
>>>so it is normal to see that , as  md: unbind<nda> removes really nda 
>>>from the array.
>>>
>>>So the problem is clear enbd-client doesn't dies cleanly, raid problems 
>>>are just side-effects.
>>
>>but the problem occurs only when nda is referenced in an array...
> 
> 
> Seek out the changes made to bd_openers in the "openers patch", and
> instead of incrementing and decrementing by an extra one (++ and --), do
> a +=2 and -=2.
> 
> Just a guess.
> 

I tried with +1, +2, and nothing, and I can't see any change !

But I'm in doubt :

when killing enbd-client, nda is marked faulty by enbd. So it remains in the array. But in this case, it must be totally removed from the array, as 
everything related to enbd is going to be removed from the kernel. This is a deadlock.

So i think that in this case, one have to make md to really unbind nda before suppressing it. setting SET_FAULTY is not sufficient. But how to do that 
? One have to do the same as mdadm --remove /dev/md0 /dev/nda before really destroy nda