diff --git a/zpool.go b/zpool.go index a3f9d50..6b40428 100644 --- a/zpool.go +++ b/zpool.go @@ -377,6 +377,9 @@ func poolSearchImport(q string, searchpaths []string, guid bool) (name string, err = errPoolList return } + if PoolState(C.get_zpool_state(tconfig)) == PoolStateDestroyed { + continue // skip destroyed pools + } if guid { sguid := fmt.Sprint(C.get_zpool_guid(tconfig)) if q == sguid {