Re: init scripts problems ?
denis bonnenfant <[email protected]> Wed, 07 Dec 2005 22:31:39 +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...]
>
>>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 :
>
>
> I'll have to investigate that in the coming days. Anything you can do
> to get the problem down to a minimal configuration would be useful -
> plus all the data available about the problem state, of course.
>
>>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 !
>
>
> Well, one would want to know if the HOT_ADD ioctl is sent from nbd.
> Grep in the enbd source ofr HOT_ADD and add some printks nearby if there
> aren't any.
>
I add some debug messages near HOT_ADD and SET_FAULTY
the client stop :
ENBD #4434[0]: enbd_release (1): erasing slot pid 3197
ENBD #3193[0]: enbd_disable setting nda faulty
ENBD #74[0]: enbd_notify_md_device notifying 2345 for 2b:0 to raid devices via fn
raid1: Disk failure on nda, disabling device.
Operation continuing on 1 devices
raid1: bitmap cb3d7480 already active!
md0: md_check_recovery 2: repair bit 0 on sb cbaa9540 preserved
RAID1 conf printout:
--- wd:1 rd:2
disk 0, wo:0, o:1, dev:sda
disk 1, wo:1, o:0, dev:nda
ENBD #2251[0]: enbd_clr_queue unqueued 0 reqs
RAID1 conf printout:
--- wd:1 rd:2
disk 0, wo:0, o:1, dev:sda
ENBD #3286[0]: enbd_soft_reset INVALIDATE DEVICE nda BEGIN
ENBD #3300[0]: enbd_soft_reset INVALIDATE DEVICE nda DONE
ENBD #3313[0]: enbd_soft_reset run enbd_request on nda
ENBD #4434[1]: enbd_release (0): erasing slot pid 3196
md: md0 still in use.
ldap:~# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sda[0] nda[2](F)
104768 blocks [2/1] [U_]
unused devices: <none>
ldap:~# mdadm -S /dev/md0
mdadm: fail to stop array /dev/md0: Device or resource busy
ldap:~# lsmod
Module Size Used by
raid1 21504 1
bitmap 8068 1 raid1
md 51680 1 raid1
enbd_ioctl 5632 0
enbd 197272 2 enbd_ioctl
It clearly shows that nda is correctly set faulty, but there is something pending.
I rmmod enbd_ioctl, but enbd module is still in use :
ldap:~# lsmod
Module Size Used by
raid1 21504 1
bitmap 8068 1 raid1
md 51680 1 raid1
enbd 197272 1
here is a clean md stop sequence :
md: unbind<nda>
md: export_rdev(nda)
md 1243: unlock_rdev nulls bdev
md: WARNING: delaying free of exported rdev cb36e4c0
md0: notifying dev 800000 it is no longer in array
now the bad one, at the beginning of the client start (md is already locked) :
md: unbind<nda>
md: export_rdev(nda)
md 1243: unlock_rdev nulls bdev
ENBD #3193[2]: enbd_disable setting nda faulty
ENBD #2251[2]: enbd_clr_queue unqueued 0 reqs
ENBD #3286[2]: enbd_soft_reset INVALIDATE DEVICE nda BEGIN
ENBD #3300[2]: enbd_soft_reset INVALIDATE DEVICE nda DONE
ENBD #3313[2]: enbd_soft_reset run enbd_request on nda
ENBD #4434[2]: enbd_release (0): erasing slot pid 3592
md: WARNING: delaying free of exported rdev cb9be640
ldap:~# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sda[0]
104768 blocks [2/1] [U_]
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.
>
>>ldap:~# cat /proc/mdstat
>>Personalities : [raid1]
>>md0 : active raid1 sda[0]
>> 104768 blocks [2/1] [U_]
>
>
> Curious. I wuld have to look in the md code to see why. It's the
> md_seq_show() code in md.c
>
> if (mddev->pers || mddev->raid_disks || !list_empty(&mddev->disks)) {
> seq_printf(seq, "%s : %sactive", mdname(mddev), mddev->pers ? "" : "in");
>
>
> Then there's a
>
> ITERATE_RDEV(mddev,rdev,tmp2) {
> char b[BDEVNAME_SIZE];
> seq_printf(seq, " %s[%d]", ...
>
>
> And there's NO WAY of skipping printing something in my code. Therefore
> the kernel is kaput. My code alwas has at least
>
> seq_printf(seq, " %s[%d]",
> bdevname(rdev->bdev,b), rdev->desc_nr);
> if (rdev->faulty) {
> seq_printf(seq, "(F)");
> continue;
> }
>
> so it can't skip. Care to look at yours?
>
It's the same