2006-12-06 17:25:44 -06:00
|
|
|
.\" -*- nroff -*-
|
|
|
|
.\" Copyright 1998 Andries E. Brouwer (aeb@cwi.nl)
|
2007-06-29 05:06:58 -05:00
|
|
|
.\" Copyright 2007 Karel Zak <kzak@redhat.com>
|
2006-12-06 17:25:44 -06:00
|
|
|
.\"
|
|
|
|
.\" May be distributed under the GNU General Public License
|
2010-08-24 05:59:41 -05:00
|
|
|
.TH BLOCKDEV 8 "Aug 2010" ""
|
2006-12-06 17:25:44 -06:00
|
|
|
.SH NAME
|
|
|
|
blockdev \- call block device ioctls from the command line
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B blockdev
|
2010-08-24 05:59:41 -05:00
|
|
|
.RB [ \-q ]
|
|
|
|
.RB [ \-v ]
|
|
|
|
.IR command
|
|
|
|
.RI [ command ...]
|
|
|
|
.IR device
|
|
|
|
.RI [ device ...]
|
2007-09-10 04:25:10 -05:00
|
|
|
.br
|
|
|
|
.B blockdev
|
2009-07-22 04:29:04 -05:00
|
|
|
.B \-\-report
|
2010-08-24 05:59:41 -05:00
|
|
|
.RI [ device ...]
|
2006-12-06 17:25:44 -06:00
|
|
|
.SH DESCRIPTION
|
|
|
|
The utility
|
|
|
|
.B blockdev
|
|
|
|
allows one to call block device ioctls from the command line.
|
|
|
|
.SH OPTIONS
|
2010-08-24 05:59:41 -05:00
|
|
|
.IP "\fB\-V\fP"
|
2006-12-06 17:25:44 -06:00
|
|
|
Print version and exit.
|
2010-08-24 05:59:41 -05:00
|
|
|
.IP "\fB\-q\fP"
|
2006-12-06 17:25:44 -06:00
|
|
|
Be quiet.
|
2010-08-24 05:59:41 -05:00
|
|
|
.IP "\fB\-v\fP"
|
2006-12-06 17:25:44 -06:00
|
|
|
Be verbose.
|
2010-08-24 05:59:41 -05:00
|
|
|
.IP "\fB\-\-report\fP"
|
|
|
|
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.
|
2006-12-06 17:25:44 -06:00
|
|
|
.SH COMMANDS
|
2010-08-24 05:59:41 -05:00
|
|
|
It is possible to give multiple devices and multiple commands.
|
|
|
|
.IP "\fB\-\-flushbufs\fP"
|
|
|
|
Flush buffers.
|
|
|
|
.IP "\fB\-\-getalignoff\fP"
|
|
|
|
Get alignment offset.
|
|
|
|
.IP "\fB\-\-getbsz\fP"
|
2007-06-29 05:06:58 -05:00
|
|
|
Print blocksize in bytes.
|
2010-08-24 05:59:41 -05:00
|
|
|
.IP "\fB\-\-getdiscardzeroes\fP"
|
|
|
|
Get discard zeroes support status.
|
|
|
|
.IP "\fB\-\-getfra\fP"
|
|
|
|
Get filesystem readahead in 512-byte sectors.
|
|
|
|
.IP "\fB\-\-getiomin\fP"
|
|
|
|
Get minimum I/O size.
|
|
|
|
.IP "\fB\-\-getioopt\fP"
|
|
|
|
Get optimal I/O size.
|
|
|
|
.IP "\fB\-\-getmaxsect\fP"
|
|
|
|
Get max sectors per request
|
|
|
|
.IP "\fB\-\-getpbsz\fP"
|
|
|
|
Get physical block (sector) size.
|
|
|
|
.IP "\fB\-\-getra\fP"
|
2006-12-06 17:25:44 -06:00
|
|
|
Print readahead (in 512-byte sectors).
|
2010-08-24 05:59:41 -05:00
|
|
|
.IP "\fB\-\-getro\fP"
|
|
|
|
Get read-only. Print 1 if the device is read-only, 0 otherwise.
|
|
|
|
.IP "\fB\-\-getsize64\fP"
|
|
|
|
Print device size in bytes.
|
|
|
|
.IP "\fB\-\-getsize\fP"
|
|
|
|
Print device size (32-bit!) in sectors. Deprecated in favor of the --getsz option.
|
|
|
|
.IP "\fB\-\-getss\fP"
|
|
|
|
Print sectorsize in bytes - usually 512.
|
|
|
|
.IP "\fB\-\-getsz\fP"
|
|
|
|
Get size in 512-byte sectors.
|
|
|
|
.IP "\fB\-\-rereadpt\fP"
|
2011-01-05 13:54:19 -06:00
|
|
|
Reread partition table
|
2010-08-24 05:59:41 -05:00
|
|
|
.IP "\fB\-\-setbsz\fP \fIbytes\fP"
|
|
|
|
Set blocksize.
|
|
|
|
.IP "\fB\-\-setfra\fP \fIsectors\fP"
|
2007-06-29 04:38:54 -05:00
|
|
|
Set filesystem readahead (same like --setra on 2.6 kernels).
|
2010-08-24 05:59:41 -05:00
|
|
|
.IP "\fB\-\-setra\fP \fIsectors\fP"
|
|
|
|
Set readahead (in 512-byte sectors).
|
|
|
|
.IP "\fB\-\-setro\fP"
|
|
|
|
Set read-only.
|
|
|
|
.IP "\fB\-\-setrw\fP"
|
|
|
|
Set read-write.
|
2007-06-29 05:06:58 -05:00
|
|
|
.SH AUTHOR
|
2010-08-27 17:50:24 -05:00
|
|
|
blockdev was written by Andries E. Brouwer and rewritten by Karel Zak.
|
2007-06-29 05:06:58 -05:00
|
|
|
.SH AVAILABILITY
|
2010-11-30 04:41:59 -06:00
|
|
|
The blockdev command is part of the util-linux package and is available from
|
|
|
|
ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
|
2007-06-29 05:06:58 -05:00
|
|
|
|