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 http://www.opensolaris.org/os/licensing. 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 August 9, 2019 30.Dt ZPOOL-REMOVE 8 31.Os 32.Sh NAME 33.Nm zpool-remove 34.Nd remove devices from ZFS storage pool 35.Sh SYNOPSIS 36.Nm zpool 37.Cm remove 38.Op Fl npw 39.Ar pool Ar device Ns … 40.Nm zpool 41.Cm remove 42.Fl s 43.Ar pool 44.Sh DESCRIPTION 45.Bl -tag -width Ds 46.It Xo 47.Nm zpool 48.Cm remove 49.Op Fl npw 50.Ar pool Ar device Ns … 51.Xc 52Removes the specified device from the pool. 53This command supports removing hot spare, cache, log, and both mirrored and 54non-redundant primary top-level vdevs, including dedup and special vdevs. 55.Pp 56Top-level vdevs can only be removed if the primary pool storage does not contain 57a top-level raidz vdev, all top-level vdevs have the same sector size, and the 58keys for all encrypted datasets are loaded. 59.Pp 60Removing a top-level vdev reduces the total amount of space in the storage pool. 61The specified device will be evacuated by copying all allocated space from it to 62the other devices in the pool. 63In this case, the 64.Nm zpool Cm remove 65command initiates the removal and returns, while the evacuation continues in 66the background. 67The removal progress can be monitored with 68.Nm zpool Cm status . 69If an IO error is encountered during the removal process it will be cancelled. 70The 71.Sy device_removal 72feature flag must be enabled to remove a top-level vdev, see 73.Xr zpool-features 7 . 74.Pp 75A mirrored top-level device (log or data) can be removed by specifying the top-level mirror for the 76same. 77Non-log devices or data devices that are part of a mirrored configuration can be removed using 78the 79.Nm zpool Cm detach 80command. 81.Bl -tag -width Ds 82.It Fl n 83Do not actually perform the removal 84.Pq Qq No-op . 85Instead, print the estimated amount of memory that will be used by the 86mapping table after the removal completes. 87This is nonzero only for top-level vdevs. 88.El 89.Bl -tag -width Ds 90.It Fl p 91Used in conjunction with the 92.Fl n 93flag, displays numbers as parsable (exact) values. 94.It Fl w 95Waits until the removal has completed before returning. 96.El 97.It Xo 98.Nm zpool 99.Cm remove 100.Fl s 101.Ar pool 102.Xc 103Stops and cancels an in-progress removal of a top-level vdev. 104.El 105.Sh SEE ALSO 106.Xr zpool-add 8 , 107.Xr zpool-detach 8 , 108.Xr zpool-labelclear 8 , 109.Xr zpool-offline 8 , 110.Xr zpool-replace 8 , 111.Xr zpool-split 8 112