Jump to content

  • Log in with Twitter Log in with Windows Live Log In with Google      Sign In   
  • Create Account

Photo

StableBit Scanner - Identifying Disks Uniquely


  • Please log in to reply
4 replies to this topic

#1 Alex

Alex

    Lead Programmer

  • Administrators
  • 243 posts
  • LocationNew York, USA

Posted 05 August 2013 - 11:24 PM

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..../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...ter_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).


  • Christopher (Drashna) and gringott like this

#2 Breeze

Breeze

    Member

  • Members
  • PipPip
  • 17 posts

Posted 14 June 2014 - 10:46 AM

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! :)

#3 Alex

Alex

    Lead Programmer

  • Administrators
  • 243 posts
  • LocationNew York, USA

Posted 18 June 2014 - 06:07 AM

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.



#4 Abula

Abula

    Member

  • Members
  • PipPip
  • 17 posts
  • LocationGuatemala

Posted 25 June 2014 - 06:33 AM

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.


SUPERMICRO X9SCM-F-O | Intel Xeon E3-1230 | Thermalright AXP-140 + Noctua NF-A14 PWM @350rpms | Kingston 4GB ECC DDR3 1333 | 2x IBM1015 + 8x Hitachi 5K3000 2TB + 8x Seagate ST4000DM000 4TB | Lian Li PC-D8000 + 7x Noctua NF-S12A PWM  + 5x Noctua NF-A14 PWM | Seasonic Platinum SS-860XP2 | WHS2011 + Stablebit Pool & Scanner

 


#5 britgeezer

britgeezer

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 13 July 2014 - 02:43 PM

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. 






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users