]>
Commit | Line | Data |
---|---|---|
295b3979 | 1 | //po4a: entry man manual |
c6a568fc MB |
2 | //// |
3 | Copyright 1998 Andries E. Brouwer (aeb@cwi.nl) | |
4 | Copyright 2007 Karel Zak <kzak@redhat.com> | |
5 | ||
6 | May be distributed under the GNU General Public License | |
7 | //// | |
8 | = blockdev(8) | |
9 | :doctype: manpage | |
10 | :man manual: System Administration | |
11 | :man source: util-linux {release-version} | |
12 | :page-layout: base | |
13 | :command: blockdev | |
14 | ||
15 | == NAME | |
16 | ||
17 | blockdev - call block device ioctls from the command line | |
18 | ||
19 | == SYNOPSIS | |
20 | ||
21 | *blockdev* [*-q*] [*-v*] _command_ [_command_...] _device_ [_device_...] | |
22 | ||
23 | *blockdev* *--report* [_device_...] | |
24 | ||
25 | *blockdev* *-h*|*-V* | |
26 | ||
27 | == DESCRIPTION | |
28 | ||
29 | The utility *blockdev* allows one to call block device ioctls from the command line. | |
30 | ||
31 | == OPTIONS | |
32 | ||
33 | *-q*:: | |
299604dd | 34 | Be quiet. |
c6a568fc MB |
35 | |
36 | *-v*:: | |
299604dd | 37 | Be verbose. |
c6a568fc MB |
38 | |
39 | *--report*:: | |
299604dd | 40 | 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. |
c6a568fc | 41 | |
2b2d3172 | 42 | include::man-common/help-version.adoc[] |
c6a568fc MB |
43 | |
44 | == COMMANDS | |
45 | ||
46 | It is possible to give multiple devices and multiple commands. | |
47 | ||
48 | *--flushbufs*:: | |
299604dd | 49 | Flush buffers. |
c6a568fc MB |
50 | |
51 | *--getalignoff*:: | |
299604dd | 52 | Get alignment offset. |
c6a568fc MB |
53 | |
54 | *--getbsz*:: | |
299604dd | 55 | Print the blocksize in bytes. This size does not describe device topology. It's the size used internally by the kernel and it may be modified (for example) by filesystem driver on mount. |
c6a568fc MB |
56 | |
57 | *--getdiscardzeroes*:: | |
299604dd | 58 | Get discard zeroes support status. |
c6a568fc | 59 | |
c10adc20 TW |
60 | *--getdiskseq*:: |
61 | Get disk sequence number. | |
62 | ||
4832fd9f TW |
63 | *--getzonesz*:: |
64 | Get zone size in 512-byte sectors. | |
65 | ||
c6a568fc | 66 | *--getfra*:: |
299604dd | 67 | Get filesystem readahead in 512-byte sectors. |
c6a568fc MB |
68 | |
69 | *--getiomin*:: | |
299604dd | 70 | Get minimum I/O size. |
c6a568fc MB |
71 | |
72 | *--getioopt*:: | |
299604dd | 73 | Get optimal I/O size. |
c6a568fc MB |
74 | |
75 | *--getmaxsect*:: | |
299604dd | 76 | Get max sectors per request. |
c6a568fc MB |
77 | |
78 | *--getpbsz*:: | |
299604dd | 79 | Get physical block (sector) size. |
c6a568fc MB |
80 | |
81 | *--getra*:: | |
299604dd | 82 | Print readahead (in 512-byte sectors). |
c6a568fc MB |
83 | |
84 | *--getro*:: | |
299604dd | 85 | Get read-only. Print 1 if the device is read-only, 0 otherwise. |
c6a568fc MB |
86 | |
87 | *--getsize64*:: | |
299604dd | 88 | Print device size in bytes. |
c6a568fc MB |
89 | |
90 | *--getsize*:: | |
299604dd | 91 | Print device size (32-bit!) in sectors. Deprecated in favor of the *--getsz* option. |
c6a568fc MB |
92 | |
93 | *--getss*:: | |
299604dd | 94 | Print logical sector size in bytes - usually 512. |
c6a568fc MB |
95 | |
96 | *--getsz*:: | |
299604dd | 97 | Get size in 512-byte sectors. |
c6a568fc MB |
98 | |
99 | *--rereadpt*:: | |
299604dd | 100 | Reread partition table |
c6a568fc MB |
101 | |
102 | *--setbsz* _bytes_:: | |
299604dd | 103 | 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. |
c6a568fc MB |
104 | |
105 | *--setfra* _sectors_:: | |
299604dd | 106 | Set filesystem readahead (same as *--setra* on 2.6 kernels). |
c6a568fc MB |
107 | |
108 | *--setra* _sectors_:: | |
299604dd | 109 | Set readahead (in 512-byte sectors). |
c6a568fc MB |
110 | |
111 | *--setro*:: | |
299604dd | 112 | Set read-only. The currently active access to the device may not be affected by the change. For example, a filesystem already mounted in read-write mode will not be affected. The change applies after remount. |
c6a568fc MB |
113 | |
114 | *--setrw*:: | |
299604dd | 115 | Set read-write. |
c6a568fc MB |
116 | |
117 | == AUTHORS | |
118 | ||
119 | *blockdev* was written by Andries E. Brouwer and rewritten by Karel Zak. | |
120 | ||
625e9c61 | 121 | include::man-common/bugreports.adoc[] |
c6a568fc | 122 | |
625e9c61 | 123 | include::man-common/footer.adoc[] |
c6a568fc MB |
124 | |
125 | ifdef::translation[] | |
625e9c61 | 126 | include::man-common/translation.adoc[] |
c6a568fc | 127 | endif::[] |