blockdev — call block device ioctls from the command line
blockdev [options] commands
devices
blockdev −−report [devices]
−VPrint version and exit.
−qBe quiet.
−vBe verbose.
−−reportPrint a report for devices. Note that the
partition StartSec is in 512-byte sectors.
−−setroSet read-only.
−−setrwSet read-write.
−−getroGet read-only. Print 1 if the device is read-only, 0 otherwise.
−−getssPrint sectorsize in bytes - usually 512.
−−getbszPrint blocksize in bytes.
−−setbsz NSet blocksize to N
bytes.
−−getsizePrint device size in sectors (BLKGETSIZE).
Deprecated in favor of the −−getsz option.
−−getsize64Print device size in bytes (BLKGETSIZE64)
−−getszGet size in 512-byte sectors (BLKGETSIZE64 / 512).
−−setra NSet readahead to N
512-byte sectors.
−−getraPrint readahead (in 512-byte sectors).
−−setfra NSet filesystem readahead (same like --setra on 2.6 kernels).
−−getfraGet filesystem readahead.
−−flushbufsFlush buffers.
−−rereadptReread partition table.