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.  This size does not describe device
45              topology.  It's size used internally by kernel and it maybe mod‐
46              ified (for example) by filesystem driver on mount.
47
48       --getdiscardzeroes
49              Get discard zeroes support status.
50
51       --getfra
52              Get filesystem readahead in 512-byte sectors.
53
54       --getiomin
55              Get minimum I/O size.
56
57       --getioopt
58              Get optimal I/O size.
59
60       --getmaxsect
61              Get max sectors per request
62
63       --getpbsz
64              Get physical block (sector) size.
65
66       --getra
67              Print readahead (in 512-byte sectors).
68
69       --getro
70              Get read-only. Print 1 if the device is read-only, 0 otherwise.
71
72       --getsize64
73              Print device size in bytes.
74
75       --getsize
76              Print  device  size (32-bit!) in sectors. Deprecated in favor of
77              the --getsz option.
78
79       --getss
80              Print logical sector size in bytes – usually 512.
81
82       --getsz
83              Get size in 512-byte sectors.
84
85       --rereadpt
86              Reread partition table
87
88       --setbsz bytes
89              Set blocksize. Note that the block size is specific to the  cur‐
90              rent  file descriptor opening the block device, so the change of
91              block size only persists for as long as blockdev has the  device
92              open, and is lost once blockdev exits.
93
94       --setfra sectors
95              Set filesystem readahead (same like --setra on 2.6 kernels).
96
97       --setra sectors
98              Set readahead (in 512-byte sectors).
99
100       --setro
101              Set read-only. The currently active access to the device may not
102              be affected  by  the  change.  For  example  filesystem  already
103              mounted  in  read-write  mode  will  not be affected. The change
104              applies after remount.
105
106       --setrw
107              Set read-write.
108

AUTHORS

110       blockdev was written by Andries E. Brouwer and rewritten by Karel Zak.
111

AVAILABILITY

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