Building a Monster SpinRite machine

I built this to be able to run SpinRite on multiple hard drives at once so I wouldn’t have to wait days to scan a RAID array.

Recently, one of the drives in my QNAP TS-453 Pro had a SMART warning. A value that normally is 0 was incremented to 1. After doing some research, I read that this is not really a bad error to have (at least when it’s not throwing them continuously) and likely indicates that the drive just took longer than normal to write a sector.

Since bought a copy of SpinRite a while back, I figured this would be a great time to run it on the drive just to be sure. And, while I’m running it on one of the array’s drives, I might as well run it on the whole set.

But, that’s one problem… SpinRite is a DOS based tool that you normally boot a machine into and it scans one drive. Slowly. Very slowly… My QNAP has four WD Red 2TB drives and each drive takes about 24 hours to be scanned. Thus, I’d be looking at having my QNAP offline for 4 days if I had to run the drives one-at-a-time.

Tangential opinion: I wish Steve Gibson, the author of SpinRite, would have chosen to improve SpinRite rather than spend the past year (or more?) working so intently on SQRL — it’s a neat project, but improving SpinRite would definitely benefit people – especially since SR doesn’t like the GPT disks that are becoming much more common.

Not wanting to wait four days to sequentially scan the drives, I considered options. I had a spare old first-generation i3 system sitting in the garage not being used. Luckily, it was once my home-built NAS, so has a quad-drive ‘hot swap’ tray in it (similar to this). Perfect for the four drives I was needing to scan!

P1010844 P1010865
I got everything wired-up and installed Fedora 23 on it. Once that was done, an install of VirtualBox was next. This took a bit of Googling because the VBox kernel drivers weren’t installed, but it wasn’t too hard to get things working.

The hot-swap trays are plugged into SATA port 0-3, so they show as /dev/sda through /dev/sdd in Linux (the boot drive is sde). I created four DOS VMs and made a raw disk map for each one. A raw disk map (RDM) allows the VM to ‘see’ the actual hardware/drive and not use a virtual drive like you’d typically use. Thus, “SpinRite 1” was mapped to /dev/sda, “SpinRite 2” was mapped to /dev/sdb and so-on.

Example: VBoxManage internalcommands createrawvmdk -filename /home/spinrite/SR1/sda.vmdk -rawdisk /dev/sda

More info on Raw Disk Mapping in Virtualbox.

P1010870 P1010871
Once the RDMs were configured, each VM was pointed to my SpinRite ISO and they booted right up!

P1010881 P1010882 P1010876 P1010883
I selected the 2TB drive attached to each VM and started it running. After 24 hours, I had completed the tests on all four drives.

I figured I’d use the “Monster SpinRite Machine” to scan a few more drives, but it doesn’t like the GPT disk that Windows created for my gaming machine. This is supposed to be fixed in version 6.1 of SpinRite — hopefully that doesn’t take too many more years to emerge because more and more disks are GPT formatted and SR not handling them will be a real issue.

Overall, this was a pretty easy project and the results were great. I’m going to put the machine back out into the garage and use it like an ‘appliance’ whenever I want to SpinRite multiple disks at once. One thing that’s a bit of a pain is the fact that the RDMs in VirtualBox are ‘keyed’ to the disk that is present when you create them. So, if I put a different drive into /dev/sda (for example) VB will complain that the disk is not present. I just delete and re-create the VMs, since it’s so easy, but I do wish that the RDM was ‘port level’ instead of ‘disk level’.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.