https://superuser.com/questions/1521427/how-to-check-hdd-health-beyond-s-m-a-r-t-in-linux-cli
I have a headless home server that I control exclusively via SSH. It runs an up-to-date version of Arch Linux (kernel 5.4.15). For a storage, I have an LVM volume group spanning across 2 physical HDDs, 2TB each, same make, same model, different age. I also may be expanding the storage in the near future.
I’m looking for an utility to periodically test their health, and I do not trust S.M.A.R.T., as most of the time when it fails, it’s already too late. Therefore, smartctl
, as well as any utility that exclusively relies on it, doesn’t fit my needs. I’m looking for something like HDDScan or Victoria but for Linux CLI rather than Windows GUI.
Considering the above, the utility I’m looking for should:
- Have a Linux version
- Either not have a GUI or have it optional, with also an option to work from command line
- Not rely on S.M.A.R.T., but instead make its own measurements of read/write speed for each block of the device it’s checking
Any suggestions?
1 Answer
there’s the badblocks utility.
https://wiki.archlinux.org/index.php/badblocks
This can be done in a destructive write-mode that effectively wipes the device (do backup!) or in non-destructive read-write (backup advisable as well!) and read-only modes.
The non-destructive test:
# badblocks -nsv /dev/device
Checking for bad blocks in non-destructive read-write mode
From block 0 to 488386583
Checking for bad blocks (non-destructive read-write test)
Testing with random pattern: done
Pass completed, 0 bad blocks found. (0/0/0 errors)
The -n option signifies a non-destructive read-write test.
This is a slow test; it will basically write twice your disk size during the check. I would not run this too often. Make sure to check the block size of your disk and pass it with -b 4096
( Also I haven’t used this utility in ages so read the wiki carefully before you try )
- The bad thing about badblocks is that it does not stress the HDD head with random reads.