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?

  • 8
    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, 2011 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. Aug 12, 2011 at 12:11
  • Why aren't you using UUID's like a sane person?
    – user606723
    Aug 12, 2011 at 14:35
  • 8
    Because I'm identifying disks, not partitions. Aug 12, 2011 at 14:44

6 Answers 6


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 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

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.


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.


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.


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.

  • Interesting statistics, thanks for sharing! In my experience I haven't seen duplicates yet, but the last couple of customers were all HP. I think it might be the same as with supposedly unique MAC addresses to got recycled by cheaper vendors.
    – HBruijn
    Jul 24, 2014 at 18:46
  • I don't know what vendors some of the machines were, but in one instance I do. One of the stores had two Acer Iconia W500 tablets and both had the same hard drive serial number. Jul 25, 2014 at 18:37

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

  • 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, 2014 at 23:35
  • Install4J has/had a pretty good licensing system - allocated "per computer" no-questions-asked. On startup, if it detected the same license on the network, the already running one would be instantly shut down with no save. (Some thought they'd get a bit lazy about transferring licenses properly :D)
    – Stephen
    Jun 7, 2017 at 11:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .