On Mon, Feb 04, 2008 at 10:38:40PM +0100, MAYER Andreas wrote:
> I think I found the reason why hwup for zfcp does not trigger udev after
> IPL or hwdown.
>
> uevents are only sent the first time a zfcp device is set online (by
> using chccwdev -e <device> or echo 1 >
> /sys/bus/ccw/drivers/zfcp/<device>/online).
> UEVENT[1202158019.941076] add@/class/scsi_host/host3
> UEVENT[1202158019.941109] add@/class/fc_host/host3
> UDEV  [1202158019.945024] add@/class/fc_host/host3
> UDEV  [1202158019.980446] add@/class/scsi_host/host3
>
> After setting the device offline (by using chccwdev -d <device> or echo
> 0 > /sys/bus/ccw/drivers/zfcp/<device>/online) uevents are not triggered
> again and the device is still listed by lszfcp as it would be still
> available.
> <device> host3
>
> So because no uevent is triggered when setting the device online again
> no targets and luns get configured.
>
> The question now is why the device is still listed by lszfcp and why no
> event is triggered when setting the device back online?
> It appears that fc_host and scsi_host for the device remain registered.
> Any ideas how to remove this registration?

In short, the behaviour should be the same for the latest SLES9 update
kernel and the latest SLES10 update.

zfcp does not create any udev/hotplug events. Related events are:
 - The CCW device is attached to the system
 - The CCW device is removed from the system.
 - A SCSI host adapter is registered from zfcp.
 - The SCSI host adapter is removed from zfcp.

Setting the CCW device online or offline does not generate
udev/hotplug events.

You might observe the fact that in old SLES9 kernels, the SCSI host
adapter for zfcp was registered when setting the CCW device online and
unregistered when setting the CCW device offline. This was changed, so
that setting the CCW device offline, does not remove the SCSI host
adapter. The change was necessary, because going through the sequence
"offline adapter" -> "online adapter" has to present the same SCSI
devices to not confuse the multipathing layer.

Detaching and reattaching the subchannel should trigger the proper
events for the hwup and hwdown scripts.

As an alternative, i would suggest putting the FCP adapters, ports and
LUNs in some simple scripts, that do not rely on hotplug events. All
that is required is a sequence like:
echo 1 > /sys/bus/ccw/drivers/zfcp/0.0.181d/online
echo 0x500507630303c562 > /sys/bus/ccw/drivers/zfcp/0.0.181d/port_add
echo 0x401040C300000000 > 
/sys/bus/ccw/drivers/zfcp/0.0.181d/0x500507630303c562/unit_add
echo 0x401040C400000000 > 
/sys/bus/ccw/drivers/zfcp/0.0.181d/0x500507630303c562/unit_add

--
Christof Schmitt

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to