diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 02:42:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 02:42:50 +0000 |
commit | 8cb83eee5a58b1fad74c34094ce3afb9e430b5a4 (patch) | |
tree | a9b2e7baeca1be40eb734371e3c8b11b02294497 /sys-utils/blkdiscard.8 | |
parent | Initial commit. (diff) | |
download | util-linux-8cb83eee5a58b1fad74c34094ce3afb9e430b5a4.tar.xz util-linux-8cb83eee5a58b1fad74c34094ce3afb9e430b5a4.zip |
Adding upstream version 2.33.1.upstream/2.33.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | sys-utils/blkdiscard.8 | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/sys-utils/blkdiscard.8 b/sys-utils/blkdiscard.8 new file mode 100644 index 0000000..1f3a32b --- /dev/null +++ b/sys-utils/blkdiscard.8 @@ -0,0 +1,85 @@ +.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 \-o , " \-\-offset \fIoffset" +Byte offset into the device from which to start discarding. The provided value +will 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 +will 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 AUTHOR +.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 . |