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