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