1BLOCKDEV(8)                 System Manager's Manual                BLOCKDEV(8)
2
3
4

NAME

6       blockdev - call block device ioctls from the command line
7

SYNOPSIS

9       blockdev [options] commands devices
10       blockdev --report [devices]
11

DESCRIPTION

13       The  utility  blockdev  allows one to call block device ioctls from the
14       command line.
15

OPTIONS

17       -V     Print version and exit.
18
19       -q     Be quiet.
20
21       -v     Be verbose.
22
23       --report
24              Print a report for devices.  Note that the partition StartSec is
25              in 512-byte sectors.
26

COMMANDS

28       --setro
29              Set read-only.
30
31       --setrw
32              Set read-write.
33
34       --getro
35              Get read-only. Print 1 if the device is read-only, 0 otherwise.
36
37       --getss
38              Print sectorsize in bytes - usually 512.
39
40       --getbsz
41              Print blocksize in bytes.
42
43       --setbsz N
44              Set  blocksize to N bytes.  Note that the block size is specific
45              to the current file descriptor opening the block device, so  the
46              change  of  block size only persists for as long as blockdev has
47              the device open, and is lost once blockdev exits.
48
49       --getsize
50              Print device size in sectors (BLKGETSIZE). Deprecated  in  favor
51              of the --getsz option.
52
53       --getsize64
54              Print device size in bytes (BLKGETSIZE64)
55
56       --getsz
57              Get size in 512-byte sectors (BLKGETSIZE64 / 512).
58
59       --setra N
60              Set readahead to N 512-byte sectors.
61
62       --getra
63              Print readahead (in 512-byte sectors).
64
65       --setfra N
66              Set filesystem readahead (same like --setra on 2.6 kernels).
67
68       --getfra
69              Get filesystem readahead.
70
71       --flushbufs
72              Flush buffers.
73
74       --rereadpt
75              Reread partition table.
76

AUTHOR

78       blockdev was written by Andries E. Brouwer.
79

AVAILABILITY

81       The blockdev command is part of the util-linux-ng package and is availā€
82       able from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
83
84
85
86
87                                   Jun 2007                        BLOCKDEV(8)
Impressum