ZPOOL-REMOVE(8)
β¨ zpool-remove(8) β¨
okay so bestie, welcome to the zpool-remove page from the System Manager's Manual π this is the one where we yeet devices out of a ZFS storage pool. no cap.
πΈ NAME πΈ
zpool-remove β remove devices from ZFS storage pool π«Ά
β SYNOPSIS β
zpool remove [-npw] pool deviceβ¦
zpool remove -s pool
π DESCRIPTION π
π
zpool remove [-npw] pool deviceβ¦
Removes the specified device from the pool. literally. This command supports removing hot spare, cache, log, and both mirrored and non-redundant primary top-level vdevs, including dedup and special vdevs. the range? unmatched.
β οΈ Top-level vdevs can only be removed if the primary pool storage does not contain a top-levelraidzordraidvdev, all top-level vdevs have the sameashiftsize, and the keys for all encrypted datasets are loaded. three conditions, all mandatory, no exceptions bestie π
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, the zpool remove command initiates the removal and returns, while the evacuation continues in the background. The removal progress can be monitored with zpool status. If an I/O error is encountered during the removal process it will be canceled. The device_removal feature flag must be enabled to remove a top-level vdev, see zpool-features(7). iykyk.
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 the zpool detach command. (different tool, different vibe π)
-nβ 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 vdevs. it's giving window shopping π-pβ Used in conjunction with the-nflag, displays numbers as parsable (exact) values. precise queen π-wβ Waits until the removal has completed before returning. patient main character energy β¨
π¦ zpool remove -s pool
Stops and cancels an in-progress removal of a top-level vdev. the β "actually, never mind" β option, and honestly? valid.
π EXAMPLES π
π Example 1: Removing a Mirrored top-level (Log or Data) Device
The following commands remove the mirrored log device mirror-2 and mirrored top-level data device mirror-1.
Given this configuration:
pool: tank
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
sda ONLINE 0 0 0
sdb ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
sdc ONLINE 0 0 0
sdd ONLINE 0 0 0
logs
mirror-2 ONLINE 0 0 0
sde ONLINE 0 0 0
sdf ONLINE 0 0 0
The command to remove the mirrored log mirror-2 is:
# zpool remove tank mirror-2
At this point, the log device no longer exists (both sides of the mirror have been removed):
pool: tank
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
sda ONLINE 0 0 0
sdb ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
sdc ONLINE 0 0 0
sdd ONLINE 0 0 0
The command to remove the mirrored data mirror-1 is:
# zpool remove tank mirror-1
After mirror-1 has been evacuated, the pool remains redundant, but the total amount of space is reduced:
pool: tank
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
sda ONLINE 0 0 0
sdb ONLINE 0 0 0
π SEE ALSO π
zpool-add(8), zpool-detach(8), zpool-labelclear(8), zpool-offline(8), zpool-replace(8), zpool-split(8)
and that's the whole page bestie π this one's from OpenZFS, dated November 19, 2024 β go forth and remove devices responsibly, mwah πβ¨π
π¦ where this page comes from
- alpine 3.23: zfs-doc 2.4.4-r0 Β· CDDL-1.0
- alpine 3.24: zfs-doc 2.4.4-r0 Β· CDDL-1.0
- nixos 26.05: zfs-user 2.4.4
- nixpkgs unstable: zfs-user 2.4.4
- ubuntu resolute: zfsutils-linux 2.4.1-1ubuntu5 Β· CDDL-1.0
- ubuntu resolute: zfsutils-linux 2.4.1-1ubuntu5.1 Β· CDDL-1.0
- ubuntu stonking: zfsutils-linux 2.4.4-1ubuntu4 Β· CDDL-1.0
- π the page's license: CDDL-1.0
- Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
- Copyright (c) 2012, 2018 by Delphix. All rights reserved
- Copyright (c) 2012 Cyril Plisko. All Rights Reserved
- Copyright (c) 2017 Datto Inc
- Copyright (c) 2018 George Melikov. All Rights Reserved
- Copyright 2017 Nexenta Systems, Inc
- Copyright (c) 2017 Open-E, Inc. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms