Unique disk identifier

Hi,

In Windows is there a unique identifier for disk that identifies a disk
uniquely across reboots. Some of the possibilities I know:

  1. Disk Signature for MBR disk / Disk Guid for GPT disk (what if somebody
    overwrites MBR/GPT portion of disk and OS writes a new signature/guid on
    disk?)

  2. For SCSI devices, “Unique Lun Id” from page 0x83 (SCSI-3) or combination
    of some “SCSI-Inquiry attributes” (SCSI-2) (What about non SCSI devices?)

Thanks.

You want the disk serial number - it is required and unique and almost
all disks support fetching it. See this thread:
http://www.osronline.com/showthread.cfm?link=144497

Mark Roddy

On Thu, Oct 14, 2010 at 6:32 AM, Sunil Patil wrote:
> Hi,
>
> In Windows is there a unique identifier for disk that identifies a disk
> uniquely across reboots. Some of the possibilities I know:
>
> 1. Disk Signature for MBR disk / Disk Guid for GPT disk (what if somebody
> overwrites MBR/GPT portion of disk and OS writes a new signature/guid on
> disk?)
>
> 2. For SCSI devices, “Unique Lun Id” from page 0x83 (SCSI-3) or combination
> of some “SCSI-Inquiry attributes” (SCSI-2) (What about non SCSI devices?)
>
> Thanks.
>
> — NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the
> List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

Sunil Patil wrote:

In Windows is there a unique identifier for disk that identifies a
disk uniquely across reboots. Some of the possibilities I know:

  1. Disk Signature for MBR disk / Disk Guid for GPT disk (what if
    somebody overwrites MBR/GPT portion of disk and OS writes a new
    signature/guid on disk?)

If they do so, the operating system isn’t going to recognize it as the
same volume. I’m not sure what you’re trying to protect, but in that
case the user is pretty much “asking for it”. Unsophisticated users
don’t do that kind of thing.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Sunil Patil wrote:

  1. For SCSI devices, “Unique Lun Id” from page 0x83 (SCSI-3) or
    combination of some “SCSI-Inquiry attributes” (SCSI-2) (What about non
    SCSI devices?)

Your chance of seeing a SCSI disk which doesn’t conform at least to the
ancient SCSI-3 standard is negligible. There have been several
generations of SCSI standards since SCSI-3.