summaryrefslogtreecommitdiffstats
path: root/sys-utils/blkdiscard.8
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:10:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:10:49 +0000
commitcfe5e3905201349e9cf3f95d52ff4bd100bde37d (patch)
treed0baf160cbee3195249d095f85e52d20c21acf02 /sys-utils/blkdiscard.8
parentInitial commit. (diff)
downloadutil-linux-cfe5e3905201349e9cf3f95d52ff4bd100bde37d.tar.xz
util-linux-cfe5e3905201349e9cf3f95d52ff4bd100bde37d.zip
Adding upstream version 2.39.3.upstream/2.39.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sys-utils/blkdiscard.8')
-rw-r--r--sys-utils/blkdiscard.8129
1 files changed, 129 insertions, 0 deletions
diff --git a/sys-utils/blkdiscard.8 b/sys-utils/blkdiscard.8
new file mode 100644
index 0000000..2bd5c2f
--- /dev/null
+++ b/sys-utils/blkdiscard.8
@@ -0,0 +1,129 @@
+'\" t
+.\" Title: blkdiscard
+.\" Author: [see the "AUTHOR(S)" section]
+.\" Generator: Asciidoctor 2.0.20
+.\" Date: 2023-11-21
+.\" Manual: System Administration
+.\" Source: util-linux 2.39.3
+.\" Language: English
+.\"
+.TH "BLKDISCARD" "8" "2023-11-21" "util\-linux 2.39.3" "System Administration"
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.ss \n[.ss] 0
+.nh
+.ad l
+.de URL
+\fI\\$2\fP <\\$1>\\$3
+..
+.als MTO URL
+.if \n[.g] \{\
+. mso www.tmac
+. am URL
+. ad l
+. .
+. am MTO
+. ad l
+. .
+. LINKSTYLE blue R < >
+.\}
+.SH "NAME"
+blkdiscard \- discard sectors on a device
+.SH "SYNOPSIS"
+.sp
+\fBblkdiscard\fP [options] [\fB\-o\fP \fIoffset\fP] [\fB\-l\fP \fIlength\fP] \fIdevice\fP
+.SH "DESCRIPTION"
+.sp
+\fBblkdiscard\fP is used to discard device sectors. This is useful for solid\-state drivers (SSDs) and thinly\-provisioned storage. Unlike \fBfstrim\fP(8), this command is used directly on the block device.
+.sp
+By default, \fBblkdiscard\fP will discard all blocks on the device. Options may be used to modify this behavior based on range or size, as explained below.
+.sp
+The \fIdevice\fP argument is the pathname of the block device.
+.sp
+\fBWARNING: All data in the discarded region on the device will be lost!\fP
+.SH "OPTIONS"
+.sp
+The \fIoffset\fP and \fIlength\fP 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.
+.sp
+\fB\-f\fP, \fB\-\-force\fP
+.RS 4
+Disable all checking. Since v2.36 the block device is open in exclusive mode (\fBO_EXCL\fP) by default to avoid collision with mounted filesystem or another kernel subsystem. The \fB\-\-force\fP option disables the exclusive access mode.
+.RE
+.sp
+\fB\-o\fP, \fB\-\-offset\fP \fIoffset\fP
+.RS 4
+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.
+.RE
+.sp
+\fB\-l\fP, \fB\-\-length\fP \fIlength\fP
+.RS 4
+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, \fBblkdiscard\fP will stop at the device size boundary. The default value extends to the end of the device.
+.RE
+.sp
+\fB\-p\fP, \fB\-\-step\fP \fIlength\fP
+.RS 4
+The number of bytes to discard within one iteration. The default is to discard all by one ioctl call.
+.RE
+.sp
+\fB\-q\fP, \fB\-\-quiet\fP
+.RS 4
+Suppress warning messages.
+.RE
+.sp
+\fB\-s\fP, \fB\-\-secure\fP
+.RS 4
+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.
+.RE
+.sp
+\fB\-z\fP, \fB\-\-zeroout\fP
+.RS 4
+Zero\-fill rather than discard.
+.RE
+.sp
+\fB\-v\fP, \fB\-\-verbose\fP
+.RS 4
+Display the aligned values of \fIoffset\fP and \fIlength\fP. If the \fB\-\-step\fP option is specified, it prints the discard progress every second.
+.RE
+.sp
+\fB\-h\fP, \fB\-\-help\fP
+.RS 4
+Display help text and exit.
+.RE
+.sp
+\fB\-V\fP, \fB\-\-version\fP
+.RS 4
+Print version and exit.
+.RE
+.SH "EXIT STATUS"
+.sp
+\fBblkdiscard\fP has the following exit status values:
+.sp
+\fB0\fP
+.RS 4
+success
+.RE
+.sp
+\fB1\fP
+.RS 4
+failure; incorrect invocation, permissions or any other generic error
+.RE
+.sp
+\fB2\fP
+.RS 4
+failure; since v2.39, the device does not support discard operation
+.RE
+.SH "AUTHORS"
+.sp
+.MTO "lczerner\(atredhat.com" "Lukas Czerner" ","
+.MTO "kzak\(atredhat.com" "Karel Zak" ""
+.SH "SEE ALSO"
+.sp
+\fBfstrim\fP(8)
+.SH "REPORTING BUGS"
+.sp
+For bug reports, use the issue tracker at \c
+.URL "https://github.com/util\-linux/util\-linux/issues" "" "."
+.SH "AVAILABILITY"
+.sp
+The \fBblkdiscard\fP command is part of the util\-linux package which can be downloaded from \c
+.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "." \ No newline at end of file