Remove a device from a ZFS storage pool
- Removes the specified device from the pool. This command supports removing
hot spare, cache, log, and both mirrored and non-redundant primary
top-level vdevs, including dedup and special vdevs. When the primary pool
storage includes a top-level raidz vdev only hot spare, cache, and log
devices can be removed. Note that keys for all encrypted datasets must be
loaded for top-level vdevs to be removed.
Removing a top-level vdev reduces the total amount of space in
the storage pool. The specified device will be evacuated by copying all
allocated space from it to the other devices in the pool. In this case,
initiates the removal and returns, while the evacuation continues in the
background. The removal progress can be monitored with
status. If an IO
error is encountered during the removal process it will be cancelled.
The device_removal feature flag must be enabled to
remove a top-level vdev, see zpool-features(5).
A mirrored top-level device (log or data) can be removed by
specifying the top-level mirror for the same. Non-log devices or data
devices that are part of a mirrored configuration can be removed using
- Do not actually perform the removal ("no-op"). Instead,
print the estimated amount of memory that will be used by the mapping
table after the removal completes. This is nonzero only for top-level
- Used in conjunction with the
-n flag, displays
numbers as parsable (exact) values.
- Waits until the removal has completed before returning.
- Stops and cancels an in-progress removal of a top-level vdev.