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-trim.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 May 27, 2021
   30 .Dt ZPOOL-TRIM 8
   31 .Os
   32 .
   33 .Sh NAME
   34 .Nm zpool-trim
   35 .Nd initiate TRIM of free space in ZFS storage pool
   36 .Sh SYNOPSIS
   37 .Nm zpool
   38 .Cm trim
   39 .Op Fl dw
   40 .Op Fl r Ar rate
   41 .Op Fl c Ns | Ns Fl s
   42 .Ar pool
   43 .Oo Ar device Ns Oc Ns …
   44 .
   45 .Sh DESCRIPTION
   46 Initiates an immediate on-demand TRIM operation for all of the free space in
   47 a pool.
   48 This operation informs the underlying storage devices of all blocks
   49 in the pool which are no longer allocated and allows thinly provisioned
   50 devices to reclaim the space.
   51 .Pp
   52 A manual on-demand TRIM operation can be initiated irrespective of the
   53 .Sy autotrim
   54 pool property setting.
   55 See the documentation for the
   56 .Sy autotrim
   57 property above for the types of vdev devices which can be trimmed.
   58 .Bl -tag -width Ds
   59 .It Fl d , -secure
   60 Causes a secure TRIM to be initiated.
   61 When performing a secure TRIM, the
   62 device guarantees that data stored on the trimmed blocks has been erased.
   63 This requires support from the device and is not supported by all SSDs.
   64 .It Fl r , -rate Ar rate
   65 Controls the rate at which the TRIM operation progresses.
   66 Without this
   67 option TRIM is executed as quickly as possible.
   68 The rate, expressed in bytes
   69 per second, is applied on a per-vdev basis and may be set differently for
   70 each leaf vdev.
   71 .It Fl c , -cancel
   72 Cancel trimming on the specified devices, or all eligible devices if none
   73 are specified.
   74 If one or more target devices are invalid or are not currently being
   75 trimmed, the command will fail and no cancellation will occur on any device.
   76 .It Fl s , -suspend
   77 Suspend trimming on the specified devices, or all eligible devices if none
   78 are specified.
   79 If one or more target devices are invalid or are not currently being
   80 trimmed, the command will fail and no suspension will occur on any device.
   81 Trimming can then be resumed by running
   82 .Nm zpool Cm trim
   83 with no flags on the relevant target devices.
   84 .It Fl w , -wait
   85 Wait until the devices are done being trimmed before returning.
   86 .El
   87 .Sh PERIODIC TRIM
   88 On machines using systemd, trim timers can be enabled on a per-pool basis.
   89 .Nm weekly
   90 and
   91 .Nm monthly
   92 timer units are provided.
   93 .Bl -tag -width Ds
   94 .It Xo
   95 .Xc
   96 .Nm systemctl
   97 .Cm enable
   98 .Cm zfs-trim-\fIweekly\fB@\fIrpool\fB.timer
   99 .Cm --now
  100 .It Xo
  101 .Xc
  102 .Nm systemctl
  103 .Cm enable
  104 .Cm zfs-trim-\fImonthly\fB@\fIotherpool\fB.timer
  105 .Cm --now
  106 .El
  107 .
  108 .Sh SEE ALSO
  109 .Xr systemd.timer 5 ,
  110 .Xr zpoolprops 7 ,
  111 .Xr zpool-initialize 8 ,
  112 .Xr zpool-wait 8

Cache object: 67a57bd15d9db6cc8e6c5288bea39d95


[ 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.