]> git.ipfire.org Git - thirdparty/util-linux.git/blob - disk-utils/blockdev.8
libblkid: add LINHIB0001 signature to swap prober
[thirdparty/util-linux.git] / disk-utils / blockdev.8
1 .\" -*- nroff -*-
2 .\" Copyright 1998 Andries E. Brouwer (aeb@cwi.nl)
3 .\" Copyright 2007 Karel Zak <kzak@redhat.com>
4 .\"
5 .\" May be distributed under the GNU General Public License
6 .TH BLOCKDEV 8 "Aug 2010" ""
7 .SH NAME
8 blockdev \- call block device ioctls from the command line
9 .SH SYNOPSIS
10 .B blockdev
11 .RB [ \-q ]
12 .RB [ \-v ]
13 .IR command
14 .RI [ command ...]
15 .IR device
16 .RI [ device ...]
17 .br
18 .B blockdev
19 .B \-\-report
20 .RI [ device ...]
21 .SH DESCRIPTION
22 The utility
23 .B blockdev
24 allows one to call block device ioctls from the command line.
25 .SH OPTIONS
26 .IP "\fB\-V\fP"
27 Print version and exit.
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 .SH COMMANDS
37 It is possible to give multiple devices and multiple commands.
38 .IP "\fB\-\-flushbufs\fP"
39 Flush buffers.
40 .IP "\fB\-\-getalignoff\fP"
41 Get alignment offset.
42 .IP "\fB\-\-getbsz\fP"
43 Print blocksize in bytes.
44 .IP "\fB\-\-getdiscardzeroes\fP"
45 Get discard zeroes support status.
46 .IP "\fB\-\-getfra\fP"
47 Get filesystem readahead in 512-byte sectors.
48 .IP "\fB\-\-getiomin\fP"
49 Get minimum I/O size.
50 .IP "\fB\-\-getioopt\fP"
51 Get optimal I/O size.
52 .IP "\fB\-\-getmaxsect\fP"
53 Get max sectors per request
54 .IP "\fB\-\-getpbsz\fP"
55 Get physical block (sector) size.
56 .IP "\fB\-\-getra\fP"
57 Print readahead (in 512-byte sectors).
58 .IP "\fB\-\-getro\fP"
59 Get read-only. Print 1 if the device is read-only, 0 otherwise.
60 .IP "\fB\-\-getsize64\fP"
61 Print device size in bytes.
62 .IP "\fB\-\-getsize\fP"
63 Print device size (32-bit!) in sectors. Deprecated in favor of the --getsz option.
64 .IP "\fB\-\-getss\fP"
65 Print sectorsize in bytes - usually 512.
66 .IP "\fB\-\-getsz\fP"
67 Get size in 512-byte sectors.
68 .IP "\fB\-\-rereadpt\fP"
69 Seread partition table
70 .IP "\fB\-\-setbsz\fP \fIbytes\fP"
71 Set blocksize.
72 .IP "\fB\-\-setfra\fP \fIsectors\fP"
73 Set filesystem readahead (same like --setra on 2.6 kernels).
74 .IP "\fB\-\-setra\fP \fIsectors\fP"
75 Set readahead (in 512-byte sectors).
76 .IP "\fB\-\-setro\fP"
77 Set read-only.
78 .IP "\fB\-\-setrw\fP"
79 Set read-write.
80 .SH AUTHOR
81 blockdev was written by Andries E. Brouwer and rewritten by Karel Zak.
82 .SH AVAILABILITY
83 The blockdev command is part of the util-linux-ng package and is available from
84 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
85