When you’re running OpenMediaVault (OMV) on your NAS or home server, it’s normal to want to check how fast your drives actually are—especially when you’ve just plugged in a new SSD or upgraded your storage. You’d think testing disk speeds would be easy, but turns out… not always.
Here’s a no-nonsense guide to testing read/write speed on your drives, based on a real setup with all the little problems you might run into—and how to fix them.
⚙️ Step 1: Checking for hdparm
You might find an online guide telling you to just run:
hdparm -t --direct /dev/sdX
…but then get hit with:
-bash: hdparm: command not found
Yep. Not installed.
✅ Install hdparm first:
sudo apt update
sudo apt install hdparm -y
Then try:
hdparm -V
If that still says “command not found”… welcome to my world.
🧠 Why hdparm Still Doesn’t Work?
Turns out the command is installed, but it lives in /usr/sbin, and for non-root users like pi, that folder might not be in your $PATH.
To confirm:
sudo find / -type f -name hdparm 2>/dev/null
Expected result:
/usr/sbin/hdparm
You can run it directly:
sudo /usr/sbin/hdparm -t --direct /dev/sdX
Or…
Permanently fix your environment:
Edit your .bashrc:
nano ~/.bashrc
Add this to the bottom:
export PATH=$PATH:/usr/sbin
Then load it:
source ~/.bashrc
Now hdparm should work normally in the terminal.
📏 Run the hdparm test
If you’re testing an SSD:
sudo hdparm -t --direct /dev/nvme0n1
Or for HDD:
sudo hdparm -t --direct /dev/sda
Note: always test the whole device (e.g.,
/dev/nvme0n1), not a partition like/dev/nvme0n1p1.
🔬 Want more accurate results? Use fio
hdparm is fast and simple but not always accurate—especially for SSDs or NVMe drives. For deeper benchmarking, fio is the tool of choice.
Install it:
sudo apt install fio -y
Read speed test (sequential):
sudo fio --name=readtest --filename=/dev/nvme0n1 --direct=1 --rw=read --bs=1M --size=1G --numjobs=1 --time_based --runtime=10 --group_reporting
Write speed test (be careful!):
If you’re OK potentially overwriting data (use only on empty drives or partitions!):
sudo fio --name=writetest --filename=/dev/nvme0n1 --direct=1 --rw=write --bs=1M --size=1G --numjobs=1 --time_based --runtime=10 --group_reporting
⚠️ Don’t run write tests on drives that hold important data, unless you know what you’re doing.
🧠 Final Tips
- Always use
sudowhen testing block devices. - Don’t test partitions—test the full device (e.g.,
/dev/sda, not/dev/sda1). - If a command is “not found” even after installation, check your
$PATH. hdparmis great for quick checks,fiois for real benchmarks.- Don’t trust online tutorials blindly—test, break, and fix. That’s the real fun.
✅ Example Results
On a typical SSD:
hdparm: 420 MB/sec
fio: 2.7 GiB/sec (sequential read)
On an older HDD:
hdparm: 110 MB/sec
fio: ~100-130 MB/sec (varies)
That’s it. Your drives are tested, your terminal isn’t yelling at you anymore, and you (hopefully) didn’t wipe anything important.
If this helped—bookmark it. If it broke something—well, now you know what backups are for 😉


Leave a Reply