ZPOOL-REPLACE(8) System Manager's Manual ZPOOL-REPLACE(8)

# [NAME](#NAME)

`zpool-replace` — replace one device with another in ZFS storage pool

# [SYNOPSIS](#SYNOPSIS)

`zpool` `replace` \[`-fsw`] \[`-o` `property`=`value`] `pool` `device` \[`new-device`]

# [DESCRIPTION](#DESCRIPTION)

Replaces `device` with `new-device`. This is equivalent to attaching `new-device`, waiting for it to resilver, and then detaching `device`. Any in progress scrub will be canceled.

The size of `new-device` must be greater than or equal to the minimum size of all the devices in a mirror or raidz configuration.

`new-device` is required if the pool is not redundant. If `new-device` is not specified, it defaults to `device`. This form of replacement is useful after an existing disk has failed and has been physically replaced. In this case, the new disk may have the same /dev path as the old device, even though it is actually a different disk. ZFS recognizes this.

[`-f`](#f)

Forces use of `new-device`, even if it appears to be in use. Not all devices can be overridden in this manner.

[`-o`](#o) `property`=`value`

Sets the given pool properties. See the [zpoolprops(7)](/man/os/zfs/zpoolprops.7) manual page for a list of valid properties that can be set. The only property supported at the moment is [**ashift**](#ashift).

[`-s`](#s)

The `new-device` is reconstructed sequentially to restore redundancy as quickly as possible. Checksums are not verified during sequential reconstruction so a scrub is started when the resilver completes. Sequential reconstruction is not supported for raidz configurations.

[`-w`](#w)

Waits until the replacement has completed before returning.

# [SEE ALSO](#SEE_ALSO)

[zpool-detach(8)](/man/os/zfs/zpool-detach.8), [zpool-initialize(8)](/man/os/zfs/zpool-initialize.8), [zpool-online(8)](/man/os/zfs/zpool-online.8), [zpool-resilver(8)](/man/os/zfs/zpool-resilver.8)

July 11, 2022 OpenZFS

---

Document: zpool-replace(8) from zfs 2.4.4-r4 (Chainguard OS)
Source: https://github.com/openzfs/zfs
