]> git.ipfire.org Git - thirdparty/util-linux.git/blame - disk-utils/blockdev.8.adoc
fdisk: remove usage of VLA
[thirdparty/util-linux.git] / disk-utils / blockdev.8.adoc
CommitLineData
295b3979 1//po4a: entry man manual
c6a568fc
MB
2////
3Copyright 1998 Andries E. Brouwer (aeb@cwi.nl)
4Copyright 2007 Karel Zak <kzak@redhat.com>
5
6May 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
17blockdev - 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
29The utility *blockdev* allows one to call block device ioctls from the command line.
30
31== OPTIONS
32
33*-q*::
299604dd 34Be quiet.
c6a568fc
MB
35
36*-v*::
299604dd 37Be verbose.
c6a568fc
MB
38
39*--report*::
299604dd 40Print 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.
c6a568fc 41
2b2d3172 42include::man-common/help-version.adoc[]
c6a568fc
MB
43
44== COMMANDS
45
46It is possible to give multiple devices and multiple commands.
47
48*--flushbufs*::
299604dd 49Flush buffers.
c6a568fc
MB
50
51*--getalignoff*::
299604dd 52Get alignment offset.
c6a568fc
MB
53
54*--getbsz*::
299604dd 55Print 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.
c6a568fc
MB
56
57*--getdiscardzeroes*::
299604dd 58Get discard zeroes support status.
c6a568fc 59
c10adc20
TW
60*--getdiskseq*::
61Get disk sequence number.
62
4832fd9f
TW
63*--getzonesz*::
64Get zone size in 512-byte sectors.
65
c6a568fc 66*--getfra*::
299604dd 67Get filesystem readahead in 512-byte sectors.
c6a568fc
MB
68
69*--getiomin*::
299604dd 70Get minimum I/O size.
c6a568fc
MB
71
72*--getioopt*::
299604dd 73Get optimal I/O size.
c6a568fc
MB
74
75*--getmaxsect*::
299604dd 76Get max sectors per request.
c6a568fc
MB
77
78*--getpbsz*::
299604dd 79Get physical block (sector) size.
c6a568fc
MB
80
81*--getra*::
299604dd 82Print readahead (in 512-byte sectors).
c6a568fc
MB
83
84*--getro*::
299604dd 85Get read-only. Print 1 if the device is read-only, 0 otherwise.
c6a568fc
MB
86
87*--getsize64*::
299604dd 88Print device size in bytes.
c6a568fc
MB
89
90*--getsize*::
299604dd 91Print device size (32-bit!) in sectors. Deprecated in favor of the *--getsz* option.
c6a568fc
MB
92
93*--getss*::
299604dd 94Print logical sector size in bytes - usually 512.
c6a568fc
MB
95
96*--getsz*::
299604dd 97Get size in 512-byte sectors.
c6a568fc
MB
98
99*--rereadpt*::
299604dd 100Reread partition table
c6a568fc
MB
101
102*--setbsz* _bytes_::
299604dd 103Set 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.
c6a568fc
MB
104
105*--setfra* _sectors_::
299604dd 106Set filesystem readahead (same as *--setra* on 2.6 kernels).
c6a568fc
MB
107
108*--setra* _sectors_::
299604dd 109Set readahead (in 512-byte sectors).
c6a568fc
MB
110
111*--setro*::
299604dd 112Set 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.
c6a568fc
MB
113
114*--setrw*::
299604dd 115Set read-write.
c6a568fc
MB
116
117== AUTHORS
118
119*blockdev* was written by Andries E. Brouwer and rewritten by Karel Zak.
120
625e9c61 121include::man-common/bugreports.adoc[]
c6a568fc 122
625e9c61 123include::man-common/footer.adoc[]
c6a568fc
MB
124
125ifdef::translation[]
625e9c61 126include::man-common/translation.adoc[]
c6a568fc 127endif::[]