FreeBSD curlew.lan 11.0-RELEASE-p2 FreeBSD 11.0-RELEASE-p2 #0: Mon Oct 24 06:55:27 UTC 2016 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 zpool detach hangs and eventually freezes the entire system if autoexpand is set to on. After rebooting the detached device is still shown in the pool but is inaccessible and cannot be removed For example, starting with this pool: root@fbsd11:~ # zpool status pool: test state: ONLINE scan: resilvered 74.5K in 0h0m with 0 errors on Mon Feb 6 13:55:04 2017 config: NAME STATE READ WRITE CKSUM test ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 gpt/ztest1 ONLINE 0 0 0 gpt/ztest2 ONLINE 0 0 0 errors: No known data errors root@fbsd11:~ # zpool get autoexpand NAME PROPERTY VALUE SOURCE test autoexpand on local If I attempt to detach test gpt/ztest2 it hangs and after rebooting I have the following: root@fbsd11:~ # zpool status pool: test state: DEGRADED status: One or more devices could not be opened. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Attach the missing device and online it using 'zpool online'. see: http://illumos.org/msg/ZFS-8000-2Q scan: resilvered 74.5K in 0h0m with 0 errors on Mon Feb 6 13:55:04 2017 config: NAME STATE READ WRITE CKSUM test DEGRADED 0 0 0 mirror-0 DEGRADED 0 0 0 gpt/ztest1 ONLINE 0 0 0 12467057712079289495 UNAVAIL 0 0 0 was /dev/gpt/ztest2 errors: No known data errors At this stage the former gpt/ztest2 cannot be detached or reattached until I set autoexpand to off which then enables me to detach it. A similar problem was resolved with FreeNAS in November and might be relevant - https://bugs.pcbsd.org/issues/14337
FreeBSD 11.0 was released before the fix. You should see the fix in 11.1 or you can switch to stable/11 now.
Thanks. I'll wait for 11.1. In the meantime switching off autoexpand is OK as a workaround.
For reference do you know the particular commit which fixed this Andriy?
I believe that it was base r308055. Alexander, could you please confirm?
(In reply to Andriy Gapon from comment #4) It was fixed from two different sides: r308051 and r308055.