mirror_zfs/cmd/zpool
Niklas Haas a84c92f933
Don't attempt trimming "hole" vdevs
On zpools containing hole vdevs (e.g. removed log devices), the `zpool
trim` (and presumably `zpool initialize`) commands will attempt calling
their respective functions on "hole", which fails, as this is not a real
vdev.

Avoid this by removing HOLE vdevs in zpool_collect_leaves.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Niklas Haas <git@haasn.xyz>
Closes #10227
2020-04-21 09:29:31 -07:00
..
os Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
zpool.d Fix SC2086 note in zpool.d/smart 2020-04-14 13:18:23 -07:00
.gitignore Add .gitignore files to exclude build products 2010-01-08 11:35:17 -08:00
Makefile.am Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
zpool_iter.c Add libzutil for libzfs or libzpool consumers 2018-11-05 11:22:33 -08:00
zpool_main.c Don't attempt trimming "hole" vdevs 2020-04-21 09:29:31 -07:00
zpool_util.c OpenZFS restructuring - zpool 2019-09-30 12:16:06 -07:00
zpool_util.h Fix static data to link with -fno-common 2020-02-06 09:25:29 -08:00
zpool_vdev.c Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00