There is quite some value (in terms of readability and user expectations) if consistent names are used for the sections within manual pages. This patch is one of a series to bring about this consistency. In the Linux man-pages project, I long ago did away with the AUTHOR(S) section, but I realize some projects like to keep this. But, let's make sure that the section is consistently titled across pages. Currently we have AUTHOR (47) or AUTHORS (41). Let's standardize on the latter (which is also what is suggested in man-pages(7)). Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
90 lines
2.8 KiB
Groff
90 lines
2.8 KiB
Groff
.TH BLKDISCARD 8 "July 2014" "util-linux" "System Administration"
|
|
.SH NAME
|
|
blkdiscard \- discard sectors on a device
|
|
.SH SYNOPSIS
|
|
.B blkdiscard
|
|
[options]
|
|
.RB [ \-o
|
|
.IR offset ]
|
|
.RB [ \-l
|
|
.IR length ]
|
|
.I device
|
|
.SH DESCRIPTION
|
|
.B blkdiscard
|
|
is used to discard device sectors. This is useful for solid-state
|
|
drivers (SSDs) and thinly-provisioned storage. Unlike
|
|
.BR fstrim (8),
|
|
this command is used directly on the block device.
|
|
.PP
|
|
By default,
|
|
.B blkdiscard
|
|
will discard all blocks on the device. Options may be used to modify
|
|
this behavior based on range or size, as explained below.
|
|
.PP
|
|
The
|
|
.I device
|
|
argument is the pathname of the block device.
|
|
.PP
|
|
.B WARNING: All data in the discarded region on the device will be lost!
|
|
.SH OPTIONS
|
|
The
|
|
.I offset
|
|
and
|
|
.I length
|
|
arguments may be 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.
|
|
.TP
|
|
.BR \-f , " \-\-force"
|
|
Disable all checking. Since v2.36 the block device is open in exclusive mode (O_EXCL)
|
|
by default to avoid collision with mounted filesystem or another kernel subsystem.
|
|
The force option disables the exclusive access mode.
|
|
.TP
|
|
.BR \-o , " \-\-offset \fIoffset"
|
|
Byte offset into the device from which to start discarding. The provided value
|
|
must be aligned to the device sector size. The default value is zero.
|
|
.TP
|
|
.BR \-l , " \-\-length \fIlength"
|
|
The number of bytes to discard (counting from the starting point). The provided value
|
|
must be aligned to the device sector size. If the specified value extends past
|
|
the end of the device,
|
|
.B blkdiscard
|
|
will stop at the device size boundary. The default value extends to the end
|
|
of the device.
|
|
.TP
|
|
.BR \-p , " \-\-step \fIlength"
|
|
The number of bytes to discard within one iteration. The default is to discard
|
|
all by one ioctl call.
|
|
.TP
|
|
.BR \-s , " \-\-secure"
|
|
Perform a secure discard. A secure discard is the same as a regular discard
|
|
except that all copies of the discarded blocks that were possibly created by
|
|
garbage collection must also be erased. This requires support from the device.
|
|
.TP
|
|
.BR \-z , " \-\-zeroout"
|
|
Zero-fill rather than discard.
|
|
.TP
|
|
.BR \-v , " \-\-verbose"
|
|
Display the aligned values of
|
|
.I offset
|
|
and
|
|
.IR length .
|
|
If the \fB\-\-step\fR option is specified, it prints the discard progress every second.
|
|
.TP
|
|
.BR \-V , " \-\-version"
|
|
Display version information and exit.
|
|
.TP
|
|
.BR \-h , " \-\-help"
|
|
Display help text and exit.
|
|
.SH AUTHORS
|
|
.MT lczerner@redhat.com
|
|
Lukas Czerner
|
|
.ME
|
|
.SH SEE ALSO
|
|
.BR fstrim (8)
|
|
.SH AVAILABILITY
|
|
The blkdiscard command is part of the util-linux package and is available
|
|
.UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
|
|
Linux Kernel Archive
|
|
.UE .
|