diff options
Diffstat (limited to 'sys-utils/fstrim.8')
| -rw-r--r-- | sys-utils/fstrim.8 | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/sys-utils/fstrim.8 b/sys-utils/fstrim.8 index f3708b5ac..ae331e310 100644 --- a/sys-utils/fstrim.8 +++ b/sys-utils/fstrim.8 @@ -4,6 +4,7 @@ fstrim \- discard unused blocks on a mounted filesystem .SH SYNOPSIS .B fstrim +.RB [ \-a ] .RB [ \-o .IR offset ] .RB [ \-l @@ -28,6 +29,15 @@ The .I mountpoint argument is the pathname of the directory where the filesystem is mounted. +.PP +Running +.B fstrim +more frequently or even using +.B mount -o discard +might affect lifetime of the poor quality SSD devices. The usual sufficient +frequency is once a week for most desktop and server systems. Note that not all +devices support queued trim, so each trim command incur a performance penalty +to whatever else might be trying to use the disk at the time. .SH OPTIONS The \fIoffset\fR, \fIlength\fR, and \fIminimum-free-extent\fR arguments may be @@ -35,8 +45,14 @@ followed by the multiplicative suffixes KiB=1024, MiB=1024*1024, and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g. "K" has the same meaning as "KiB") or the suffixes KB=1000, MB=1000*1000, and so on for GB, TB, PB, EB, ZB and YB. +.IP "\fB\-a, \-\-all\fP" +Trim all mounted filesystems on devices that support the discard operation. +The other supplied options, like \fB\-\-offset\fR, \fB\-\-length\fR and +\fB-\-minimum\fR, are applied to all these devices. +Errors from filesystems that do not support the discard operation are silently +ignored. .IP "\fB\-h, \-\-help\fP" -Print help and exit. +Display help text and exit. .IP "\fB\-o, \-\-offset\fP \fIoffset\fP" Byte offset in filesystem from which to begin searching for free blocks to discard. Default value is zero, starting at the beginning of the @@ -73,6 +89,20 @@ LVM setup, etc. These reductions would not be reflected in fstrim_range.len .B --length option). +.SH RETURN CODES +.IP 0 +success +.IP 1 +failure +.IP 32 +all failed +.IP 64 +some filesystem discards have succeeded, some failed +.PP +The command +.B fstrim --all +returns 0 (all success), 32 (all failed) or 64 (some failed, some success). + .SH AUTHOR .nf Lukas Czerner <lczerner@redhat.com> |
