Situation: system is booting from a zfs pool configured with two usb sticks as L2 cache devices.
Observation: at shutdown time, after hard-disks are stoped and uptime duration is printed, usual usb shutdown messages are not printed and the system never powers itself off. When the same sticks are pluged in the same host but are not part of the root pool, the system goes to power off as usual.
I suppose there is a deadlock between zfs and usb: zfs keeps references to those two devices and usb waits for the devices to be liberated before winding down.
USB will try to detach all USB devices before shutdown. --HPS
ZFS winds down via shutdown_post_sync event hook.
I'm not cognizant of the zfs internals, I did a quick search of the zfs sources from which I came to the conclusion that the SPA part is managing the raw devices, am I right? Then I activated that subsystem's debug messages (vfs.zfs.debug set to 32). I expected to see messages when the devices are released but none were printed, not even for the SATA drives. Where should I search next?