blob: fa01da543c9d9bda64e7c924d3a8205d01beab9b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
.\" -*- nroff -*-
.\" Copyright 1998 Andries E. Brouwer (aeb@cwi.nl)
.\" Copyright 2007 Karel Zak <kzak@redhat.com>
.\"
.\" May be distributed under the GNU General Public License
.TH BLOCKDEV 8 "Jun 2007" ""
.SH NAME
blockdev \- call block device ioctls from the command line
.SH SYNOPSIS
.B blockdev
.RI [ options ]
.I commands devices
.br
.B blockdev
.B \-\-report
.RI [ devices ]
.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.
.TP
.B \-\-report
Print a report for
.IR devices .
Note that the partition StartSec is in 512-byte sectors.
.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
.B \--getbsz
Print blocksize in bytes.
.TP
.BI \--setbsz " N"
Set blocksize to
.I N
bytes.
.TP
.B \--getsize
Print device size in sectors (BLKGETSIZE). Deprecated in favor of the
.B \--getsz
option.
.TP
.B \--getsize64
Print device size in bytes (BLKGETSIZE64)
.TP
.B \--getsz
Get size in 512-byte sectors (BLKGETSIZE64 / 512).
.TP
.BI \--setra " N"
Set readahead to
.I N
512-byte sectors.
.TP
.B \--getra
Print readahead (in 512-byte sectors).
.TP
.BI \--setfra " N"
Set filesystem readahead (same like --setra on 2.6 kernels).
.TP
.B \--getfra
Get filesystem readahead.
.TP
.B \--flushbufs
Flush buffers.
.TP
.B \--rereadpt
Reread partition table.
.SH AUTHOR
blockdev was written by Andries E. Brouwer.
.SH AVAILABILITY
The blockdev command is part of the util-linux-ng package and is available from
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
|