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?
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.
There are some cases when software is bounded to HDD model and S/N. When HDD becomes broken, it gives a lot of pain to reconfigure all system. In such case there is 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
Also from here
You can read these IDs and use them to distiungish devices.
Short answer: For my purposes, I consider them to be unique.
Long answer: Every manufacturer has its 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 their 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).
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.
I recently made some code that identified the computers using our software by drive serial number. Out of about 11 stores that I gave the new code to, 3 of them had hard drives with duplicate serial numbers. It appears that hard drive serial numbers are not very consistently unique. Apparently, I'm going to have to find another means of uniquely identifying what computer is being used.
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.
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