]> git.ipfire.org Git - thirdparty/util-linux.git/blame - disk-utils/blockdev.8.adoc
Merge branch 'lsfd-const' of https://github.com/t-8ch/util-linux
[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
c6a568fc 63*--getfra*::
299604dd 64Get filesystem readahead in 512-byte sectors.
c6a568fc
MB
65
66*--getiomin*::
299604dd 67Get minimum I/O size.
c6a568fc
MB
68
69*--getioopt*::
299604dd 70Get optimal I/O size.
c6a568fc
MB
71
72*--getmaxsect*::
299604dd 73Get max sectors per request.
c6a568fc
MB
74
75*--getpbsz*::
299604dd 76Get physical block (sector) size.
c6a568fc
MB
77
78*--getra*::
299604dd 79Print readahead (in 512-byte sectors).
c6a568fc
MB
80
81*--getro*::
299604dd 82Get read-only. Print 1 if the device is read-only, 0 otherwise.
c6a568fc
MB
83
84*--getsize64*::
299604dd 85Print device size in bytes.
c6a568fc
MB
86
87*--getsize*::
299604dd 88Print device size (32-bit!) in sectors. Deprecated in favor of the *--getsz* option.
c6a568fc
MB
89
90*--getss*::
299604dd 91Print logical sector size in bytes - usually 512.
c6a568fc
MB
92
93*--getsz*::
299604dd 94Get size in 512-byte sectors.
c6a568fc
MB
95
96*--rereadpt*::
299604dd 97Reread partition table
c6a568fc
MB
98
99*--setbsz* _bytes_::
299604dd 100Set 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
101
102*--setfra* _sectors_::
299604dd 103Set filesystem readahead (same as *--setra* on 2.6 kernels).
c6a568fc
MB
104
105*--setra* _sectors_::
299604dd 106Set readahead (in 512-byte sectors).
c6a568fc
MB
107
108*--setro*::
299604dd 109Set 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
110
111*--setrw*::
299604dd 112Set read-write.
c6a568fc
MB
113
114== AUTHORS
115
116*blockdev* was written by Andries E. Brouwer and rewritten by Karel Zak.
117
625e9c61 118include::man-common/bugreports.adoc[]
c6a568fc 119
625e9c61 120include::man-common/footer.adoc[]
c6a568fc
MB
121
122ifdef::translation[]
625e9c61 123include::man-common/translation.adoc[]
c6a568fc 124endif::[]