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
11       blockdev --report [device...]
12
13       blockdev -h|-V
14

DESCRIPTION

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

OPTIONS

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

COMMANDS

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

AUTHORS

114       blockdev was written by Andries E. Brouwer and rewritten by Karel Zak.
115

REPORTING BUGS

117       For bug reports, use the issue tracker at
118       https://github.com/util-linux/util-linux/issues.
119

AVAILABILITY

121       The blockdev command is part of the util-linux package which can be
122       downloaded from Linux Kernel Archive
123       <https://www.kernel.org/pub/linux/utils/util-linux/>.
124
125
126
127util-linux 2.38.1                 2022-05-11                       BLOCKDEV(8)
Impressum