Upload Tizen:Base source
[framework/base/util-linux-ng.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 "Jun 2007" ""
7 .SH NAME
8 blockdev \- call block device ioctls from the command line
9 .SH SYNOPSIS
10 .B blockdev
11 .RI [ options ]
12 .I commands devices
13 .br
14 .B blockdev
15 .B \-\-report
16 .RI [ devices ]
17 .SH DESCRIPTION
18 The utility
19 .B blockdev
20 allows one to call block device ioctls from the command line.
21 .SH OPTIONS
22 .TP
23 .B \-V
24 Print version and exit.
25 .TP
26 .B \-q
27 Be quiet.
28 .TP
29 .B \-v
30 Be verbose.
31 .TP
32 .B \-\-report
33 Print a report for
34 .IR devices .
35 Note that the partition StartSec is in 512-byte sectors.
36 .SH COMMANDS
37 .TP
38 .B \--setro
39 Set read-only.
40 .TP
41 .B \--setrw
42 Set read-write.
43 .TP
44 .B \--getro
45 Get read-only. Print 1 if the device is read-only, 0 otherwise.
46 .TP
47 .B \--getss
48 Print sectorsize in bytes - usually 512.
49 .TP
50 .B \--getbsz
51 Print blocksize in bytes.
52 .TP
53 .BI \--setbsz " N"
54 Set blocksize to
55 .I N
56 bytes.
57 .TP
58 .B \--getsize
59 Print device size in sectors (BLKGETSIZE). Deprecated in favor of the
60 .B \--getsz
61 option.
62 .TP
63 .B \--getsize64
64 Print device size in bytes (BLKGETSIZE64)
65 .TP
66 .B \--getsz
67 Get size in 512-byte sectors (BLKGETSIZE64 / 512).
68 .TP
69 .BI \--setra " N"
70 Set readahead to
71 .I N
72 512-byte sectors.
73 .TP
74 .B \--getra
75 Print readahead (in 512-byte sectors).
76 .TP
77 .BI \--setfra " N"
78 Set filesystem readahead (same like --setra on 2.6 kernels).
79 .TP
80 .B \--getfra
81 Get filesystem readahead.
82 .TP
83 .B \--flushbufs
84 Flush buffers.
85 .TP
86 .B \--rereadpt
87 Reread partition table.
88 .SH AUTHOR
89 blockdev was written by Andries E. Brouwer.
90 .SH AVAILABILITY
91 The blockdev command is part of the util-linux-ng package and is available from
92 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
93