2019-11-13 20:21:07 +03:00
|
|
|
.\"
|
|
|
|
.\" CDDL HEADER START
|
|
|
|
.\"
|
|
|
|
.\" The contents of this file are subject to the terms of the
|
|
|
|
.\" Common Development and Distribution License (the "License").
|
|
|
|
.\" You may not use this file except in compliance with the License.
|
|
|
|
.\"
|
|
|
|
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
|
|
|
.\" or http://www.opensolaris.org/os/licensing.
|
|
|
|
.\" See the License for the specific language governing permissions
|
|
|
|
.\" and limitations under the License.
|
|
|
|
.\"
|
|
|
|
.\" When distributing Covered Code, include this CDDL HEADER in each
|
|
|
|
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
|
|
|
.\" If applicable, add the following below this CDDL HEADER, with the
|
|
|
|
.\" fields enclosed by brackets "[]" replaced with your own identifying
|
|
|
|
.\" information: Portions Copyright [yyyy] [name of copyright owner]
|
|
|
|
.\"
|
|
|
|
.\" CDDL HEADER END
|
|
|
|
.\"
|
|
|
|
.\" 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.
|
|
|
|
.\"
|
2021-05-27 03:46:40 +03:00
|
|
|
.Dd May 29, 2021
|
2019-11-13 20:21:07 +03:00
|
|
|
.Dt ZPOOL-REPLACE 8
|
2020-08-21 21:55:47 +03:00
|
|
|
.Os
|
2021-05-27 03:46:40 +03:00
|
|
|
.
|
2019-11-13 20:21:07 +03:00
|
|
|
.Sh NAME
|
2020-10-22 21:28:10 +03:00
|
|
|
.Nm zpool-replace
|
2021-05-27 03:46:40 +03:00
|
|
|
.Nd replace one device with another in ZFS storage pool
|
2019-11-13 20:21:07 +03:00
|
|
|
.Sh SYNOPSIS
|
2020-10-22 21:28:10 +03:00
|
|
|
.Nm zpool
|
2019-11-13 20:21:07 +03:00
|
|
|
.Cm replace
|
2020-07-03 21:05:50 +03:00
|
|
|
.Op Fl fsw
|
2019-11-13 20:21:07 +03:00
|
|
|
.Oo Fl o Ar property Ns = Ns Ar value Oc
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar pool Ar device Op Ar new-device
|
|
|
|
.
|
2019-11-13 20:21:07 +03:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
Replaces
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar device
|
2019-11-13 20:21:07 +03:00
|
|
|
with
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar new-device .
|
2019-11-13 20:21:07 +03:00
|
|
|
This is equivalent to attaching
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar new-device ,
|
2019-11-13 20:21:07 +03:00
|
|
|
waiting for it to resilver, and then detaching
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar device .
|
2020-07-03 21:05:50 +03:00
|
|
|
Any in progress scrub will be cancelled.
|
2019-11-13 20:21:07 +03:00
|
|
|
.Pp
|
|
|
|
The size of
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar new-device
|
2019-11-13 20:21:07 +03:00
|
|
|
must be greater than or equal to the minimum size of all the devices in a mirror
|
|
|
|
or raidz configuration.
|
|
|
|
.Pp
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar new-device
|
2019-11-13 20:21:07 +03:00
|
|
|
is required if the pool is not redundant.
|
|
|
|
If
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar new-device
|
2019-11-13 20:21:07 +03:00
|
|
|
is not specified, it defaults to
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar device .
|
2019-11-13 20:21:07 +03:00
|
|
|
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
|
|
|
|
.Pa /dev
|
|
|
|
path as the old device, even though it is actually a different disk.
|
|
|
|
ZFS recognizes this.
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl f
|
|
|
|
Forces use of
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar new-device ,
|
2019-11-13 20:21:07 +03:00
|
|
|
even if it appears to be in use.
|
|
|
|
Not all devices can be overridden in this manner.
|
|
|
|
.It Fl o Ar property Ns = Ns Ar value
|
2021-05-27 03:46:40 +03:00
|
|
|
Sets the given pool properties.
|
|
|
|
See the
|
2021-06-04 23:29:26 +03:00
|
|
|
.Xr zpoolprops 7
|
2019-11-13 20:21:07 +03:00
|
|
|
manual page for a list of valid properties that can be set.
|
|
|
|
The only property supported at the moment is
|
|
|
|
.Sy ashift .
|
2020-07-03 21:05:50 +03:00
|
|
|
.It Fl s
|
|
|
|
The
|
2021-05-27 03:46:40 +03:00
|
|
|
.Ar new-device
|
2020-07-03 21:05:50 +03:00
|
|
|
is reconstructed sequentially to restore redundancy as quickly as possible.
|
|
|
|
Checksums are not verfied during sequential reconstruction so a scrub is
|
|
|
|
started when the resilver completes.
|
|
|
|
Sequential reconstruction is not supported for raidz configurations.
|
2019-11-13 20:21:07 +03:00
|
|
|
.It Fl w
|
|
|
|
Waits until the replacement has completed before returning.
|
|
|
|
.El
|
2021-05-27 03:46:40 +03:00
|
|
|
.
|
2019-11-13 20:21:07 +03:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr zpool-detach 8 ,
|
|
|
|
.Xr zpool-initialize 8 ,
|
|
|
|
.Xr zpool-online 8 ,
|
|
|
|
.Xr zpool-resilver 8
|