"John Doue" said in
Each time a partition is created on a hard disk, it is assigned a very
long number that is probably random. How do I gain access to that
number so that I can safely and uniquely identify a partition. Any
way to control the assignment of this number or to edit it?
Regards
Disk numbers? Each time you partition, you update the partition table which
is a part of the MBR (master boot record). There are no disk numbers there;
i.e., the partitions are relative pointers on THAT disk, not on another one.
Maybe what you meant to ask about is the disk signature. This is a number
that *Windows* will put ON the disk to uniquely identify it. It is a
signature for the *disk*, not for any partition (there is mention of
partition GUIDs but it doesn't explain them). I remember having problems
one time with Disk Management because of a problem with a disk signature
(what was recorded in the registry didn't match the one recorded on the
drive). I had to wipe out the current disk signatures and then reboot
Windows to rerun the Disk Management snap-in which would then assign a new
disk signature. I couldn't find anything in the Disk Management snap-in
that lets you see or control the disk signature. See the following KB
article:
A Description of the Diskpart Command-Line Utility
http://support.microsoft.com/?kbid=300415
Using DISKPART is a bit of a hassle because you first have to use its SELECT
command to pick the object about which you want to edit or view its
properties. So, for example, to look at my first physical drive, I'd run:
LIST DISK
...
SELECT DISK 0
DETAIL DISK
I'd then see the disk signature on the line "Disk ID:". For me, it is also
shown as a SCSI type drive but that's because it is connected to the Serial
ATA (SATA) port instead of the parallel ATA (PATA) port (PATA is the what we
used to just call the IDE ports). When I had to wipe out what the Disk
Management saw in the registry compared to what was put on the disk for the
signature (and which didn't match), I had to delete something from the
registry which was a table of these disk signatures. Currently, and because
my drive is on a SATA port, the disk signature is listed under:
HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\MultifunctionAdapter\6\DiskCo
ntroller\0\DiskPeripheral\0
in the "Identifier" data value. There are more entries under the
"HKLM\SYSTEM\ControlSet[xx]\Enum\STORAGE\Volume\..." registry key but it all
gets too convoluted for me.
You can run msinfo32.exe to look at the drives to see what is the volume
serial number for each volume. The volume serial number show here is the
same one shown when you run the 'dir' DOS command. If you need to change
it, you could use the VolumeID utility from SysInternals
(
http://www.sysinternals.com/ntw2k/source/misc.shtml#volumeid). As I
recall, SysInternals provided this utility so you could use disk images to
quickly setup a drive but change the volid for the partitions on the copied
drive. I forget the reason for having volids unique for copied drives. A
changed disk signature can cause problems, like the disk then becoming
inaccessible to the Clusdisk tool (for clustering), but I don't know why the
volid has to be unique across hosts or drives (but can see they probably
need to be unique for partitions within the same physical drive).