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
|
2007-06-29 05:06:58 -05:00
|
|
|
.TH BLOCKDEV 8 "Jun 2007" ""
|
2006-12-06 17:25:44 -06:00
|
|
|
.SH NAME
|
|
|
|
blockdev \- call block device ioctls from the command line
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B blockdev
|
|
|
|
.RI [ options ]
|
|
|
|
.I commands devices
|
2007-09-10 04:25:10 -05:00
|
|
|
.br
|
|
|
|
.B blockdev
|
|
|
|
--report
|
|
|
|
.RI [ devices ]
|
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
|
|
|
|
.TP
|
|
|
|
.B \-V
|
|
|
|
Print version and exit.
|
|
|
|
.TP
|
|
|
|
.B \-q
|
|
|
|
Be quiet.
|
|
|
|
.TP
|
|
|
|
.B \-v
|
|
|
|
Be verbose.
|
2007-09-10 04:25:10 -05:00
|
|
|
.TP
|
|
|
|
.B \-\-report
|
|
|
|
Print a report for
|
|
|
|
.IR devices .
|
2009-02-26 03:56:35 -06:00
|
|
|
Note that the partition StartSec is in 512-byte sectors.
|
2006-12-06 17:25:44 -06:00
|
|
|
.SH COMMANDS
|
|
|
|
.TP
|
|
|
|
.B \--setro
|
|
|
|
Set read-only.
|
|
|
|
.TP
|
|
|
|
.B \--setrw
|
|
|
|
Set read-write.
|
|
|
|
.TP
|
|
|
|
.B \--getro
|
|
|
|
Get read-only. Print 1 if the device is read-only, 0 otherwise.
|
|
|
|
.TP
|
|
|
|
.B \--getss
|
|
|
|
Print sectorsize in bytes - usually 512.
|
|
|
|
.TP
|
2007-06-29 05:06:58 -05:00
|
|
|
.B \--getbsz
|
|
|
|
Print blocksize in bytes.
|
|
|
|
.TP
|
|
|
|
.BI \--setbsz " N"
|
|
|
|
Set blocksize to
|
|
|
|
.I N
|
|
|
|
bytes.
|
|
|
|
.TP
|
2006-12-06 17:25:44 -06:00
|
|
|
.B \--getsize
|
2007-11-28 08:19:24 -06:00
|
|
|
Print device size in sectors (BLKGETSIZE). Deprecated in favor of the
|
|
|
|
.B \--getsz
|
|
|
|
option.
|
2007-06-29 05:06:58 -05:00
|
|
|
.TP
|
|
|
|
.B \--getsize64
|
2007-11-28 08:19:24 -06:00
|
|
|
Print device size in bytes (BLKGETSIZE64)
|
|
|
|
.TP
|
|
|
|
.B \--getsz
|
|
|
|
Get size in 512-byte sectors (BLKGETSIZE64 / 512).
|
2006-12-06 17:25:44 -06:00
|
|
|
.TP
|
|
|
|
.BI \--setra " N"
|
|
|
|
Set readahead to
|
|
|
|
.I N
|
|
|
|
512-byte sectors.
|
|
|
|
.TP
|
|
|
|
.B \--getra
|
|
|
|
Print readahead (in 512-byte sectors).
|
|
|
|
.TP
|
2007-06-29 04:38:54 -05:00
|
|
|
.BI \--setfra " N"
|
|
|
|
Set filesystem readahead (same like --setra on 2.6 kernels).
|
|
|
|
.TP
|
|
|
|
.B \--getfra
|
|
|
|
Get filesystem readahead.
|
|
|
|
.TP
|
2006-12-06 17:25:44 -06:00
|
|
|
.B \--flushbufs
|
|
|
|
Flush buffers.
|
|
|
|
.TP
|
|
|
|
.B \--rereadpt
|
|
|
|
Reread partition table.
|
2007-06-29 05:06:58 -05:00
|
|
|
.SH AUTHOR
|
|
|
|
blockdev was written by Andries E. Brouwer.
|
|
|
|
.SH AVAILABILITY
|
2007-07-02 18:17:04 -05:00
|
|
|
The blockdev command is part of the util-linux-ng package and is available from
|
2007-06-29 05:06:58 -05:00
|
|
|
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
|
|
|
|
|