blockdev Command Examples

Manage, query, and manipulate block devices. More information: https://manned.org/blockdev.

sudo blockdev --report

sudo blockdev --report {{/dev/sdXY}}

sudo blockdev --getsz {{/dev/sdXY}}

sudo blockdev --setro {{/dev/sdXY}}

sudo blockdev --setrw {{/dev/sdXY}}

sudo blockdev --flushbufs {{/dev/sdXY}}

sudo blockdev --getpbsz {{/dev/sdXY}}

sudo blockdev --setra 128 {{/dev/sdXY}}