1BLOCKDEV(8)                  System Administration                 BLOCKDEV(8)
2
3
4

NAME

6       blockdev - call block device ioctls from the command line
7

SYNOPSIS

9       blockdev [-q] [-v] command [command...] device [device...]
10       blockdev --report [device...]
11       blockdev -h|-V
12

DESCRIPTION

14       The  utility  blockdev  allows one to call block device ioctls from the
15       command line.
16

OPTIONS

18       -q     Be quiet.
19
20       -v     Be verbose.
21
22       --report
23              Print a report for the specified device. It is possible to  give
24              multiple  devices. If none is given, all devices which appear in
25              /proc/partitions are shown. Note that the partition StartSec  is
26              in 512-byte sectors.
27
28       -h, --help
29              Display help text and exit.
30
31       -V, --version
32              Print version and exit.
33

COMMANDS

35       It is possible to give multiple devices and multiple commands.
36
37       --flushbufs
38              Flush buffers.
39
40       --getalignoff
41              Get alignment offset.
42
43       --getbsz
44              Print blocksize in bytes.
45
46       --getdiscardzeroes
47              Get discard zeroes support status.
48
49       --getfra
50              Get filesystem readahead in 512-byte sectors.
51
52       --getiomin
53              Get minimum I/O size.
54
55       --getioopt
56              Get optimal I/O size.
57
58       --getmaxsect
59              Get max sectors per request
60
61       --getpbsz
62              Get physical block (sector) size.
63
64       --getra
65              Print readahead (in 512-byte sectors).
66
67       --getro
68              Get read-only. Print 1 if the device is read-only, 0 otherwise.
69
70       --getsize64
71              Print device size in bytes.
72
73       --getsize
74              Print  device  size (32-bit!) in sectors. Deprecated in favor of
75              the --getsz option.
76
77       --getss
78              Print logical sector size in bytes – usually 512.
79
80       --getsz
81              Get size in 512-byte sectors.
82
83       --rereadpt
84              Reread partition table
85
86       --setbsz bytes
87              Set blocksize. Note that the block size is specific to the  cur‐
88              rent  file descriptor opening the block device, so the change of
89              block size only persists for as long as blockdev has the  device
90              open, and is lost once blockdev exits.
91
92       --setfra sectors
93              Set filesystem readahead (same like --setra on 2.6 kernels).
94
95       --setra sectors
96              Set readahead (in 512-byte sectors).
97
98       --setro
99              Set read-only. The currently active access to the device may not
100              be affected  by  the  change.  For  example  filesystem  already
101              mounted  in  read-write  mode  will  not be affected. The change
102              applies after remount.
103
104       --setrw
105              Set read-write.
106

AUTHOR

108       blockdev was written by Andries E. Brouwer and rewritten by Karel Zak.
109

AVAILABILITY

111       The blockdev command is part of the util-linux package and is available
112       from https://www.kernel.org/pub/linux/utils/util-linux/.
113
114
115
116util-linux                        August 2010                      BLOCKDEV(8)
Impressum