[OmniOS-discuss] Bug: OmniOS r151008j terminates iSCSI initiator too early in shutdown

Jim Klimov jimklimov at cos.ru
Sat Mar 8 11:50:07 UTC 2014


On 2014-03-07 21:49, Chris Siebenmann wrote:
>   In at least OmniOS r151008j, the iSCSI initiator and thus any iSCSI
> disks it has established are shut down relatively early during a shutdown
> or reboot. In specific they are terminated before halt et al runs
> '/sbin/bootadm -ea update_all' (in halt.c's do_archives_update()).
> Under some circumstances this will cause system shutdown to hang.
>
>   Suppose that you have ZFS pools that are hosted on iSCSI disks and
> those pools are set to the default 'failmode=wait'. When the iSCSI disks
> go away due to initiator shutdown, those pools enter a state where any
> IO to them will stall. Unfortunately bootadm does such IO (or at least
> does something that stalls in ZFS-land) and as such will itself stall,
> which stalls the shutdown process.
>
>   Presumably either bootadm should be run earlier or iSCSI initiator
> shutdown should happen later or both.

I guess you can control the order of shutdown procedures with
SMF dependencies. In particular, it might be helpful to ensure
that your system completely exports the remote-hosted pools
before disabling iSCSI (and possibly networking, etc.).

I hope that my write-up on the OI wiki would be relevant here:
http://wiki.openindiana.org/oi/Advanced+-+ZFS+Pools+as+SMF+services+and+iSCSI+loopback+mounts

Likewise, any of your services which need data from this pool
and can be wrapped into SMF (like VM's, zones, etc.) can also be
sure to stop properly before you export the pool and stop iSCSI.

http://wiki.openindiana.org/display/oi/Zones+as+SMF+services

I do mean to brush up those articles and code samples into a
more proper form (a package or something), but in the meanwhile
the articles can do with some manual work on the user's side ;)

HTH,
//Jim




More information about the OmniOS-discuss mailing list