blockdev — call block device ioctls from the command line
blockdev [−q] [−v] command [ command... ] device [
device... ]
blockdev −−report [ device... ]
−VPrint version and exit.
−qBe quiet.
−vBe verbose.
−−reportPrint 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.
It is possible to give multiple devices and multiple commands.
−−flushbufsFlush buffers.
−−getalignoffGet alignment offset.
−−getbszPrint blocksize in bytes.
−−getdiscardzeroesGet discard zeroes support status.
−−getfraGet filesystem readahead in 512-byte sectors.
−−getiominGet minimum I/O size.
−−getiooptGet optimal I/O size.
−−getmaxsectGet max sectors per request
−−getpbszGet physical block (sector) size.
−−getraPrint readahead (in 512-byte sectors).
−−getroGet read-only. Print 1 if the device is read-only, 0 otherwise.
−−getsize64Print device size in bytes.
−−getsizePrint device size (32-bit!) in sectors. Deprecated in favor of the −−getsz option.
−−getssPrint sectorsize in bytes – usually 512.
−−getszGet size in 512-byte sectors.
−−rereadptReread partition table
−−setbsz bytesSet 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.
−−setfra sectorsSet filesystem readahead (same like −−setra on 2.6 kernels).
−−setra sectorsSet readahead (in 512-byte sectors).
−−setroSet read-only.
−−setrwSet read-write.