1BLOCKDEV(8) System Administration BLOCKDEV(8)
2
3
4
6 blockdev - call block device ioctls from the command line
7
9 blockdev [-q] [-v] command [command...] device [device...]
10 blockdev --report [device...]
11
13 The utility blockdev allows one to call block device ioctls from the
14 command line.
15
17 -V Print version and exit.
18
19 -q Be quiet.
20
21 -v Be verbose.
22
23 --report
24 Print a report for the specified device. It is possible to give
25 multiple devices. If none is given, all devices which appear in
26 /proc/partitions are shown. Note that the partition StartSec is
27 in 512-byte sectors.
28
30 It is possible to give multiple devices and multiple commands.
31
32 --flushbufs
33 Flush buffers.
34
35 --getalignoff
36 Get alignment offset.
37
38 --getbsz
39 Print blocksize in bytes.
40
41 --getdiscardzeroes
42 Get discard zeroes support status.
43
44 --getfra
45 Get filesystem readahead in 512-byte sectors.
46
47 --getiomin
48 Get minimum I/O size.
49
50 --getioopt
51 Get optimal I/O size.
52
53 --getmaxsect
54 Get max sectors per request
55
56 --getpbsz
57 Get physical block (sector) size.
58
59 --getra
60 Print readahead (in 512-byte sectors).
61
62 --getro
63 Get read-only. Print 1 if the device is read-only, 0 otherwise.
64
65 --getsize64
66 Print device size in bytes.
67
68 --getsize
69 Print device size (32-bit!) in sectors. Deprecated in favor of
70 the --getsz option.
71
72 --getss
73 Print sectorsize in bytes - usually 512.
74
75 --getsz
76 Get size in 512-byte sectors.
77
78 --rereadpt
79 Reread partition table
80
81 --setbsz bytes
82 Set blocksize. Note that the block size is specific to the cur‐
83 rent file descriptor opening the block device, so the change of
84 block size only persists for as long as blockdev has the device
85 open, and is lost once blockdev exits.
86
87 --setfra sectors
88 Set filesystem readahead (same like --setra on 2.6 kernels).
89
90 --setra sectors
91 Set readahead (in 512-byte sectors).
92
93 --setro
94 Set read-only.
95
96 --setrw
97 Set read-write.
98
100 blockdev was written by Andries E. Brouwer and rewritten by Karel Zak.
101
103 The blockdev command is part of the util-linux package and is available
104 from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
105
106
107
108
109util-linux August 2010 BLOCKDEV(8)