]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - man/man8/zpool-replace.8
man: fix wrong .Xr macros usages
[FreeBSD/FreeBSD.git] / man / man8 / zpool-replace.8
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
9 .\" or http://www.opensolaris.org/os/licensing.
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 .\"
21 .\"
22 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
23 .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
24 .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
25 .\" Copyright (c) 2017 Datto Inc.
26 .\" Copyright (c) 2018 George Melikov. All Rights Reserved.
27 .\" Copyright 2017 Nexenta Systems, Inc.
28 .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
29 .\"
30 .Dd May 15, 2020
31 .Dt ZPOOL-REPLACE 8
32 .Os
33 .Sh NAME
34 .Nm zpool-replace
35 .Nd Replace one device with another in a ZFS storage pool
36 .Sh SYNOPSIS
37 .Nm zpool
38 .Cm replace
39 .Op Fl fsw
40 .Oo Fl o Ar property Ns = Ns Ar value Oc
41 .Ar pool Ar device Op Ar new_device
42 .Sh DESCRIPTION
43 .Bl -tag -width Ds
44 .It Xo
45 .Nm zpool
46 .Cm replace
47 .Op Fl fsw
48 .Op Fl o Ar property Ns = Ns Ar value
49 .Ar pool Ar device Op Ar new_device
50 .Xc
51 Replaces
52 .Ar old_device
53 with
54 .Ar new_device .
55 This is equivalent to attaching
56 .Ar new_device ,
57 waiting for it to resilver, and then detaching
58 .Ar old_device .
59 Any in progress scrub will be cancelled.
60 .Pp
61 The size of
62 .Ar new_device
63 must be greater than or equal to the minimum size of all the devices in a mirror
64 or raidz configuration.
65 .Pp
66 .Ar new_device
67 is required if the pool is not redundant.
68 If
69 .Ar new_device
70 is not specified, it defaults to
71 .Ar old_device .
72 This form of replacement is useful after an existing disk has failed and has
73 been physically replaced.
74 In this case, the new disk may have the same
75 .Pa /dev
76 path as the old device, even though it is actually a different disk.
77 ZFS recognizes this.
78 .Bl -tag -width Ds
79 .It Fl f
80 Forces use of
81 .Ar new_device ,
82 even if it appears to be in use.
83 Not all devices can be overridden in this manner.
84 .It Fl o Ar property Ns = Ns Ar value
85 Sets the given pool properties. See the
86 .Xr zpoolprops 8
87 manual page for a list of valid properties that can be set.
88 The only property supported at the moment is
89 .Sy ashift .
90 .It Fl s
91 The
92 .Ar new_device
93 is reconstructed sequentially to restore redundancy as quickly as possible.
94 Checksums are not verfied during sequential reconstruction so a scrub is
95 started when the resilver completes.
96 Sequential reconstruction is not supported for raidz configurations.
97 .It Fl w
98 Waits until the replacement has completed before returning.
99 .El
100 .El
101 .Sh SEE ALSO
102 .Xr zpool-detach 8 ,
103 .Xr zpool-initialize 8 ,
104 .Xr zpool-online 8 ,
105 .Xr zpool-resilver 8