Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On Linux I can use smartctl to get a hard drive's vendor, model, firmware revision and serial number:

# smartctl -a /dev/sdb
smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

Device: SEAGATE  ST9300603SS      Version: 0006
Serial number: 6SE1ZCSR0000B121LU63
Device type: disk
Transport protocol: SAS

Is the hard drive's serial number (here 6SE1ZCSR0000B121LU63) guaranteed to be globally unique? Is it only unique for a specific vendor? Or even a specific model?

share|improve this question
6  
This is why I love SF, always an interesting set of questions and answers. Strictly out of my own curiosity, may I ask what you plan to do with the unique serial numbers? –  Aaron Aug 12 '11 at 12:09
    
I'm just planning on using them to identify disks inside software RAID arrays. I want to make sure I won't get a nasty surprise when I'll have to replace or add disks. –  e-t172 Aug 12 '11 at 12:11
    
Why aren't you using UUID's like a sane person? –  user606723 Aug 12 '11 at 14:35
5  
Because I'm identifying disks, not partitions. –  e-t172 Aug 12 '11 at 14:44
add comment

5 Answers

up vote 16 down vote accepted

S/N aren't guaranteed to be unique. But as different manufacturers use different schemes for generation of S/Ns, they are mostly unique. Also there aren't any reasons for manufacturers to make two or more HDDs with one S/N. I can say that if they do so it will make warranty returns very difficult. How they will distiungish different devices? It is purpose of S/N.

collisions are really unlikely in practice

There are some cases when software is bounded to HDD model and S/N. When HDD become broken, it gives a lot of pain to reconfigure all system. In such case there are option to make full duplicate of old HDD. It needs special software and/or hardware to rewrite serial number and model in HDD, but it is possible. And it can save a lot of time and/or money.

Also when people want to install bigger HDD in their game consoles XBOX, they buy cheaper common HDDs in market and then tune these HDDs to fit XBOX by special software. This program rewrites model, S/N and some hidden information of HDD, so XBOX "thinks" that HDD is original from console vendor. Look for instruction here.

If you really want to get unique ID of HDD, try to dig into SAS protocol specification and specifications of HDDs with such interface. You will find interesting thing

In SAS, device and port names are worldwide unique names within a transport protocol. Port identifiers are the values by which ports are identified within a domain, and are used as SAS addresses. Phy identifiers are unique within a device.

Also from here

Each SAS port in a SAS domain has a SCSI port identifier that identifies the port uniquely within the SAS domain. It is assigned by the device manufacturer, like an Ethernet device's MAC address, and is typically world-wide unique as well. SAS devices use these port identifiers to address communications to each other.

You can read these IDs and use them to distiungish devices.

share|improve this answer
add comment

Amazing as it sounds, I recently purchased a batch of ASUS Notebooks - every one had the same hard disk serial number (which I use to secure my software) Consequently, no security any more (based on disk serial number)

I am looking for an alternative method of securing my software to a specific computer

Remember the old days when software was sold with a 'dongle' which had to be plugged into a computer for the software to work

share|improve this answer
    
the dongles that got broken and hacked around left right and center ? Also, what do you do for customers who want to use it on a raid array, or virtual machines ? –  Sirex Jan 22 at 23:35
add comment

Serial numbers are by definition unique to a product, but on their own are of little use without knowing the manufacturer and product.

Technically, a serial number is an integer from 1 to infinity.

Anything else should be called an identification code, or simply an id.

Hard disks "serial numbers" are a combination of manufacturer, model and serial number codes, so in practice, they should be unique.

share|improve this answer
add comment

I think every vendor uses their own serializing for their product, every serial is unique.

Are they guaranteed to be globally unique ? probably not by convention.

Are they very likely to be globally unique ? yes

Also, most of the time the serial is a sum of serials indicating model number at the front , then batch number , etc... .

Chances of it not being unique are very very very slim.

share|improve this answer
add comment

Short answer: For my purposes, I consider them to be unique.

Long answer: Every manufacturer has it's own naming scheme for serial numbers, and they are not guaranteed to be globally unique across manufacturers, but they should be unique per manufacturer as, after all, they want to be able to identify a specific unit.

Since everyone has it's own schema, collisions are really unlikely in practice, but the combination of model and serial number should be unique (as long as no ones messes things up during production).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.