BLOCKDEV(8)

๐Ÿ’– BLOCKDEV ๐Ÿ’–

okay bestie, so this is the blockdev page from section 8 of the manual (that's the System Administration girlies, iykyk) โ€” and literally all it does is let you call block device ioctls straight from your command line. no cap. it's giving "kernel whisperer but make it cute" โœจ


๐ŸŒธ NAME ๐ŸŒธ

blockdev โ€” call block device ioctls from the command line


โœจ SYNOPSIS โœจ

blockdev [-q] [-v] command [command...] device [device...]

blockdev --report [device...]

blockdev -h|-V

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

The utility blockdev allows one to call block device ioctls from the command line. that's it, that's the whole vibe ๐Ÿซถ


๐Ÿ’… OPTIONS ๐Ÿ’…

  • -q โ€” Be quiet. shhh ๐Ÿคซ
  • -v โ€” Be verbose. tell me everything bestie ๐Ÿ—ฃ๏ธ
  • --report โ€” Print 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. ๐Ÿ‘‘
  • -h, --help โ€” Display help text and exit.
  • -V, --version โ€” Display version and exit.

๐ŸŽ€ COMMANDS ๐ŸŽ€

It is possible to give multiple devices and multiple commands. yes queen, stack them ๐Ÿ”ฅ

  • --flushbufs โ€” Flush buffers.
  • --getalignoff โ€” Get alignment offset.
  • --getbsz โ€” Print the blocksize in bytes. This size does not describe device topology. It's the size used internally by the kernel and it may be modified (for example) by filesystem driver on mount. so like, not the whole story, just the kernel's internal number ๐Ÿ“
  • --getdiscardzeroes โ€” Get discard zeroes support status.
  • --getdiskseq โ€” Get disk sequence number.
  • --getzonesz โ€” Get zone size in 512-byte sectors.
  • --getfra โ€” Get filesystem readahead in 512-byte sectors.
  • --getiomin โ€” Get minimum I/O size.
  • --getioopt โ€” Get optimal I/O size.
  • --getmaxsect โ€” Get max sectors per request.
  • --getpbsz โ€” Get physical block (sector) size.
  • --getra โ€” Print readahead (in 512-byte sectors).
  • --getro โ€” Get read-only. Print 1 if the device is read-only, 0 otherwise. binary queen ๐Ÿ’…
  • --getsize64 โ€” Print device size in bytes.
  • --getsize โ€” Print device size (32-bit!) in sectors. Deprecated in favor of the --getsz option. > lowkey retired bestie, use --getsz instead ๐Ÿซถ
  • --getss โ€” Print logical sector size in bytes - usually 512.
  • --getsz โ€” Get size in 512-byte sectors.
  • --rereadpt โ€” Reread partition table. refresh bestie ๐Ÿ”„
  • --setbsz bytes โ€” Set 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. so it's giving temporary, not permanent ๐Ÿ˜ญ
  • --setfra sectors โ€” Set filesystem readahead (same as --setra on 2.6 kernels).
  • --setra sectors โ€” Set readahead (in 512-byte sectors).
  • --setro โ€” Set read-only. The currently active access to the device may not be affected by the change. For example, a filesystem already mounted in read-write mode will not be affected. The change applies after remount. > important bestie, this one does NOT retroactively fix a thing that's already mounted rw โ€” you gotta remount ๐Ÿ’€
  • --setrw โ€” Set read-write.

๐Ÿ’œ AUTHORS ๐Ÿ’œ

blockdev was written by Andries E. Brouwer and rewritten by Karel Zak. icons only ๐Ÿ‘‘โœจ


๐ŸŒˆ REPORTING BUGS ๐ŸŒˆ

For bug reports, use the issue tracker <https://github.com/util-linux/util-linux/issues>. go tell them, they wanna know fr fr ๐Ÿ™ˆ


โญ AVAILABILITY โญ

The blockdev command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>. get you some ๐ŸŽ€


and that's the whole page bestie!! ๐Ÿฆ‹ this one's from util-linux 2.42.4, dated 2026-09-21, and yeah it's the BLOCKDEV(8) girlie herself. mwah ๐Ÿ’–๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from
  • arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms