]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/spa.c
Fix "zpool add -n" for dedup, special and log devices
authorloli10K <ezomori.nozomu@gmail.com>
Mon, 6 Jan 2020 23:40:06 +0000 (00:40 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 6 Jan 2020 23:40:06 +0000 (15:40 -0800)
commitc24fa4b19a1b117945f3235e014f926fe93b0c5a
tree37178dc7c410829ef81f1f2c61c7df44d6d41710
parentbc9cef11fddfe8e6e240477084a49f4bad1fb4f3
Fix "zpool add -n" for dedup, special and log devices

For dedup, special and log devices "zpool add -n" does not print
correctly their vdev type:

~# zpool add -n pool dedup /tmp/dedup special /tmp/special log /tmp/log
would update 'pool' to the following configuration:
pool
  /tmp/normal
  /tmp/dedup
  /tmp/special
  /tmp/log

This could lead storage administrators to modify their ZFS pools to
unexpected and unintended vdev configurations.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #9783
Closes #9390
cmd/zpool/zpool_main.c
include/zfs_comutil.h
module/zcommon/zfs_comutil.c
module/zfs/spa.c
tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_003_pos.ksh