150 lines
4.2 KiB
HTML
150 lines
4.2 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of BLOCKDEV</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>BLOCKDEV</H1>
|
|
Section: System Administration (8)<BR>Updated: August 2010<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
blockdev - call block device ioctls from the command line
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>blockdev</B>
|
|
|
|
[<B>-q</B>]
|
|
|
|
[<B>-v</B>]
|
|
|
|
<I>command</I>
|
|
|
|
[<I>command</I>...]
|
|
|
|
<I>device</I>
|
|
|
|
[<I>device</I>...]
|
|
|
|
<BR>
|
|
|
|
<B>blockdev</B>
|
|
|
|
<B>--report</B>
|
|
|
|
[<I>device</I>...]
|
|
|
|
<BR>
|
|
|
|
<B>blockdev</B>
|
|
|
|
-h<B>|</B>-V
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The utility
|
|
<B>blockdev</B>
|
|
|
|
allows one to call block device ioctls from the command line.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-q</B><DD>
|
|
Be quiet.
|
|
<DT id="2"><B>-v</B><DD>
|
|
Be verbose.
|
|
<DT id="3"><B>--report</B><DD>
|
|
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.
|
|
<DT id="4"><B>-h</B>, <B>--help</B><DD>
|
|
Display help text and exit.
|
|
<DT id="5"><B>-V</B>, <B>--version</B><DD>
|
|
Print version and exit.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>COMMANDS</H2>
|
|
|
|
It is possible to give multiple devices and multiple commands.
|
|
<DL COMPACT>
|
|
<DT id="6"><B>--flushbufs</B><DD>
|
|
Flush buffers.
|
|
<DT id="7"><B>--getalignoff</B><DD>
|
|
Get alignment offset.
|
|
<DT id="8"><B>--getbsz</B><DD>
|
|
Print blocksize in bytes. This size does not describe device topology. It's
|
|
size used internally by kernel and it maybe modified (for example) by
|
|
filesystem driver on mount.
|
|
<DT id="9"><B>--getdiscardzeroes</B><DD>
|
|
Get discard zeroes support status.
|
|
<DT id="10"><B>--getfra</B><DD>
|
|
Get filesystem readahead in 512-byte sectors.
|
|
<DT id="11"><B>--getiomin</B><DD>
|
|
Get minimum I/O size.
|
|
<DT id="12"><B>--getioopt</B><DD>
|
|
Get optimal I/O size.
|
|
<DT id="13"><B>--getmaxsect</B><DD>
|
|
Get max sectors per request
|
|
<DT id="14"><B>--getpbsz</B><DD>
|
|
Get physical block (sector) size.
|
|
<DT id="15"><B>--getra</B><DD>
|
|
Print readahead (in 512-byte sectors).
|
|
<DT id="16"><B>--getro</B><DD>
|
|
Get read-only. Print 1 if the device is read-only, 0 otherwise.
|
|
<DT id="17"><B>--getsize64</B><DD>
|
|
Print device size in bytes.
|
|
<DT id="18"><B>--getsize</B><DD>
|
|
Print device size (32-bit!) in sectors. Deprecated in favor of the --getsz option.
|
|
<DT id="19"><B>--getss</B><DD>
|
|
Print logical sector size in bytes - usually 512.
|
|
<DT id="20"><B>--getsz</B><DD>
|
|
Get size in 512-byte sectors.
|
|
<DT id="21"><B>--rereadpt</B><DD>
|
|
Reread partition table
|
|
<DT id="22"><B>--setbsz</B> <I>bytes</I><DD>
|
|
Set blocksize. Note that the block size is specific to the current file
|
|
descriptor opening the block device, so the change of block size only persists
|
|
for as long as blockdev has the device open, and is lost once blockdev exits.
|
|
<DT id="23"><B>--setfra</B> <I>sectors</I><DD>
|
|
Set filesystem readahead (same like --setra on 2.6 kernels).
|
|
<DT id="24"><B>--setra</B> <I>sectors</I><DD>
|
|
Set readahead (in 512-byte sectors).
|
|
<DT id="25"><B>--setro</B><DD>
|
|
Set read-only. The currently active access to the device may not be affected by the change. For example
|
|
filesystem already mounted in read-write mode will not be affected. The change applies after remount.
|
|
<DT id="26"><B>--setrw</B><DD>
|
|
Set read-write.
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
blockdev was written by Andries E. Brouwer and rewritten by Karel Zak.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>AVAILABILITY</H2>
|
|
|
|
The blockdev command is part of the util-linux package and is available from
|
|
<A HREF="https://www.kernel.org/pub/linux/utils/util-linux/.">https://www.kernel.org/pub/linux/utils/util-linux/.</A>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="27"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="28"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="29"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="30"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="31"><A HREF="#lbAF">COMMANDS</A><DD>
|
|
<DT id="32"><A HREF="#lbAG">AUTHOR</A><DD>
|
|
<DT id="33"><A HREF="#lbAH">AVAILABILITY</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:11 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|