disko-san is a simple command line tool to check the sanity of new hard drives. It first writes chunks of data to the disk, consisting of a checksum plus random data. Each chunk is 4 MiB in size. After writing the disk full, it re-reads all of those chunks and verifies via their checksum if any corruption occurred. The program keeps track of its progress on a disk via an optional state file. This file allows the program to be terminated and resumed later on

The program is written in plain go and should run on any non-ancient Linux system. Probably also on *BSD.

The tool can be found on codeberg.org/grisu48/disko-san (GitHub mirror).

State file

The magic of the tool is to keep a state file. Here, disko-san writes its current progress, so that the program can be terminated and continued later on. This was the whole reason why I wrote this tool. I had to verify a bunch of hard disks that were to big to run at once without a system reboot.

Performance log

disko-san can additionally store it’s write metrics to a performance log file. There it stores the position, size (always 4 MiB), and milliseconds how long it took to write that chunk as CSV file. You can use this file to search for potentially bad sectors, where the write speed deviates significantly and consistently from the disk median.


I build disko-san binaries for openSUSE in my tools repository on OBS.


zypper addrepo https://download.opensuse.org/repositories/home:ph03nix:tools/openSUSE_Tumbleweed/home:ph03nix:tools.repo
zypper refresh
zypper install disko-san

Leap 15.4

zypper addrepo https://download.opensuse.org/repositories/home:ph03nix:tools/openSUSE_Leap_15.4/home:ph03nix:tools.repo
zypper refresh
zypper install disko-san

For other distributions you can try the pre-build binaries from codeberg.org, or you build it yourself.


Build instructions are on GitHub, but it’s as easy as

git clone https://github.com/grisu48/disko-san.git
cd disko-san
go build -o disko-san disko-san.go


disko-san DISK [STATE] [PERFLOG]

  DISK          defines the disk under test
  STATE         progress file, required for resume operations
  PERFLOG       write performance (write metrics) to this file

Assuming your disk under test is /dev/sdh and you’d like to store the state file to your home directory, simply run

disko-san /dev/sdh /home/phoenix/sdh_state
Licensed under CC BY-NC-SA 4.0