summaryrefslogtreecommitdiffstats
path: root/disk-utils/blockdev.8
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:42:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:42:50 +0000
commit8cb83eee5a58b1fad74c34094ce3afb9e430b5a4 (patch)
treea9b2e7baeca1be40eb734371e3c8b11b02294497 /disk-utils/blockdev.8
parentInitial commit. (diff)
downloadutil-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 'disk-utils/blockdev.8')
-rw-r--r--disk-utils/blockdev.891
1 files changed, 91 insertions, 0 deletions
diff --git a/disk-utils/blockdev.8 b/disk-utils/blockdev.8
new file mode 100644
index 0000000..fb00606
--- /dev/null
+++ b/disk-utils/blockdev.8
@@ -0,0 +1,91 @@
+.\" Copyright 1998 Andries E. Brouwer (aeb@cwi.nl)
+.\" Copyright 2007 Karel Zak <kzak@redhat.com>
+.\"
+.\" May be distributed under the GNU General Public License
+.TH BLOCKDEV 8 "August 2010" "util-linux" "System Administration"
+.SH NAME
+blockdev \- call block device ioctls from the command line
+.SH SYNOPSIS
+.B blockdev
+.RB [ \-q ]
+.RB [ \-v ]
+.I command
+.RI [ command \&...\&]
+.I device
+.RI [ device \&...\&]
+.br
+.B blockdev
+.B \-\-report
+.RI [ device \&...\&]
+.br
+.B blockdev
+.RB \-h | \-V
+.SH DESCRIPTION
+The utility
+.B blockdev
+allows one to call block device ioctls from the command line.
+.SH OPTIONS
+.IP "\fB\-q\fP"
+Be quiet.
+.IP "\fB\-v\fP"
+Be verbose.
+.IP "\fB\-\-report\fP"
+Print a report for the specified device. It is possible to give multiple
+devices. If none is given, all devices which appear in /proc/partitions are
+shown. Note that the partition StartSec is in 512-byte sectors.
+.IP "\fB\-h\fR, \fB\-\-help\fR"
+Display help text and exit.
+.IP "\fB\-V\fR, \fB\-\-version\fR"
+Print version and exit.
+.SH COMMANDS
+It is possible to give multiple devices and multiple commands.
+.IP "\fB\-\-flushbufs\fP"
+Flush buffers.
+.IP "\fB\-\-getalignoff\fP"
+Get alignment offset.
+.IP "\fB\-\-getbsz\fP"
+Print blocksize in bytes.
+.IP "\fB\-\-getdiscardzeroes\fP"
+Get discard zeroes support status.
+.IP "\fB\-\-getfra\fP"
+Get filesystem readahead in 512-byte sectors.
+.IP "\fB\-\-getiomin\fP"
+Get minimum I/O size.
+.IP "\fB\-\-getioopt\fP"
+Get optimal I/O size.
+.IP "\fB\-\-getmaxsect\fP"
+Get max sectors per request
+.IP "\fB\-\-getpbsz\fP"
+Get physical block (sector) size.
+.IP "\fB\-\-getra\fP"
+Print readahead (in 512-byte sectors).
+.IP "\fB\-\-getro\fP"
+Get read-only. Print 1 if the device is read-only, 0 otherwise.
+.IP "\fB\-\-getsize64\fP"
+Print device size in bytes.
+.IP "\fB\-\-getsize\fP"
+Print device size (32-bit!) in sectors. Deprecated in favor of the \-\-getsz option.
+.IP "\fB\-\-getss\fP"
+Print logical sector size in bytes \(en usually 512.
+.IP "\fB\-\-getsz\fP"
+Get size in 512-byte sectors.
+.IP "\fB\-\-rereadpt\fP"
+Reread partition table
+.IP "\fB\-\-setbsz\fP \fIbytes\fP"
+Set blocksize. Note that the block size is specific to the current file
+descriptor opening the block device, so the change of block size only persists
+for as long as blockdev has the device open, and is lost once blockdev exits.
+.IP "\fB\-\-setfra\fP \fIsectors\fP"
+Set filesystem readahead (same like \-\-setra on 2.6 kernels).
+.IP "\fB\-\-setra\fP \fIsectors\fP"
+Set readahead (in 512-byte sectors).
+.IP "\fB\-\-setro\fP"
+Set read-only. The currently active access to the device may not be affected by the change. For example
+filesystem already mounted in read-write mode will not be affected. The change applies after remount.
+.IP "\fB\-\-setrw\fP"
+Set read-write.
+.SH AUTHOR
+blockdev was written by Andries E.\& Brouwer and rewritten by Karel Zak.
+.SH AVAILABILITY
+The blockdev command is part of the util-linux package and is available from
+https://www.kernel.org/pub/linux/utils/util-linux/.