1*eda14cbcSMatt Macy.\" 2*eda14cbcSMatt Macy.\" CDDL HEADER START 3*eda14cbcSMatt Macy.\" 4*eda14cbcSMatt Macy.\" The contents of this file are subject to the terms of the 5*eda14cbcSMatt Macy.\" Common Development and Distribution License (the "License"). 6*eda14cbcSMatt Macy.\" You may not use this file except in compliance with the License. 7*eda14cbcSMatt Macy.\" 8*eda14cbcSMatt Macy.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*eda14cbcSMatt Macy.\" or http://www.opensolaris.org/os/licensing. 10*eda14cbcSMatt Macy.\" See the License for the specific language governing permissions 11*eda14cbcSMatt Macy.\" and limitations under the License. 12*eda14cbcSMatt Macy.\" 13*eda14cbcSMatt Macy.\" When distributing Covered Code, include this CDDL HEADER in each 14*eda14cbcSMatt Macy.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*eda14cbcSMatt Macy.\" If applicable, add the following below this CDDL HEADER, with the 16*eda14cbcSMatt Macy.\" fields enclosed by brackets "[]" replaced with your own identifying 17*eda14cbcSMatt Macy.\" information: Portions Copyright [yyyy] [name of copyright owner] 18*eda14cbcSMatt Macy.\" 19*eda14cbcSMatt Macy.\" CDDL HEADER END 20*eda14cbcSMatt Macy.\" 21*eda14cbcSMatt Macy.\" 22*eda14cbcSMatt Macy.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. 23*eda14cbcSMatt Macy.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. 24*eda14cbcSMatt Macy.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. 25*eda14cbcSMatt Macy.\" Copyright (c) 2017 Datto Inc. 26*eda14cbcSMatt Macy.\" Copyright (c) 2018 George Melikov. All Rights Reserved. 27*eda14cbcSMatt Macy.\" Copyright 2017 Nexenta Systems, Inc. 28*eda14cbcSMatt Macy.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. 29*eda14cbcSMatt Macy.\" 30*eda14cbcSMatt Macy.Dd May 15, 2020 31*eda14cbcSMatt Macy.Dt ZPOOL-ATTACH 8 32*eda14cbcSMatt Macy.Os 33*eda14cbcSMatt Macy.Sh NAME 34*eda14cbcSMatt Macy.Nm zpool Ns Pf - Cm attach 35*eda14cbcSMatt Macy.Nd Attach a new device to an existing ZFS virtual device (vdev). 36*eda14cbcSMatt Macy.Sh SYNOPSIS 37*eda14cbcSMatt Macy.Nm 38*eda14cbcSMatt Macy.Cm attach 39*eda14cbcSMatt Macy.Op Fl fsw 40*eda14cbcSMatt Macy.Oo Fl o Ar property Ns = Ns Ar value Oc 41*eda14cbcSMatt Macy.Ar pool device new_device 42*eda14cbcSMatt Macy.Sh DESCRIPTION 43*eda14cbcSMatt Macy.Bl -tag -width Ds 44*eda14cbcSMatt Macy.It Xo 45*eda14cbcSMatt Macy.Nm 46*eda14cbcSMatt Macy.Cm attach 47*eda14cbcSMatt Macy.Op Fl fsw 48*eda14cbcSMatt Macy.Oo Fl o Ar property Ns = Ns Ar value Oc 49*eda14cbcSMatt Macy.Ar pool device new_device 50*eda14cbcSMatt Macy.Xc 51*eda14cbcSMatt MacyAttaches 52*eda14cbcSMatt Macy.Ar new_device 53*eda14cbcSMatt Macyto the existing 54*eda14cbcSMatt Macy.Ar device . 55*eda14cbcSMatt MacyThe existing device cannot be part of a raidz configuration. 56*eda14cbcSMatt MacyIf 57*eda14cbcSMatt Macy.Ar device 58*eda14cbcSMatt Macyis not currently part of a mirrored configuration, 59*eda14cbcSMatt Macy.Ar device 60*eda14cbcSMatt Macyautomatically transforms into a two-way mirror of 61*eda14cbcSMatt Macy.Ar device 62*eda14cbcSMatt Macyand 63*eda14cbcSMatt Macy.Ar new_device . 64*eda14cbcSMatt MacyIf 65*eda14cbcSMatt Macy.Ar device 66*eda14cbcSMatt Macyis part of a two-way mirror, attaching 67*eda14cbcSMatt Macy.Ar new_device 68*eda14cbcSMatt Macycreates a three-way mirror, and so on. 69*eda14cbcSMatt MacyIn either case, 70*eda14cbcSMatt Macy.Ar new_device 71*eda14cbcSMatt Macybegins to resilver immediately and any running scrub is cancelled. 72*eda14cbcSMatt Macy.Bl -tag -width Ds 73*eda14cbcSMatt Macy.It Fl f 74*eda14cbcSMatt MacyForces use of 75*eda14cbcSMatt Macy.Ar new_device , 76*eda14cbcSMatt Macyeven if it appears to be in use. 77*eda14cbcSMatt MacyNot all devices can be overridden in this manner. 78*eda14cbcSMatt Macy.It Fl o Ar property Ns = Ns Ar value 79*eda14cbcSMatt MacySets the given pool properties. See the 80*eda14cbcSMatt Macy.Xr zpoolprops 8 81*eda14cbcSMatt Macymanual page for a list of valid properties that can be set. The only property 82*eda14cbcSMatt Macysupported at the moment is ashift. 83*eda14cbcSMatt Macy.It Fl s 84*eda14cbcSMatt MacyThe 85*eda14cbcSMatt Macy.Ar new_device 86*eda14cbcSMatt Macyis reconstructed sequentially to restore redundancy as quickly as possible. 87*eda14cbcSMatt MacyChecksums are not verfied during sequential reconstruction so a scrub is 88*eda14cbcSMatt Macystarted when the resilver completes. 89*eda14cbcSMatt MacySequential reconstruction is not supported for raidz configurations. 90*eda14cbcSMatt Macy.It Fl w 91*eda14cbcSMatt MacyWaits until 92*eda14cbcSMatt Macy.Ar new_device 93*eda14cbcSMatt Macyhas finished resilvering before returning. 94*eda14cbcSMatt Macy.El 95*eda14cbcSMatt Macy.El 96*eda14cbcSMatt Macy.Sh SEE ALSO 97*eda14cbcSMatt Macy.Xr zpool-detach 8 , 98*eda14cbcSMatt Macy.Xr zpool-add 8 , 99*eda14cbcSMatt Macy.Xr zpool-import 8 , 100*eda14cbcSMatt Macy.Xr zpool-initialize 8 , 101*eda14cbcSMatt Macy.Xr zpool-online 8 , 102*eda14cbcSMatt Macy.Xr zpool-replace 8 , 103*eda14cbcSMatt Macy.Xr zpool-resilver 8 104