Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
ZPOOL-REMOVE(8)		    System Manager's Manual	       ZPOOL-REMOVE(8)

NAME
       zpool-remove -- remove devices from ZFS storage pool

SYNOPSIS
       zpool remove [-npw] pool	device
       zpool remove -s pool

DESCRIPTION
       zpool remove [-npw] pool	device
	       Removes	the specified device from the pool.  This command sup-
	       ports removing hot spare, cache,	log,  and  both	 mirrored  and
	       non-redundant primary top-level vdevs, including	dedup and spe-
	       cial vdevs.

	       Top-level vdevs can only	be removed if the primary pool storage
	       does  not  contain  a top-level raidz vdev, all top-level vdevs
	       have the	same sector size,  and	the  keys  for	all  encrypted
	       datasets	are loaded.

	       Removing	 a top-level vdev reduces the total amount of space in
	       the storage pool.  The specified	device will  be	 evacuated  by
	       copying all allocated space from	it to the other	devices	in the
	       pool.  In this case, the	zpool remove command initiates the re-
	       moval  and returns, while the evacuation	continues in the back-
	       ground.	The removal  progress  can  be	monitored  with	 zpool
	       status.	 If  an	 I/O  error  is	encountered during the removal
	       process it will be cancelled.  The device_removal feature  flag
	       must   be   enabled   to	  remove   a   top-level   vdev,   see
	       zpool-features(7).

	       A mirrored top-level device (log	or data)  can  be  removed  by
	       specifying the top- level mirror	for the	same.  Non-log devices
	       or  data	 devices that are part of a mirrored configuration can
	       be removed using	the zpool detach command.

	       -n      Do not actually perform	the  removal  ("No-op").   In-
		       stead,  print  the estimated amount of memory that will
		       be used by the mapping table  after  the	 removal  com-
		       pletes.	This is	nonzero	only for top-level vdevs.

	       -p      Used  in	conjunction with the -n	flag, displays numbers
		       as parsable (exact) values.

	       -w      Waits until the removal has completed before returning.

       zpool remove -s pool
	       Stops and cancels an in-progress	removal	of a top-level vdev.

EXAMPLES
   Example 1: Removing a Mirrored top-level (Log or Data) Device
       The following commands remove the mirrored log device mirror-2 and mir-
       rored top-level data device mirror-1.

       Given this configuration:
	       pool: tank
	      state: ONLINE
	      scrub: none requested
	     config:

		      NAME	  STATE	    READ WRITE CKSUM
		      tank	  ONLINE       0     0	   0
			mirror-0  ONLINE       0     0	   0
			  sda	  ONLINE       0     0	   0
			  sdb	  ONLINE       0     0	   0
			mirror-1  ONLINE       0     0	   0
			  sdc	  ONLINE       0     0	   0
			  sdd	  ONLINE       0     0	   0
		      logs
			mirror-2  ONLINE       0     0	   0
			  sde	  ONLINE       0     0	   0
			  sdf	  ONLINE       0     0	   0

       The command to remove the mirrored log mirror-2 is:
	     # zpool remove tank mirror-2

       The command to remove the mirrored data mirror-1	is:
	     # zpool remove tank mirror-1

SEE ALSO
       zpool-add(8), zpool-detach(8),  zpool-labelclear(8),  zpool-offline(8),
       zpool-replace(8), zpool-split(8)

FreeBSD	14.3			March 16, 2022		       ZPOOL-REMOVE(8)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=zpool-remove&sektion=8&manpath=FreeBSD+14.3-RELEASE+and+Ports>

home | help