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