Re: init scripts problems ?
denis bonnenfant <[email protected]> Wed, 07 Dec 2005 17:49:16 +0100
| Newsgroups | gmane.linux.enbd.general |
|---|---|
| Message-ID | <[email protected]> |
Peter T. Breuer wrote:
> "Also sprach denis bonnenfant:"
> As I said - back out the tasklet patch.
>
Done.
It works pretty well, except
there is still the problem with raid :
when stopping client member of an array, it's ok : nda is faulted
ldap:~# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 nda[2](F) sda[0]
104768 blocks [2/1] [U_]
unused devices: <none>
starting client has a strange effect :
nda is removed from the array !
ldap:~# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sda[0]
104768 blocks [2/1] [U_]
unused devices: <none>
adding it again works :
ldap:~# mdadm --add /dev/md0 /dev/nda
mdadm: hot added /dev/nda
ldap:~# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 nda[1] sda[0]
104768 blocks [2/2] [UU]
unused devices: <none>
but now, array can't be stopped :
ldap:~# mdadm -S /dev/md0
mdadm: fail to stop array /dev/md0: Device or resource busy
even if i remove nda from it before.
ldap:~# mdadm --fail /dev/md0 /dev/nda
mdadm: set /dev/nda faulty in /dev/md0
ldap:~# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 nda[2](F) sda[0]
104768 blocks [2/1] [U_]
unused devices: <none>
I'm not pretty sure, but it looks like md is notified that client is restarted and is trying to
read sb on nda before the link is really active :
Dec 7 17:18:02 ldap kernel: md 1233: lock_rdev restores bdev 2b00000 rdev(ca8561c0)->bdev(cfee0040)
Dec 7 17:18:02 ldap kernel: ENBD #2469[2]: do_enbd_request device not enabled.
Dec 7 17:18:02 ldap kernel: md: disabled device nda, could not read superblock.
Dec 7 17:18:02 ldap kernel: md: nda has invalid sb, not importing!
Dec 7 17:18:02 ldap kernel: md 1243: unlock_rdev nulls bdev
Dec 7 17:18:02 ldap kernel: md: error, md_import_device() returned -22
Dec 7 17:18:02 ldap kernel: ENBD #81[0]: enbd_notify_md_device ioctl 2344 to raid devices returned -22
Dec 7 17:18:02 ldap kernel: ENBD #3895[10]: fixup_slot failed to find slot for pid 4594 ioctl MY_NBD_REG_BUF arg b7e53008 (0)
Dec 7 17:18:02 ldap kernel: ENBD #3787[16]: print_slot_pids device nda1 has pid 0
Dec 7 17:18:02 ldap kernel: ENBD #3787[17]: print_slot_pids device nda2 has pid 0
Dec 7 17:18:02 ldap kernel: ENBD #4121[0]: enbd_ioctl REG_BUF called on full device nda
Dec 7 17:18:02 ldap enbd-client: enbd-client: client (1) read passwd ok from se3-croise:12356
Dec 7 17:18:02 ldap enbd-client: enbd-client: client (1) got cliserv magic ok from se3-croise:12356
Dec 7 17:18:02 ldap enbd-client: enbd-client: client (1) got a signature ok from se3-croise:12356
Dec 7 17:18:02 ldap enbd-client: enbd-client: client (1) enters setsig
Dec 7 17:18:02 ldap enbd-client: enbd-client: client (1) set sig uses whole disk, wants slot 2
Dec 7 17:18:02 ldap enbd-client: enbd-client: client (1) set sig or passed sigchk OK
Dec 7 17:18:02 ldap enbd-client: enbd-client: client (1) sig matched OK
Dec 7 17:18:02 ldap enbd-client: enbd-client: client (1) begins main loop
So the md is still connected to a dead nbd client, and the new one is not able to talk with md, resulting to this mismatch, as the dead client is
still referenced by md array, with pending requests preventing from stopping the array.
Note thas this analysis is not based on study of the code, just exeriments, so maybe i'm completly wrong!
Is there a way to get more info about md device, to know exactly why it is stuck ?