]> git.ipfire.org Git - thirdparty/util-linux.git/blob - disk-utils/blockdev.8
Manual pages: Standardize on AUTHORS as section title
[thirdparty/util-linux.git] / disk-utils / blockdev.8
1 .\" Copyright 1998 Andries E. Brouwer (aeb@cwi.nl)
2 .\" Copyright 2007 Karel Zak <kzak@redhat.com>
3 .\"
4 .\" May be distributed under the GNU General Public License
5 .TH BLOCKDEV 8 "August 2010" "util-linux" "System Administration"
6 .SH NAME
7 blockdev \- call block device ioctls from the command line
8 .SH SYNOPSIS
9 .B blockdev
10 .RB [ \-q ]
11 .RB [ \-v ]
12 .I command
13 .RI [ command \&...\&]
14 .I device
15 .RI [ device \&...\&]
16 .br
17 .B blockdev
18 .B \-\-report
19 .RI [ device \&...\&]
20 .br
21 .B blockdev
22 .RB \-h | \-V
23 .SH DESCRIPTION
24 The utility
25 .B blockdev
26 allows one to call block device ioctls from the command line.
27 .SH OPTIONS
28 .IP "\fB\-q\fP"
29 Be quiet.
30 .IP "\fB\-v\fP"
31 Be verbose.
32 .IP "\fB\-\-report\fP"
33 Print a report for the specified device. It is possible to give multiple
34 devices. If none is given, all devices which appear in /proc/partitions are
35 shown. Note that the partition StartSec is in 512-byte sectors.
36 .IP "\fB\-h\fR, \fB\-\-help\fR"
37 Display help text and exit.
38 .IP "\fB\-V\fR, \fB\-\-version\fR"
39 Print version and exit.
40 .SH COMMANDS
41 It is possible to give multiple devices and multiple commands.
42 .IP "\fB\-\-flushbufs\fP"
43 Flush buffers.
44 .IP "\fB\-\-getalignoff\fP"
45 Get alignment offset.
46 .IP "\fB\-\-getbsz\fP"
47 Print blocksize in bytes. This size does not describe device topology. It's
48 size used internally by kernel and it maybe modified (for example) by
49 filesystem driver on mount.
50 .IP "\fB\-\-getdiscardzeroes\fP"
51 Get discard zeroes support status.
52 .IP "\fB\-\-getfra\fP"
53 Get filesystem readahead in 512-byte sectors.
54 .IP "\fB\-\-getiomin\fP"
55 Get minimum I/O size.
56 .IP "\fB\-\-getioopt\fP"
57 Get optimal I/O size.
58 .IP "\fB\-\-getmaxsect\fP"
59 Get max sectors per request
60 .IP "\fB\-\-getpbsz\fP"
61 Get physical block (sector) size.
62 .IP "\fB\-\-getra\fP"
63 Print readahead (in 512-byte sectors).
64 .IP "\fB\-\-getro\fP"
65 Get read-only. Print 1 if the device is read-only, 0 otherwise.
66 .IP "\fB\-\-getsize64\fP"
67 Print device size in bytes.
68 .IP "\fB\-\-getsize\fP"
69 Print device size (32-bit!) in sectors. Deprecated in favor of the \-\-getsz option.
70 .IP "\fB\-\-getss\fP"
71 Print logical sector size in bytes \(en usually 512.
72 .IP "\fB\-\-getsz\fP"
73 Get size in 512-byte sectors.
74 .IP "\fB\-\-rereadpt\fP"
75 Reread partition table
76 .IP "\fB\-\-setbsz\fP \fIbytes\fP"
77 Set blocksize. Note that the block size is specific to the current file
78 descriptor opening the block device, so the change of block size only persists
79 for as long as blockdev has the device open, and is lost once blockdev exits.
80 .IP "\fB\-\-setfra\fP \fIsectors\fP"
81 Set filesystem readahead (same like \-\-setra on 2.6 kernels).
82 .IP "\fB\-\-setra\fP \fIsectors\fP"
83 Set readahead (in 512-byte sectors).
84 .IP "\fB\-\-setro\fP"
85 Set read-only. The currently active access to the device may not be affected by the change. For example
86 filesystem already mounted in read-write mode will not be affected. The change applies after remount.
87 .IP "\fB\-\-setrw\fP"
88 Set read-write.
89 .SH AUTHORS
90 blockdev was written by Andries E.\& Brouwer and rewritten by Karel Zak.
91 .SH AVAILABILITY
92 The blockdev command is part of the util-linux package and is available from
93 https://www.kernel.org/pub/linux/utils/util-linux/.