]> git.ipfire.org Git - thirdparty/util-linux.git/blame - disk-utils/blockdev.8
findmnt: error on --target /non-exist
[thirdparty/util-linux.git] / disk-utils / blockdev.8
CommitLineData
66ee8158 1.\" Copyright 1998 Andries E. Brouwer (aeb@cwi.nl)
a424171c 2.\" Copyright 2007 Karel Zak <kzak@redhat.com>
66ee8158
KZ
3.\"
4.\" May be distributed under the GNU General Public License
232dc924 5.TH BLOCKDEV 8 "August 2010" "util-linux" "System Administration"
66ee8158
KZ
6.SH NAME
7blockdev \- call block device ioctls from the command line
8.SH SYNOPSIS
9.B blockdev
455fdf4a
KZ
10.RB [ \-q ]
11.RB [ \-v ]
023dcba0
BIG
12.I command
13.RI [ command \&...\&]
14.I device
15.RI [ device \&...\&]
45be3f7d
LZ
16.br
17.B blockdev
feae57c9 18.B \-\-report
023dcba0 19.RI [ device \&...\&]
66ee8158
KZ
20.SH DESCRIPTION
21The utility
22.B blockdev
23allows one to call block device ioctls from the command line.
24.SH OPTIONS
455fdf4a 25.IP "\fB\-V\fP"
66ee8158 26Print version and exit.
455fdf4a 27.IP "\fB\-q\fP"
66ee8158 28Be quiet.
455fdf4a 29.IP "\fB\-v\fP"
66ee8158 30Be verbose.
455fdf4a
KZ
31.IP "\fB\-\-report\fP"
32Print a report for the specified device. It is possible to give multiple
33devices. If none is given, all devices which appear in /proc/partitions are
34shown. Note that the partition StartSec is in 512-byte sectors.
66ee8158 35.SH COMMANDS
455fdf4a
KZ
36It is possible to give multiple devices and multiple commands.
37.IP "\fB\-\-flushbufs\fP"
38Flush buffers.
39.IP "\fB\-\-getalignoff\fP"
40Get alignment offset.
41.IP "\fB\-\-getbsz\fP"
a424171c 42Print blocksize in bytes.
455fdf4a
KZ
43.IP "\fB\-\-getdiscardzeroes\fP"
44Get discard zeroes support status.
45.IP "\fB\-\-getfra\fP"
46Get filesystem readahead in 512-byte sectors.
47.IP "\fB\-\-getiomin\fP"
48Get minimum I/O size.
49.IP "\fB\-\-getioopt\fP"
50Get optimal I/O size.
51.IP "\fB\-\-getmaxsect\fP"
52Get max sectors per request
53.IP "\fB\-\-getpbsz\fP"
54Get physical block (sector) size.
55.IP "\fB\-\-getra\fP"
66ee8158 56Print readahead (in 512-byte sectors).
455fdf4a
KZ
57.IP "\fB\-\-getro\fP"
58Get read-only. Print 1 if the device is read-only, 0 otherwise.
59.IP "\fB\-\-getsize64\fP"
60Print device size in bytes.
61.IP "\fB\-\-getsize\fP"
023dcba0 62Print device size (32-bit!) in sectors. Deprecated in favor of the \-\-getsz option.
455fdf4a 63.IP "\fB\-\-getss\fP"
d35df4db 64Print sector size in bytes \(en usually 512.
455fdf4a
KZ
65.IP "\fB\-\-getsz\fP"
66Get size in 512-byte sectors.
67.IP "\fB\-\-rereadpt\fP"
16493c3e 68Reread partition table
39d2e706 69.IP "\fB\-\-setbsz\fP \fIbytes\fP"
7ab32ae6
KZ
70Set blocksize. Note that the block size is specific to the current file
71descriptor opening the block device, so the change of block size only persists
72for as long as blockdev has the device open, and is lost once blockdev exits.
455fdf4a 73.IP "\fB\-\-setfra\fP \fIsectors\fP"
023dcba0 74Set filesystem readahead (same like \-\-setra on 2.6 kernels).
455fdf4a
KZ
75.IP "\fB\-\-setra\fP \fIsectors\fP"
76Set readahead (in 512-byte sectors).
77.IP "\fB\-\-setro\fP"
78Set read-only.
79.IP "\fB\-\-setrw\fP"
80Set read-write.
a424171c 81.SH AUTHOR
023dcba0 82blockdev was written by Andries E.\& Brouwer and rewritten by Karel Zak.
a424171c 83.SH AVAILABILITY
601d12fb
KZ
84The blockdev command is part of the util-linux package and is available from
85ftp://ftp.kernel.org/pub/linux/utils/util-linux/.