]>
Commit | Line | Data |
---|---|---|
c5ebfbbe RW |
1 | .\" |
2 | .\" CDDL HEADER START | |
3 | .\" | |
4 | .\" The contents of this file are subject to the terms of the | |
5 | .\" Common Development and Distribution License (the "License"). | |
6 | .\" You may not use this file except in compliance with the License. | |
7 | .\" | |
8 | .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | |
1d3ba0bf | 9 | .\" or https://opensource.org/licenses/CDDL-1.0. |
c5ebfbbe RW |
10 | .\" See the License for the specific language governing permissions |
11 | .\" and limitations under the License. | |
12 | .\" | |
13 | .\" When distributing Covered Code, include this CDDL HEADER in each | |
14 | .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. | |
15 | .\" If applicable, add the following below this CDDL HEADER, with the | |
16 | .\" fields enclosed by brackets "[]" replaced with your own identifying | |
17 | .\" information: Portions Copyright [yyyy] [name of copyright owner] | |
18 | .\" | |
19 | .\" CDDL HEADER END | |
20 | .\" | |
c5ebfbbe RW |
21 | .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. |
22 | .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. | |
23 | .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. | |
24 | .\" Copyright (c) 2017 Datto Inc. | |
25 | .\" Copyright (c) 2018 George Melikov. All Rights Reserved. | |
26 | .\" Copyright 2017 Nexenta Systems, Inc. | |
27 | .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. | |
28 | .\" | |
f84fe3fc | 29 | .Dd May 29, 2021 |
c5ebfbbe | 30 | .Dt ZPOOL-REPLACE 8 |
6706552e | 31 | .Os |
f84fe3fc | 32 | . |
c5ebfbbe | 33 | .Sh NAME |
1e36af8c | 34 | .Nm zpool-replace |
f84fe3fc | 35 | .Nd replace one device with another in ZFS storage pool |
c5ebfbbe | 36 | .Sh SYNOPSIS |
1e36af8c | 37 | .Nm zpool |
c5ebfbbe | 38 | .Cm replace |
9a49d3f3 | 39 | .Op Fl fsw |
c5ebfbbe | 40 | .Oo Fl o Ar property Ns = Ns Ar value Oc |
f84fe3fc AZ |
41 | .Ar pool Ar device Op Ar new-device |
42 | . | |
c5ebfbbe | 43 | .Sh DESCRIPTION |
c5ebfbbe | 44 | Replaces |
f84fe3fc | 45 | .Ar device |
c5ebfbbe | 46 | with |
f84fe3fc | 47 | .Ar new-device . |
c5ebfbbe | 48 | This is equivalent to attaching |
f84fe3fc | 49 | .Ar new-device , |
c5ebfbbe | 50 | waiting for it to resilver, and then detaching |
f84fe3fc | 51 | .Ar device . |
9a49d3f3 | 52 | Any in progress scrub will be cancelled. |
c5ebfbbe RW |
53 | .Pp |
54 | The size of | |
f84fe3fc | 55 | .Ar new-device |
c5ebfbbe RW |
56 | must be greater than or equal to the minimum size of all the devices in a mirror |
57 | or raidz configuration. | |
58 | .Pp | |
f84fe3fc | 59 | .Ar new-device |
c5ebfbbe RW |
60 | is required if the pool is not redundant. |
61 | If | |
f84fe3fc | 62 | .Ar new-device |
c5ebfbbe | 63 | is not specified, it defaults to |
f84fe3fc | 64 | .Ar device . |
c5ebfbbe RW |
65 | This form of replacement is useful after an existing disk has failed and has |
66 | been physically replaced. | |
67 | In this case, the new disk may have the same | |
68 | .Pa /dev | |
69 | path as the old device, even though it is actually a different disk. | |
70 | ZFS recognizes this. | |
71 | .Bl -tag -width Ds | |
72 | .It Fl f | |
73 | Forces use of | |
f84fe3fc | 74 | .Ar new-device , |
c5ebfbbe RW |
75 | even if it appears to be in use. |
76 | Not all devices can be overridden in this manner. | |
77 | .It Fl o Ar property Ns = Ns Ar value | |
f84fe3fc AZ |
78 | Sets the given pool properties. |
79 | See the | |
2badb345 | 80 | .Xr zpoolprops 7 |
c5ebfbbe RW |
81 | manual page for a list of valid properties that can be set. |
82 | The only property supported at the moment is | |
83 | .Sy ashift . | |
9a49d3f3 BB |
84 | .It Fl s |
85 | The | |
f84fe3fc | 86 | .Ar new-device |
9a49d3f3 | 87 | is reconstructed sequentially to restore redundancy as quickly as possible. |
0175272f | 88 | Checksums are not verified during sequential reconstruction so a scrub is |
9a49d3f3 BB |
89 | started when the resilver completes. |
90 | Sequential reconstruction is not supported for raidz configurations. | |
c5ebfbbe RW |
91 | .It Fl w |
92 | Waits until the replacement has completed before returning. | |
93 | .El | |
f84fe3fc | 94 | . |
c5ebfbbe RW |
95 | .Sh SEE ALSO |
96 | .Xr zpool-detach 8 , | |
97 | .Xr zpool-initialize 8 , | |
98 | .Xr zpool-online 8 , | |
99 | .Xr zpool-resilver 8 |