3 .\" The contents of this file are subject to the terms of the
4 .\" Common Development and Distribution License (the "License").
5 .\" You may not use this file except in compliance with the License.
7 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8 .\" or https://opensource.org/licenses/CDDL-1.0.
9 .\" See the License for the specific language governing permissions
10 .\" and limitations under the License.
12 .\" When distributing Covered Code, include this CDDL HEADER in each
13 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14 .\" If applicable, add the following below this CDDL HEADER, with the
15 .\" fields enclosed by brackets "[]" replaced with your own identifying
16 .\" information: Portions Copyright [yyyy] [name of copyright owner]
20 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
21 .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
22 .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
23 .\" Copyright (c) 2017 Datto Inc.
24 .\" Copyright (c) 2018 George Melikov. All Rights Reserved.
25 .\" Copyright 2017 Nexenta Systems, Inc.
26 .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
27 .\" Copyright (c) 2024 by Delphix. All Rights Reserved.
35 .Nd add vdevs to ZFS storage pool
40 .Op Fl -allow-in-use -allow-replication-mismatch -allow-ashift-mismatch
41 .Oo Fl o Ar property Ns = Ns Ar value Oc
45 Adds the specified virtual devices to the given pool.
48 specification is described in the
54 option, and the device checks performed are described in the
61 even if they appear in use, have conflicting ashift values, or specify
62 a conflicting replication level.
63 Not all devices can be overridden in this manner.
67 GUIDs instead of the normal device names.
68 These GUIDs can be used in place of
69 device names for the zpool detach/offline/remove/replace commands.
71 Display real paths for
73 resolving all symbolic links.
74 This can be used to look up the current block
75 device name regardless of the
79 Displays the configuration that would be used without actually adding the
81 The actual pool creation can still fail due to insufficient privileges or
84 Display real paths for
86 instead of only the last component of the path.
87 This can be used in conjunction with the
90 .It Fl o Ar property Ns = Ns Ar value
91 Sets the given pool properties.
94 manual page for a list of valid properties that can be set.
95 The only property supported at the moment is
97 .It Fl -allow-ashift-mismatch
98 Disable the ashift validation which allows mismatched ashift values in the
102 with different sector sizes will prohibit future device removal operations, see
105 Allow vdevs to be added even if they might be in use in another pool.
106 .It Fl -allow-replication-mismatch
107 Allow vdevs with conflicting replication levels to be added to the pool.
111 .\" These are, respectively, examples 5, 13 from zpool.8
112 .\" Make sure to update them bidirectionally
113 .Ss Example 1 : No Adding a Mirror to a ZFS Storage Pool
114 The following command adds two mirrored disks to the pool
116 assuming the pool is already made up of two-way mirrors.
117 The additional space is immediately available to any datasets within the pool.
118 .Dl # Nm zpool Cm add Ar tank Sy mirror Pa sda sdb
120 .Ss Example 2 : No Adding Cache Devices to a ZFS Pool
121 The following command adds two disks for use as cache devices to a ZFS storage
123 .Dl # Nm zpool Cm add Ar pool Sy cache Pa sdc sdd
125 Once added, the cache devices gradually fill with content from main memory.
126 Depending on the size of your cache devices, it could take over an hour for
128 Capacity and reads can be monitored using the
130 subcommand as follows:
131 .Dl # Nm zpool Cm iostat Fl v Ar pool 5
136 .Xr zpool-initialize 8 ,