]>
Commit | Line | Data |
---|---|---|
c5ebfbbe RW |
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 | .\" | |
c5ebfbbe RW |
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 | .\" | |
f84fe3fc | 29 | .Dd May 27, 2021 |
c5ebfbbe | 30 | .Dt ZPOOL-TRIM 8 |
6706552e | 31 | .Os |
f84fe3fc | 32 | . |
c5ebfbbe | 33 | .Sh NAME |
1e36af8c | 34 | .Nm zpool-trim |
f84fe3fc | 35 | .Nd initiate TRIM of free space in ZFS storage pool |
c5ebfbbe | 36 | .Sh SYNOPSIS |
1e36af8c | 37 | .Nm zpool |
c5ebfbbe | 38 | .Cm trim |
2288d419 | 39 | .Op Fl dw |
c5ebfbbe | 40 | .Op Fl r Ar rate |
f84fe3fc | 41 | .Op Fl c Ns | Ns Fl s |
c5ebfbbe | 42 | .Ar pool |
f84fe3fc AZ |
43 | .Oo Ar device Ns Oc Ns … |
44 | . | |
c5ebfbbe | 45 | .Sh DESCRIPTION |
c5ebfbbe | 46 | Initiates an immediate on-demand TRIM operation for all of the free space in |
f84fe3fc AZ |
47 | a pool. |
48 | This operation informs the underlying storage devices of all blocks | |
c5ebfbbe RW |
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 | |
f84fe3fc AZ |
54 | pool property setting. |
55 | See the documentation for the | |
c5ebfbbe RW |
56 | .Sy autotrim |
57 | property above for the types of vdev devices which can be trimmed. | |
58 | .Bl -tag -width Ds | |
f84fe3fc AZ |
59 | .It Fl d , -secure |
60 | Causes a secure TRIM to be initiated. | |
61 | When performing a secure TRIM, the | |
c5ebfbbe RW |
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. | |
f84fe3fc AZ |
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 | |
c5ebfbbe RW |
69 | per second, is applied on a per-vdev basis and may be set differently for |
70 | each leaf vdev. | |
f84fe3fc | 71 | .It Fl c , -cancel |
c5ebfbbe RW |
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. | |
f84fe3fc | 76 | .It Fl s , -suspend |
c5ebfbbe RW |
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. | |
f84fe3fc | 84 | .It Fl w , -wait |
2288d419 | 85 | Wait until the devices are done being trimmed before returning. |
c5ebfbbe | 86 | .El |
f84fe3fc | 87 | . |
c5ebfbbe | 88 | .Sh SEE ALSO |
2badb345 | 89 | .Xr zpoolprops 7 , |
c5ebfbbe | 90 | .Xr zpool-initialize 8 , |
2badb345 | 91 | .Xr zpool-wait 8 |