The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/openzfs/man/man8/zpool-remove.8

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    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 https://opensource.org/licenses/CDDL-1.0.
   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 March 16, 2022
   30 .Dt ZPOOL-REMOVE 8
   31 .Os
   32 .
   33 .Sh NAME
   34 .Nm zpool-remove
   35 .Nd remove devices from ZFS storage pool
   36 .
   37 .Sh SYNOPSIS
   38 .Nm zpool
   39 .Cm remove
   40 .Op Fl npw
   41 .Ar pool Ar device Ns …
   42 .Nm zpool
   43 .Cm remove
   44 .Fl s
   45 .Ar pool
   46 .
   47 .Sh DESCRIPTION
   48 .Bl -tag -width Ds
   49 .It Xo
   50 .Nm zpool
   51 .Cm remove
   52 .Op Fl npw
   53 .Ar pool Ar device Ns …
   54 .Xc
   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.
   58 .Pp
   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.
   62 .Pp
   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.
   66 In this case, the
   67 .Nm zpool Cm remove
   68 command initiates the removal and returns, while the evacuation continues in
   69 the background.
   70 The removal progress can be monitored with
   71 .Nm zpool Cm status .
   72 If an I/O error is encountered during the removal process it will be cancelled.
   73 The
   74 .Sy device_removal
   75 feature flag must be enabled to remove a top-level vdev, see
   76 .Xr zpool-features 7 .
   77 .Pp
   78 A mirrored top-level device (log or data) can be removed by specifying the top-
   79 level mirror for the
   80 same.
   81 Non-log devices or data devices that are part of a mirrored configuration can be
   82 removed using
   83 the
   84 .Nm zpool Cm detach
   85 command.
   86 .Bl -tag -width Ds
   87 .It Fl n
   88 Do not actually perform the removal
   89 .Pq Qq No-op .
   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.
   93 .El
   94 .Bl -tag -width Ds
   95 .It Fl p
   96 Used in conjunction with the
   97 .Fl n
   98 flag, displays numbers as parsable (exact) values.
   99 .It Fl w
  100 Waits until the removal has completed before returning.
  101 .El
  102 .It Xo
  103 .Nm zpool
  104 .Cm remove
  105 .Fl s
  106 .Ar pool
  107 .Xc
  108 Stops and cancels an in-progress removal of a top-level vdev.
  109 .El
  110 .
  111 .Sh EXAMPLES
  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
  116 .Sy mirror-2
  117 and mirrored top-level data device
  118 .Sy mirror-1 .
  119 .Pp
  120 Given this configuration:
  121 .Bd -literal -compact -offset Ds
  122   pool: tank
  123  state: ONLINE
  124  scrub: none requested
  125 config:
  126 
  127          NAME        STATE     READ WRITE CKSUM
  128          tank        ONLINE       0     0     0
  129            mirror-0  ONLINE       0     0     0
  130              sda     ONLINE       0     0     0
  131              sdb     ONLINE       0     0     0
  132            mirror-1  ONLINE       0     0     0
  133              sdc     ONLINE       0     0     0
  134              sdd     ONLINE       0     0     0
  135          logs
  136            mirror-2  ONLINE       0     0     0
  137              sde     ONLINE       0     0     0
  138              sdf     ONLINE       0     0     0
  139 .Ed
  140 .Pp
  141 The command to remove the mirrored log
  142 .Ar mirror-2 No is :
  143 .Dl # Nm zpool Cm remove Ar tank mirror-2
  144 .Pp
  145 The command to remove the mirrored data
  146 .Ar mirror-1 No is :
  147 .Dl # Nm zpool Cm remove Ar tank mirror-1
  148 .
  149 .Sh SEE ALSO
  150 .Xr zpool-add 8 ,
  151 .Xr zpool-detach 8 ,
  152 .Xr zpool-labelclear 8 ,
  153 .Xr zpool-offline 8 ,
  154 .Xr zpool-replace 8 ,
  155 .Xr zpool-split 8

Cache object: 74559dc9072800e0bdb6b37b4d89b8f6


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.