disko-san

In preparation of our new NAS system, I ordered a bunch of hard disks and was left with the task of making a health check on those little fellas. Long story short, I had a bunch of new hard disks which I wanted to test, if they are a) health and b) perform as expected.

I couldn’t find any tool which was fulfilling all of my needs:

  • Reads and writes the whole disk
  • Performs the IO operations on the physical plates and not on the cache - especially the read operation
  • Is able to interrupt the health check and resume it later at the same state

Especially the last point was very important, as I’m doing the health check on my workstation, that undergoes occasional reboots. The disks are too big for a single dd operation to complete within one day, so this is a hard requirement.

This is where disko-san comes into play, a new tool that let’s you check new hard disk, interrupt the process and resume it later at the same state as where you left!

disko-san

disko-san is a simple tool to check the sanity of new hard drives. It does so by first writing data to the whole disk once, and then read and verify the written data. Data is written in chunks of 4 MiB, each consisting of a checksum plus random data. Because of the checksum, the program can verify if a previously written chunk is ok or is data corruption occured.

In addition the program is able to write a performance log. This means that it writes the position, size and write time for each written chunk to an additional file. This allows me to check later on, if there are any performance issues with the disk somewhere. This might give indications for bad sectors, which I don’t want to have on a new disk.

The most important feature for me is the state file. In case I need to reboot the system, I can interrupt disko-san and resume the process later on from the same state. This is actually the whole reason, why I wrote this tool in the first place.

The tool is on GitHub, where also pre-compiled binaries are available. When I find the time, I’m also going to build it on OBS.

I hope one day this tool might also serve another user very well :-)