BLKTOOL(8)
π BLKTOOL(8) π
okay so bestie, welcome to BLKTOOL, section 8 of the System Manager's Manual. it's a block device tool. it's giving "i know what your hard drive is doing at all times." let's get into it β¨
π¦ NAME π¦
blktool β Display or change block device settings. that's the whole thing. short, sweet, iconic. π
πΈ SYNOPSIS πΈ
blktool [options] device [acoustic-mgmt nnn]
blktool [options] device [block-sz nnn]
blktool [options] device [bus-id]
blktool [options] device [bus-state nnn]
blktool [options] device [class]
blktool [options] device [cd-speed nnn]
blktool [options] device [defect-mgmt off|on]
blktool [options] device [dev-keep-settings off|on]
blktool [options] device [dev-read-ahead off|on]
blktool [options] device [dma off|on]
blktool [options] device [geometry]
blktool [options] device [i2o-rcache nnn]
blktool [options] device [i2o-wcache nnn]
blktool [options] device [id]
blktool [options] device [keep-settings off|on]
blktool [options] device [media unlock|lock]
blktool [options] device [multiple-count nnn]
blktool [options] device [no-write-err off|on]
blktool [options] device [pio-data 16-bit|32-bit]
blktool [options] device [pio-mode nnn]
blktool [options] device [pm-mode nnn]
blktool [options] device [queue-depth nnn]
blktool [options] device [read-ahead nnn]
blktool [options] device [readonly off|on]
blktool [options] device [reread-part]
blktool [options] device [reset]
blktool [options] device [sector-sz]
blktool [options] device [sleep]
blktool [options] device [standby]
blktool [options] device [unmask-irq off|on]
blktool [options] device [version]
blktool [options] [version]
blktool [options] device [wcache off|on]
β¨ DESCRIPTION β¨
okay so here's the tea: blktool is used for querying and/or changing settings of a block device. you point it at a device, you ask it questions, or you tell it what to do. main character energy for your storage stack fr fr. π«Ά
device is the name of the block device to query or modify. like, the actual thing you're poking at. no device, no vibes.
π OPTIONS π
-fβ for a few commands,blktoolwill flush the buffers of the block device out to disk, before performing the requested command. specify this option β that's"force"β and it disables any flushingblktoolwould attempt to do. so it's not "do it harder," it's "don't bother flushing first." iykyk. π-tclass β where class is one of'ide','ata','scsi','i2o', or'auto', to override the default auto-detection of device class. you're basically telling it "bestie i already know what this is, stop guessing." π₯
π COMMANDS π
acoustic-mgmtβ query or set the underlying device's acoustic level. yes, your drive can be quiet or loud. slay. πblock-szβ query or set device block size.bus-idβ query device bus id.bus-stateβ query or set device bus state (0off,1on,2tristate).classβ query the detected (or overridden, via-t) device class. typically this will result in'ATA'or'SCSI'for most devices. detection is based on device major; thus your SATA device may appear as'SCSI'. yeah, that's just how it is. π¦cd-speedβ set CD-ROM device speed (in Kbytes/sec).defect-mgmtβ toggle the underlying device's defect management. it's obsolete, so, like, it's there, but it's giving vintage. πdev-keep-settingsβ toggle the underlying device's revert-to-defaults-on-reset feature.dev-read-aheadβ toggle the underlying device's read-ahead feature.dmaβ toggle DMA data transfer. omitting theon/offargument will print the current state.geometryβ query device geometry (cylinders / heads / sectors / etc.).i2o-rcacheβ query or set an I2O block device's read cache.i2o-wcacheβ query or set an I2O block device's write cache.idβ query IDENTIFY [PACKET] DEVICE data.keep-settingsβ keep settings across device resets. omitting theon/offargument will print the current state.mediaβ lock in (or unlock) a removable device.multiple-countβ set multiple count for use in READ/WRITE MULTIPLE commands.no-write-errβ toggle ignore-write-errors flag. omitting theon/offargument will print the current state.pio-dataβ ATA PIO data transfer via16-bitor32-bitI/O. omitting theon/offargument will print the current state.pio-modeβ set the underlying ATA device's PIO data transfer mode.pm-modeβ set the underlying device's Advanced Power Management mode.queued-depthβ query or set the underlying device's queue depth.read-aheadβ query or set block device read-ahead (in units of sectors).readonlyβ toggle block device read-only setting. omitting theon/offargument will print the current state.reread-partβ re-read partition table.resetβ execute device reset.sector-szβ query device sector size.sleepβ put device to sleep immediately. night night bestie π΄π€standbyβ put device in standby mode.unmask-irqβ toggle unmasked irqs. omitting theon/offargument will print the current state.versionβ print version number and exit.wcacheβ toggle the underlying device's writeback cache.
not me noticing the synopsis saysqueue-depthand the command list saysqueued-depthβ we keep both exactly as written, no editing, no "fixing", periodt. π
π BUGS π
inevitably there are some. π please report any you find. be a good citizen about it.
π AUTHOR π
blktool was written by Jeff Garzik. king behavior, honestly. π
π AVAILABILITY π
blktool is available over the Web on the SourceForge site at http://sourceforge.net/projects/gkernel/ β go, run, don't walk. π§
and that's the whole page, bestie!! π₯³ this was blktool version 4, from August 2004 β yeah she's an elder but she still ate. go forth and query your block devices. mwah ππΈ
π¦ where this page comes from
- debian bookworm: blktool 4-7.1 Β· GPL-2.0-or-later
- debian trixie: blktool 4-8 Β· GPL-2.0-or-later
- ubuntu jammy: blktool 4-7.1 Β· GPL-2.0-or-later
- ubuntu noble: blktool 4-7.1build2 Β· GPL-2.0-or-later
- ubuntu questing: blktool 4-8
- ubuntu resolute: blktool 4-8build1 Β· GPL-2.0-or-later
- ubuntu stonking: blktool 4-9 Β· GPL-2.0-or-later
- Copyright 2004 Jeff Garzik. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms