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.
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.
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]
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.
35 .Nd remove devices from ZFS storage pool
41 .Ar pool Ar device Ns …
53 .Ar pool Ar device Ns …
55 Removes the specified device from the pool.
56 This command supports removing hot spare, cache, log, and both mirrored and
57 non-redundant primary top-level vdevs, including dedup and special vdevs.
59 Top-level vdevs can only be removed if the primary pool storage does not contain
60 a top-level raidz vdev, all top-level vdevs have the same sector size, and the
61 keys for all encrypted datasets are loaded.
63 Removing a top-level vdev reduces the total amount of space in the storage pool.
64 The specified device will be evacuated by copying all allocated space from it to
65 the other devices in the pool.
68 command initiates the removal and returns, while the evacuation continues in
70 The removal progress can be monitored with
72 If an I/O error is encountered during the removal process it will be cancelled.
75 feature flag must be enabled to remove a top-level vdev, see
76 .Xr zpool-features 7 .
78 A mirrored top-level device (log or data) can be removed by specifying the top-
81 Non-log devices or data devices that are part of a mirrored configuration can be
88 Do not actually perform the removal
90 Instead, print the estimated amount of memory that will be used by the
91 mapping table after the removal completes.
92 This is nonzero only for top-level vdevs.
96 Used in conjunction with the
98 flag, displays numbers as parsable (exact) values.
100 Waits until the removal has completed before returning.
108 Stops and cancels an in-progress removal of a top-level vdev.
112 .\" These are, respectively, examples 14 from zpool.8
113 .\" Make sure to update them bidirectionally
114 .Ss Example 1 : No Removing a Mirrored top-level (Log or Data) Device
115 The following commands remove the mirrored log device
117 and mirrored top-level data device
120 Given this configuration:
121 .Bd -literal -compact -offset Ds
124 scrub: none requested
127 NAME STATE READ WRITE CKSUM
129 mirror-0 ONLINE 0 0 0
132 mirror-1 ONLINE 0 0 0
136 mirror-2 ONLINE 0 0 0
141 The command to remove the mirrored log
143 .Dl # Nm zpool Cm remove Ar tank mirror-2
145 The command to remove the mirrored data
147 .Dl # Nm zpool Cm remove Ar tank mirror-1
152 .Xr zpool-labelclear 8 ,
153 .Xr zpool-offline 8 ,
154 .Xr zpool-replace 8 ,