brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: hdparm -tT gives a quick read speed number for a disk

Disk
~/tips/tip-disk-hdparm-tt-read-speed

sudo hdparm -tT /dev/sda

Measures how fast a disk reads sequentially, as a quick health and cabling check.

A quick number helps to spot a slow disk or a bad SATA cable. hdparm does it in one line.

sudo hdparm -tT /dev/sda

-T times reads from the cache and -t times buffered reads from the disk itself. The second figure is the one that matters. Run it three times on an idle machine and compare the results. It only reads, so it is safe, but it measures sequential reads only, which says little about random I/O on a busy database. A sudden drop on one disk compared with its siblings is a reason to look at the smart data and the cable.

Further reading: hdparm manual page

More Disk tips sudo e2freefrag /dev/sdb1 sudo smartctl -a --json /dev/sda | jq '.smart_status.passed' lsscsi -s udisksctl power-off -b /dev/sdX du -sh — .[!.]* * 2>/dev/null | sort -h All Disk tips (44) All topics

Link