blockdev
Call ioctl(s) on each listed block device toybox
On Linux
Linux
blockdev --OPTION... BLOCKDEV...
Show 13 options
--setroSet read only--setrwSet read write--getroGet read only--getssGet sector size--getbszGet block size--setbsz BYTESSet block size--getszGet device size in 512-byte sectors--getsizeGet device size in sectors (deprecated)--getsize64Get device size in bytes--getraGet readahead in 512-byte sectors--setra SECTORSSet readahead--flushbufsFlush buffers--rereadptReread partition tableLinux
Manage, query, and manipulate block devices.
Print a report for all devices
sudo blockdev --reportIdentifyPrint a report for a specific device
sudo blockdev --report /dev/sdXYIdentifyGet the size of a device in 512-byte sectors
sudo blockdev --getsz /dev/sdXYIdentify--getszGet device size in 512-byte sectors toyboxGet the physical block size
sudo blockdev --getpbsz /dev/sdXYIdentifySet the read-ahead value to 128 sectors
sudo blockdev --setra 128 /dev/sdXYIdentify--setraSet readahead toybox