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.\" 22.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. 23.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. 24.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. 25.\" Copyright (c) 2017 Datto Inc. 26.\" Copyright (c) 2018 George Melikov. All Rights Reserved. 27.\" Copyright 2017 Nexenta Systems, Inc. 28.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. 29.\" 30.Dd August 9, 2019 31.Dt ZPOOL-REMOVE 8 32.Os 33.Sh NAME 34.Nm zpool Ns Pf - Cm remove 35.Nd Remove a device from a ZFS storage pool 36.Sh SYNOPSIS 37.Nm 38.Cm remove 39.Op Fl npw 40.Ar pool Ar device Ns ... 41.Nm 42.Cm remove 43.Fl s 44.Ar pool 45.Sh DESCRIPTION 46.Bl -tag -width Ds 47.It Xo 48.Nm 49.Cm remove 50.Op Fl npw 51.Ar pool Ar device Ns ... 52.Xc 53Removes the specified device from the pool. 54This command supports removing hot spare, cache, log, and both mirrored and 55non-redundant primary top-level vdevs, including dedup and special vdevs. 56When the primary pool storage includes a top-level raidz vdev only hot spare, 57cache, and log devices can be removed. 58.sp 59Removing a top-level vdev reduces the total amount of space in the storage pool. 60The specified device will be evacuated by copying all allocated space from it to 61the other devices in the pool. 62In this case, the 63.Nm zpool Cm remove 64command initiates the removal and returns, while the evacuation continues in 65the background. 66The removal progress can be monitored with 67.Nm zpool Cm status . 68If an IO error is encountered during the removal process it will be 69cancelled. The 70.Sy device_removal 71feature flag must be enabled to remove a top-level vdev, see 72.Xr zpool-features 5 . 73.Pp 74A mirrored top-level device (log or data) can be removed by specifying the top-level mirror for the 75same. 76Non-log devices or data devices that are part of a mirrored configuration can be removed using 77the 78.Nm zpool Cm detach 79command. 80.Bl -tag -width Ds 81.It Fl n 82Do not actually perform the removal ("no-op"). 83Instead, print the estimated amount of memory that will be used by the 84mapping table after the removal completes. 85This is nonzero only for top-level vdevs. 86.El 87.Bl -tag -width Ds 88.It Fl p 89Used in conjunction with the 90.Fl n 91flag, displays numbers as parsable (exact) values. 92.It Fl w 93Waits until the removal has completed before returning. 94.El 95.It Xo 96.Nm 97.Cm remove 98.Fl s 99.Ar pool 100.Xc 101Stops and cancels an in-progress removal of a top-level vdev. 102.El 103.Sh SEE ALSO 104.Xr zpool-add 8 , 105.Xr zpool-detach 8 , 106.Xr zpool-offline 8 , 107.Xr zpool-labelclear 8 , 108.Xr zpool-replace 8 , 109.Xr zpool-split 8 110