]>
Commit | Line | Data |
---|---|---|
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 |
7 | blockdev \- 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 |
21 | The utility | |
22 | .B blockdev | |
23 | allows one to call block device ioctls from the command line. | |
24 | .SH OPTIONS | |
455fdf4a | 25 | .IP "\fB\-V\fP" |
66ee8158 | 26 | Print version and exit. |
455fdf4a | 27 | .IP "\fB\-q\fP" |
66ee8158 | 28 | Be quiet. |
455fdf4a | 29 | .IP "\fB\-v\fP" |
66ee8158 | 30 | Be verbose. |
455fdf4a KZ |
31 | .IP "\fB\-\-report\fP" |
32 | Print a report for the specified device. It is possible to give multiple | |
33 | devices. If none is given, all devices which appear in /proc/partitions are | |
34 | shown. Note that the partition StartSec is in 512-byte sectors. | |
66ee8158 | 35 | .SH COMMANDS |
455fdf4a KZ |
36 | It is possible to give multiple devices and multiple commands. |
37 | .IP "\fB\-\-flushbufs\fP" | |
38 | Flush buffers. | |
39 | .IP "\fB\-\-getalignoff\fP" | |
40 | Get alignment offset. | |
41 | .IP "\fB\-\-getbsz\fP" | |
a424171c | 42 | Print blocksize in bytes. |
455fdf4a KZ |
43 | .IP "\fB\-\-getdiscardzeroes\fP" |
44 | Get discard zeroes support status. | |
45 | .IP "\fB\-\-getfra\fP" | |
46 | Get filesystem readahead in 512-byte sectors. | |
47 | .IP "\fB\-\-getiomin\fP" | |
48 | Get minimum I/O size. | |
49 | .IP "\fB\-\-getioopt\fP" | |
50 | Get optimal I/O size. | |
51 | .IP "\fB\-\-getmaxsect\fP" | |
52 | Get max sectors per request | |
53 | .IP "\fB\-\-getpbsz\fP" | |
54 | Get physical block (sector) size. | |
55 | .IP "\fB\-\-getra\fP" | |
66ee8158 | 56 | Print readahead (in 512-byte sectors). |
455fdf4a KZ |
57 | .IP "\fB\-\-getro\fP" |
58 | Get read-only. Print 1 if the device is read-only, 0 otherwise. | |
59 | .IP "\fB\-\-getsize64\fP" | |
60 | Print device size in bytes. | |
61 | .IP "\fB\-\-getsize\fP" | |
023dcba0 | 62 | Print device size (32-bit!) in sectors. Deprecated in favor of the \-\-getsz option. |
455fdf4a | 63 | .IP "\fB\-\-getss\fP" |
d35df4db | 64 | Print sector size in bytes \(en usually 512. |
455fdf4a KZ |
65 | .IP "\fB\-\-getsz\fP" |
66 | Get size in 512-byte sectors. | |
67 | .IP "\fB\-\-rereadpt\fP" | |
16493c3e | 68 | Reread partition table |
39d2e706 | 69 | .IP "\fB\-\-setbsz\fP \fIbytes\fP" |
7ab32ae6 KZ |
70 | Set blocksize. Note that the block size is specific to the current file |
71 | descriptor opening the block device, so the change of block size only persists | |
72 | for as long as blockdev has the device open, and is lost once blockdev exits. | |
455fdf4a | 73 | .IP "\fB\-\-setfra\fP \fIsectors\fP" |
023dcba0 | 74 | Set filesystem readahead (same like \-\-setra on 2.6 kernels). |
455fdf4a KZ |
75 | .IP "\fB\-\-setra\fP \fIsectors\fP" |
76 | Set readahead (in 512-byte sectors). | |
77 | .IP "\fB\-\-setro\fP" | |
78 | Set read-only. | |
79 | .IP "\fB\-\-setrw\fP" | |
80 | Set read-write. | |
a424171c | 81 | .SH AUTHOR |
023dcba0 | 82 | blockdev was written by Andries E.\& Brouwer and rewritten by Karel Zak. |
a424171c | 83 | .SH AVAILABILITY |
601d12fb | 84 | The blockdev command is part of the util-linux package and is available from |
d673b74e | 85 | https://www.kernel.org/pub/linux/utils/util-linux/. |