xref: /freebsd/sys/contrib/openzfs/man/man8/zpool-attach.8 (revision 031beb4e239bfce798af17f5fe8dba8bcaf13d99)
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 https://opensource.org/licenses/CDDL-1.0.
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.\" 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.\"
29.Dd May 15, 2020
30.Dt ZPOOL-ATTACH 8
31.Os
32.
33.Sh NAME
34.Nm zpool-attach
35.Nd attach new device to existing ZFS vdev
36.Sh SYNOPSIS
37.Nm zpool
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.
43.Sh DESCRIPTION
44Attaches
45.Ar new_device
46to the existing
47.Ar device .
48The existing device cannot be part of a raidz configuration.
49If
50.Ar device
51is not currently part of a mirrored configuration,
52.Ar device
53automatically transforms into a two-way mirror of
54.Ar device
55and
56.Ar new_device .
57If
58.Ar device
59is part of a two-way mirror, attaching
60.Ar new_device
61creates a three-way mirror, and so on.
62In either case,
63.Ar new_device
64begins to resilver immediately and any running scrub is cancelled.
65.Bl -tag -width Ds
66.It Fl f
67Forces use of
68.Ar new_device ,
69even if it appears to be in use.
70Not all devices can be overridden in this manner.
71.It Fl o Ar property Ns = Ns Ar value
72Sets the given pool properties.
73See the
74.Xr zpoolprops 7
75manual page for a list of valid properties that can be set.
76The only property supported at the moment is
77.Sy ashift .
78.It Fl s
79The
80.Ar new_device
81is reconstructed sequentially to restore redundancy as quickly as possible.
82Checksums are not verified during sequential reconstruction so a scrub is
83started when the resilver completes.
84Sequential reconstruction is not supported for raidz configurations.
85.It Fl w
86Waits until
87.Ar new_device
88has finished resilvering before returning.
89.El
90.
91.Sh SEE ALSO
92.Xr zpool-add 8 ,
93.Xr zpool-detach 8 ,
94.Xr zpool-import 8 ,
95.Xr zpool-initialize 8 ,
96.Xr zpool-online 8 ,
97.Xr zpool-replace 8 ,
98.Xr zpool-resilver 8
99