]> git.proxmox.com Git - mirror_zfs.git/blob - man/man8/zpool-attach.8
Add device rebuild feature
[mirror_zfs.git] / man / man8 / zpool-attach.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-ATTACH 8
32 .Os Linux
33 .Sh NAME
34 .Nm zpool Ns Pf - Cm attach
35 .Nd Attach a new device to an existing ZFS virtual device (vdev).
36 .Sh SYNOPSIS
37 .Nm
38 .Cm attach
39 .Op Fl fsw
40 .Oo Fl o Ar property Ns = Ns Ar value Oc
41 .Ar pool device new_device
42 .Sh DESCRIPTION
43 .Bl -tag -width Ds
44 .It Xo
45 .Nm
46 .Cm attach
47 .Op Fl fsw
48 .Oo Fl o Ar property Ns = Ns Ar value Oc
49 .Ar pool device new_device
50 .Xc
51 Attaches
52 .Ar new_device
53 to the existing
54 .Ar device .
55 The existing device cannot be part of a raidz configuration.
56 If
57 .Ar device
58 is not currently part of a mirrored configuration,
59 .Ar device
60 automatically transforms into a two-way mirror of
61 .Ar device
62 and
63 .Ar new_device .
64 If
65 .Ar device
66 is part of a two-way mirror, attaching
67 .Ar new_device
68 creates a three-way mirror, and so on.
69 In either case,
70 .Ar new_device
71 begins to resilver immediately and any running scrub is cancelled.
72 .Bl -tag -width Ds
73 .It Fl f
74 Forces use of
75 .Ar new_device ,
76 even if it appears to be in use.
77 Not all devices can be overridden in this manner.
78 .It Fl o Ar property Ns = Ns Ar value
79 Sets the given pool properties. See the
80 .Xr zpoolprops 8
81 manual page for a list of valid properties that can be set. The only property
82 supported at the moment is ashift.
83 .It Fl s
84 The
85 .Ar new_device
86 is reconstructed sequentially to restore redundancy as quickly as possible.
87 Checksums are not verfied during sequential reconstruction so a scrub is
88 started when the resilver completes.
89 Sequential reconstruction is not supported for raidz configurations.
90 .It Fl w
91 Waits until
92 .Ar new_device
93 has finished resilvering before returning.
94 .El
95 .El
96 .Sh SEE ALSO
97 .Xr zpool-detach 8 ,
98 .Xr zpool-add 8 ,
99 .Xr zpool-import 8 ,
100 .Xr zpool-initialize 8 ,
101 .Xr zpool-online 8 ,
102 .Xr zpool-replace 8 ,
103 .Xr zpool-resilver 8