1eda14cbcSMatt Macy.\" 2eda14cbcSMatt Macy.\" CDDL HEADER START 3eda14cbcSMatt Macy.\" 4eda14cbcSMatt Macy.\" The contents of this file are subject to the terms of the 5eda14cbcSMatt Macy.\" Common Development and Distribution License (the "License"). 6eda14cbcSMatt Macy.\" You may not use this file except in compliance with the License. 7eda14cbcSMatt Macy.\" 8eda14cbcSMatt Macy.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9eda14cbcSMatt Macy.\" or http://www.opensolaris.org/os/licensing. 10eda14cbcSMatt Macy.\" See the License for the specific language governing permissions 11eda14cbcSMatt Macy.\" and limitations under the License. 12eda14cbcSMatt Macy.\" 13eda14cbcSMatt Macy.\" When distributing Covered Code, include this CDDL HEADER in each 14eda14cbcSMatt Macy.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15eda14cbcSMatt Macy.\" If applicable, add the following below this CDDL HEADER, with the 16eda14cbcSMatt Macy.\" fields enclosed by brackets "[]" replaced with your own identifying 17eda14cbcSMatt Macy.\" information: Portions Copyright [yyyy] [name of copyright owner] 18eda14cbcSMatt Macy.\" 19eda14cbcSMatt Macy.\" CDDL HEADER END 20eda14cbcSMatt Macy.\" 21eda14cbcSMatt Macy.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. 22eda14cbcSMatt Macy.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. 23eda14cbcSMatt Macy.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. 24eda14cbcSMatt Macy.\" Copyright (c) 2017 Datto Inc. 25eda14cbcSMatt Macy.\" Copyright (c) 2018 George Melikov. All Rights Reserved. 26eda14cbcSMatt Macy.\" Copyright 2017 Nexenta Systems, Inc. 27eda14cbcSMatt Macy.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. 28eda14cbcSMatt Macy.\" 29eda14cbcSMatt Macy.Dd August 9, 2019 30eda14cbcSMatt Macy.Dt ZPOOL-REMOVE 8 31eda14cbcSMatt Macy.Os 32eda14cbcSMatt Macy.Sh NAME 337877fdebSMatt Macy.Nm zpool-remove 34*16038816SMartin Matuska.Nd remove devices from ZFS storage pool 35eda14cbcSMatt Macy.Sh SYNOPSIS 367877fdebSMatt Macy.Nm zpool 37eda14cbcSMatt Macy.Cm remove 38eda14cbcSMatt Macy.Op Fl npw 39*16038816SMartin Matuska.Ar pool Ar device Ns … 407877fdebSMatt Macy.Nm zpool 41eda14cbcSMatt Macy.Cm remove 42eda14cbcSMatt Macy.Fl s 43eda14cbcSMatt Macy.Ar pool 44eda14cbcSMatt Macy.Sh DESCRIPTION 45eda14cbcSMatt Macy.Bl -tag -width Ds 46eda14cbcSMatt Macy.It Xo 477877fdebSMatt Macy.Nm zpool 48eda14cbcSMatt Macy.Cm remove 49eda14cbcSMatt Macy.Op Fl npw 50*16038816SMartin Matuska.Ar pool Ar device Ns … 51eda14cbcSMatt Macy.Xc 52eda14cbcSMatt MacyRemoves the specified device from the pool. 53eda14cbcSMatt MacyThis command supports removing hot spare, cache, log, and both mirrored and 54eda14cbcSMatt Macynon-redundant primary top-level vdevs, including dedup and special vdevs. 55eda14cbcSMatt MacyWhen the primary pool storage includes a top-level raidz vdev only hot spare, 56eda14cbcSMatt Macycache, and log devices can be removed. 57c40487d4SMatt MacyNote that keys for all encrypted datasets must be loaded for top-level vdevs 58c40487d4SMatt Macyto be removed. 59*16038816SMartin Matuska.Pp 60eda14cbcSMatt MacyRemoving a top-level vdev reduces the total amount of space in the storage pool. 61eda14cbcSMatt MacyThe specified device will be evacuated by copying all allocated space from it to 62eda14cbcSMatt Macythe other devices in the pool. 63eda14cbcSMatt MacyIn this case, the 64eda14cbcSMatt Macy.Nm zpool Cm remove 65eda14cbcSMatt Macycommand initiates the removal and returns, while the evacuation continues in 66eda14cbcSMatt Macythe background. 67eda14cbcSMatt MacyThe removal progress can be monitored with 68eda14cbcSMatt Macy.Nm zpool Cm status . 69*16038816SMartin MatuskaIf an IO error is encountered during the removal process it will be cancelled. 70*16038816SMartin MatuskaThe 71eda14cbcSMatt Macy.Sy device_removal 72eda14cbcSMatt Macyfeature flag must be enabled to remove a top-level vdev, see 73eda14cbcSMatt Macy.Xr zpool-features 5 . 74eda14cbcSMatt Macy.Pp 75eda14cbcSMatt MacyA mirrored top-level device (log or data) can be removed by specifying the top-level mirror for the 76eda14cbcSMatt Macysame. 77eda14cbcSMatt MacyNon-log devices or data devices that are part of a mirrored configuration can be removed using 78eda14cbcSMatt Macythe 79eda14cbcSMatt Macy.Nm zpool Cm detach 80eda14cbcSMatt Macycommand. 81eda14cbcSMatt Macy.Bl -tag -width Ds 82eda14cbcSMatt Macy.It Fl n 83*16038816SMartin MatuskaDo not actually perform the removal 84*16038816SMartin Matuska.Pq Qq No-op . 85eda14cbcSMatt MacyInstead, print the estimated amount of memory that will be used by the 86eda14cbcSMatt Macymapping table after the removal completes. 87eda14cbcSMatt MacyThis is nonzero only for top-level vdevs. 88eda14cbcSMatt Macy.El 89eda14cbcSMatt Macy.Bl -tag -width Ds 90eda14cbcSMatt Macy.It Fl p 91eda14cbcSMatt MacyUsed in conjunction with the 92eda14cbcSMatt Macy.Fl n 93eda14cbcSMatt Macyflag, displays numbers as parsable (exact) values. 94eda14cbcSMatt Macy.It Fl w 95eda14cbcSMatt MacyWaits until the removal has completed before returning. 96eda14cbcSMatt Macy.El 97eda14cbcSMatt Macy.It Xo 987877fdebSMatt Macy.Nm zpool 99eda14cbcSMatt Macy.Cm remove 100eda14cbcSMatt Macy.Fl s 101eda14cbcSMatt Macy.Ar pool 102eda14cbcSMatt Macy.Xc 103eda14cbcSMatt MacyStops and cancels an in-progress removal of a top-level vdev. 104eda14cbcSMatt Macy.El 105eda14cbcSMatt Macy.Sh SEE ALSO 106eda14cbcSMatt Macy.Xr zpool-add 8 , 107eda14cbcSMatt Macy.Xr zpool-detach 8 , 108eda14cbcSMatt Macy.Xr zpool-labelclear 8 , 109*16038816SMartin Matuska.Xr zpool-offline 8 , 110eda14cbcSMatt Macy.Xr zpool-replace 8 , 111eda14cbcSMatt Macy.Xr zpool-split 8 112