]>
Commit | Line | Data |
---|---|---|
66ee8158 KZ |
1 | .\" -*- nroff -*- |
2 | .\" Copyright 1998 Andries E. Brouwer (aeb@cwi.nl) | |
a424171c | 3 | .\" Copyright 2007 Karel Zak <kzak@redhat.com> |
66ee8158 KZ |
4 | .\" |
5 | .\" May be distributed under the GNU General Public License | |
455fdf4a | 6 | .TH BLOCKDEV 8 "Aug 2010" "" |
66ee8158 KZ |
7 | .SH NAME |
8 | blockdev \- call block device ioctls from the command line | |
9 | .SH SYNOPSIS | |
10 | .B blockdev | |
455fdf4a KZ |
11 | .RB [ \-q ] |
12 | .RB [ \-v ] | |
13 | .IR command | |
14 | .RI [ command ...] | |
15 | .IR device | |
16 | .RI [ device ...] | |
45be3f7d LZ |
17 | .br |
18 | .B blockdev | |
feae57c9 | 19 | .B \-\-report |
455fdf4a | 20 | .RI [ device ...] |
66ee8158 KZ |
21 | .SH DESCRIPTION |
22 | The utility | |
23 | .B blockdev | |
24 | allows one to call block device ioctls from the command line. | |
25 | .SH OPTIONS | |
455fdf4a | 26 | .IP "\fB\-V\fP" |
66ee8158 | 27 | Print version and exit. |
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. | |
66ee8158 | 36 | .SH COMMANDS |
455fdf4a KZ |
37 | It is possible to give multiple devices and multiple commands. |
38 | .IP "\fB\-\-flushbufs\fP" | |
39 | Flush buffers. | |
40 | .IP "\fB\-\-getalignoff\fP" | |
41 | Get alignment offset. | |
42 | .IP "\fB\-\-getbsz\fP" | |
a424171c | 43 | Print blocksize in bytes. |
455fdf4a KZ |
44 | .IP "\fB\-\-getdiscardzeroes\fP" |
45 | Get discard zeroes support status. | |
46 | .IP "\fB\-\-getfra\fP" | |
47 | Get filesystem readahead in 512-byte sectors. | |
48 | .IP "\fB\-\-getiomin\fP" | |
49 | Get minimum I/O size. | |
50 | .IP "\fB\-\-getioopt\fP" | |
51 | Get optimal I/O size. | |
52 | .IP "\fB\-\-getmaxsect\fP" | |
53 | Get max sectors per request | |
54 | .IP "\fB\-\-getpbsz\fP" | |
55 | Get physical block (sector) size. | |
56 | .IP "\fB\-\-getra\fP" | |
66ee8158 | 57 | Print readahead (in 512-byte sectors). |
455fdf4a KZ |
58 | .IP "\fB\-\-getro\fP" |
59 | Get read-only. Print 1 if the device is read-only, 0 otherwise. | |
60 | .IP "\fB\-\-getsize64\fP" | |
61 | Print device size in bytes. | |
62 | .IP "\fB\-\-getsize\fP" | |
63 | Print device size (32-bit!) in sectors. Deprecated in favor of the --getsz option. | |
64 | .IP "\fB\-\-getss\fP" | |
65 | Print sectorsize in bytes - usually 512. | |
66 | .IP "\fB\-\-getsz\fP" | |
67 | Get size in 512-byte sectors. | |
68 | .IP "\fB\-\-rereadpt\fP" | |
69 | Seread partition table | |
70 | .IP "\fB\-\-setbsz\fP \fIbytes\fP" | |
71 | Set blocksize. | |
72 | .IP "\fB\-\-setfra\fP \fIsectors\fP" | |
c2a1e788 | 73 | Set filesystem readahead (same like --setra on 2.6 kernels). |
455fdf4a KZ |
74 | .IP "\fB\-\-setra\fP \fIsectors\fP" |
75 | Set readahead (in 512-byte sectors). | |
76 | .IP "\fB\-\-setro\fP" | |
77 | Set read-only. | |
78 | .IP "\fB\-\-setrw\fP" | |
79 | Set read-write. | |
a424171c | 80 | .SH AUTHOR |
8f831009 | 81 | blockdev was written by Andries E. Brouwer and rewritten by Karel Zak. |
a424171c | 82 | .SH AVAILABILITY |
86d62711 | 83 | The blockdev command is part of the util-linux-ng package and is available from |
a424171c KZ |
84 | ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/. |
85 |