Jump to content

StableBit Scanner - Identifying Disks Uniquely


Alex

Recommended Posts

Keeping this board on topic, I'd like to talk about something pretty technical that is central to how the StableBit Scanner operates, and perhaps get some feedback on the topic.

 

One of the benefits of running the StableBit Scanner is not just to predict drive failure, but to prevent it. The technical term for what the StableBit Scanner performs on your drives to prevent data loss is called Data Scrubbing (see: http://en.wikipedia.org/wiki/Data_scrubbing). By periodically scanning the entire surface of the drive you are actually causing the drive to inspect its own surface for defects and to recognize those defects before they turn into what is technically called a latent sector error (i.e. a sector that can't be read).

 

In order to do the periodic surface scan of a disk, the StableBit Scanner needs to know when it scanned a disk last, which means that it needs to identify a disk uniquely and remember which sectors it has scanned last and when. The StableBit Scanner uses sector ranges to remember exactly which parts of which disk were scanned when, but that's a whole other discussion.

 

I would like to focus this post on the issue of identifying a disk uniquely, which is absolutely required for data scrubbing to function properly, and this was overhauled in the latest BETA (2.5).

 

The original StableBit Scanner (1.0) used a very simple method to identify disks. StableBit Scanner 1.0 used the MBR signature to differentiate disks among each other.

 

For those who don't know what an MBR signature is, I'll explain it briefly here. When you buy a new disk from the store, it's probably completely blank. In other words, the disk contains all 0's written to it throughout. There is absolutely nothing written to it to differentiate it from any other disks (other than the serial number, which may not be accessible from Windows).

 

When you first connect such a blank disk to a Windows machine it will ask you whether you want to "initialize" it. This "initialization" is actually the writing of the MBR (master boot record, see: https://en.wikipedia.org/wiki/Master_boot_record), or GPT (GUID Partition Table) if you so choose. The MBR and GPT define the header (and perhaps footer) of the disk, kind of like when you write a letter to someone and you have a standard header and footer that always follows the same format.

 

One of the things that initializing a disk does is write a unique "signature" to it in the MBR or GPT. It's simply a long random number that identifies a disk uniquely. The problem with a MBR signature is that the random number is not large enough and so it is only meant to be unique on one single system. So if you connect a disk from a different computer, the disk signature on the foreign disk has a miniscule chance of being the same as a disk on the system that its being connected to.

 

Well, for the StableBit Scanner 1.0 this would be a problem. It would recognize the new disk as being the old disk, which would cause all sorts of issues. For one, you can't have the same disk connected to the same computer twice. That's simply not possible and we would write out an error report and crash.

 

StableBit Scanner 2.0 improved things a bit by utilizing the GPT signature, which was guaranteed to be unique across multiple systems. The only problem with using the GPT disk signature to identify disks uniquely is that disk cloning software is capable of placing the same signature on 2 different physical disks which would end up causing the same problem. In addition, many disks still utilize MBR, so we can't solely rely on GPT to resolve this issue.

 

As you can see this has not been an easy problem to solve :)

 

In the latest StableBit Scanner 2.5 BETA I've completely overhauled how we associate disk scan history (and other persistent settings) with each disk in the system. This is a major change from how things used to work before.

 

In 2.5 we now have a brand new Disk ID system. The Disk ID system is heuristic based and picks the best disk scan history that it knows of based on the available information. We no longer rely on a single factor such as a MBR or GPT. Instead, we survey a combination of disk identifiers and pick the disk scan history that fits the available data best.

 

Here is the list of factors that we use, starting from the highest priority:

  • Direct I/O disk serial number
  • GPT Signature + WMI Serial number + Disk size
  • GPT Signature + WMI Model + Disk size
  • GPT Signature + Disk size
  • MBR Signature + WMI Serial number + Disk size
  • MBR Signature + WMI Model + Disk size
  • MBR Signature + Disk size

See the change log for more info on what this change entails. I hope that you give the new build a try.

 

This post has definitely been on the technical side, but that's what this forum is all about :)

 

Let me know if you have any comments or suggestions (or can find a better way to identify disks uniquely).

Link to comment
Share on other sites

  • 10 months later...

I realize this is a late reply, but I was holding my breath till I read "Direct I/O disk serial number". It's one of my pet peeves that Microsoft doesn't use this unique disk identifier to control drive enumeration and identification. Model and size isn't enough - I have 2 drives in my WHS with exactly the same model, size, and identifier. Thanks for the forward thinking! :)

Link to comment
Share on other sites

I realize this is a late reply, but I was holding my breath till I read "Direct I/O disk serial number". It's one of my pet peeves that Microsoft doesn't use this unique disk identifier to control drive enumeration and identification. Model and size isn't enough - I have 2 drives in my WHS with exactly the same model, size, and identifier. Thanks for the forward thinking! :)

 

The Serial Number is not easy to get at, but it's probably one of the best ways to uniquely identify disks.

Link to comment
Share on other sites

Im still a newbie on stablebit, but im very impressed, the drivepool reading the serials is such a good feature, as i dont need to name/sticker my drives, the serials are on front of the disk, so i dont even have to bother checking the HBA.  Thanks again for this feature really useful in my case.

Link to comment
Share on other sites

  • 3 weeks later...

When I rebuilt my server I recorded the serial number and position in the bay.  So I could identify "failing disks" put the sata lead back on a different HD by mistake  (I have 6 drives) and WHS will change the assigned letter. Serial number works for me. 

Link to comment
Share on other sites

×
×
  • Create New...