Re: init scripts problems ?

denis bonnenfant <[email protected]> Mon, 05 Dec 2005 16:06:52 +0100
Newsgroups gmane.linux.enbd.general
Message-ID <[email protected]>
Peter T. Breuer wrote:
> "Also sprach denis bonnenfant:"
> 
>>I managed to crash it again !
>>
>>I set up the double link, create a fr1 array on A-2, mount,
>>
>>then /etc/init.d/enbd stop client, stopping both
>>
>>It seems to work, nda is out of raid. but enbd-client is not killed.
> 
> 
> Well, one would like to see the state of the client at this point.
> 
> 
> 
>>echo 0 > /proc/nbdinfo does nothing
> 
> 
> It always does something - it will produce kernel output. If you really
> see nothing, then the kernel is dead!
> 
> 
>>mdadm /dev/md0 --add /dev/nda is blocked, and there is no way out.
> 
> 
> echo 0 always works.
> 
> 
>>ps ax :
>>
>>  3776 ?        D      0:04 [enbd-client]
>>  3777 ?        D      0:04 [enbd-client]
>>  3975 pts/0    D      0:00 enbd-client se3-croise 12355 -i A-2 -n 2 -m -b 512 /dev/nda
>>  3982 pts/0    D+     0:00 mdadm /dev/md0 --add /dev/nda
>>  4094 tty1     D      0:00 enbd-client se3-croise 12355 -i A-2 -n 2 -m -b 512 /dev/nda
>>
> 
> 
> Need ps axl (note the "l")! That will show what they are doing.
> 
> 
>>it's really stange, it looks like nda is registered as ndb in the kernel !
>>
>>dmesg :
>>
>>ENBD #2251[35]: enbd_clr_queue unqueued 0 reqs
>>ENBD #3288[32]: enbd_soft_reset INVALIDATE DEVICE nda BEGIN
>>ENBD #3302[28]: enbd_soft_reset INVALIDATE DEVICE nda DONE
>>ENBD #3315[28]: enbd_soft_reset run enbd_request on nda
>>ENBD #3193[18]: enbd_disable disabled device ndb
>>ENBD #2251[36]: enbd_clr_queue unqueued 0 reqs
>>ENBD #3288[33]: enbd_soft_reset INVALIDATE DEVICE ndb BEGIN
>>ENBD #3292[4]: enbd_soft_reset invalidate would crash on device 00000000 with inode 00000000
>>ENBD #3293[4]: enbd_soft_reset aborting invalidate
> 
> 
> Well, there you were saved by the patch I gave you. bdev is NULL for
> nbd, as inferred from your OOPS output.
> 
> 
>>ldap:~# cat /proc/nbdinfo
>>Device a:       Open
>>[a] State:      verify, rw, disabled, last error 0, lives 11, bp 0
> 
> 
> Strange - has been stopped and started 11 times!
> 
> When you get it stuck, show the ps axl.
> 

here i am  : this time just one link :
link + fr1 array agin...
enbd stop client :

before echo 0 :

5     0  2992     1  15   0  1992 1004 sync_p D    ?          0:00 enbd-client se3-croise 12355 -i A-2 -n 2 -m -b 512 /dev/nda
1     0  3118     1  15   0     0    0 md_thr S    ?          0:00 [md0_raid1]

after echo 0 :

it works, this time...

md: error, md_import_device() returned -22
ENBD #81[0]: enbd_notify_md_device ioctl 2344 to raid devices returned -22
ENBD #2664[3]: enbd_clr_sock enabled device nda
ENBD #2251[8]: enbd_clr_queue unqueued 1 reqs
ENBD #2251[9]: enbd_clr_queue unqueued 0 reqs
ENBD #3288[7]: enbd_soft_reset INVALIDATE DEVICE nda BEGIN
ENBD #3292[0]: enbd_soft_reset invalidate would crash on device 00000000 with inode 00000000
ENBD #3293[0]: enbd_soft_reset aborting invalidate

i can't reproduce the problem again !