]> git.ipfire.org Git - thirdparty/util-linux.git/blob - disk-utils/blockdev.8.adoc
unshare: make sure map_range.next is initialized [coverity scan]
[thirdparty/util-linux.git] / disk-utils / blockdev.8.adoc
1 //po4a: entry man manual
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*::
34 Be quiet.
35
36 *-v*::
37 Be verbose.
38
39 *--report*::
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.
41
42 include::man-common/help-version.adoc[]
43
44 == COMMANDS
45
46 It is possible to give multiple devices and multiple commands.
47
48 *--flushbufs*::
49 Flush buffers.
50
51 *--getalignoff*::
52 Get alignment offset.
53
54 *--getbsz*::
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.
56
57 *--getdiscardzeroes*::
58 Get discard zeroes support status.
59
60 *--getdiskseq*::
61 Get disk sequence number.
62
63 *--getzonesz*::
64 Get zone size in 512-byte sectors.
65
66 *--getfra*::
67 Get filesystem readahead in 512-byte sectors.
68
69 *--getiomin*::
70 Get minimum I/O size.
71
72 *--getioopt*::
73 Get optimal I/O size.
74
75 *--getmaxsect*::
76 Get max sectors per request.
77
78 *--getpbsz*::
79 Get physical block (sector) size.
80
81 *--getra*::
82 Print readahead (in 512-byte sectors).
83
84 *--getro*::
85 Get read-only. Print 1 if the device is read-only, 0 otherwise.
86
87 *--getsize64*::
88 Print device size in bytes.
89
90 *--getsize*::
91 Print device size (32-bit!) in sectors. Deprecated in favor of the *--getsz* option.
92
93 *--getss*::
94 Print logical sector size in bytes - usually 512.
95
96 *--getsz*::
97 Get size in 512-byte sectors.
98
99 *--rereadpt*::
100 Reread partition table
101
102 *--setbsz* _bytes_::
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.
104
105 *--setfra* _sectors_::
106 Set filesystem readahead (same as *--setra* on 2.6 kernels).
107
108 *--setra* _sectors_::
109 Set readahead (in 512-byte sectors).
110
111 *--setro*::
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.
113
114 *--setrw*::
115 Set read-write.
116
117 == AUTHORS
118
119 *blockdev* was written by Andries E. Brouwer and rewritten by Karel Zak.
120
121 include::man-common/bugreports.adoc[]
122
123 include::man-common/footer.adoc[]
124
125 ifdef::translation[]
126 include::man-common/translation.adoc[]
127 endif::[]