FW:RE: \Device\HarddiskVolumeX <-> \Device\HarddiskY\PartitionZ

-----Original Message-----
From: Basil Thomas [mailto:xxxxx@iname.com]
Sent: Wednesday, June 21, 2000 12:40 PM

Hi Balan… plse look at the attached doc… it is from MSDN.

============================================================================

Physical Drive Number

If your application is trying to access the hard drives and the volumes in a
low-level way (as with virus scanners, for example), you’ll need to find the
physical drive number, and you are going to have to change the way you find
that number. In the past, you could use a symbolic link, which would return
something like this:

\Device\HarddiskX\PartitionY

Somewhere in there you’d be able to find that “Harddisk,” find the X after
it, and see that it was hard disk 2 or hard disk 3. Now, the symbolic link
is returning:

\Device\HarddiskVolumeZ

The physical drive number isn’t in that symbolic link anymore, anywhere. You
will need to use instead a couple of IOCTLs that are available. The first
one:

IOCTL_STORAGE_GET_DEVICE_NUMBER

works for a single drive number. For example, if the drive is a C drive,
that will work, or even if you have multiple partitions on a drive. But if
you have a multivolume set, you’ll need to use:

IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS

This has been true for Windows NT 4.0 as well; it’s always a little
dangerous to have found the physical drive number out of the symbolic
links-they would only tell you the first drive in what may be a multidrive
set.

==========================================================================

–BASIL

\Device\HarddiskVolumeX are PDOs created by the Volume Manager, FTDISK.
\Device\HarddiskY\PartitionZ are symbolic link name created by volume
managers(LDM , FTDISK…(except for Z=0, which are symbolic link created by
the disk driver for its FDO) to give backward compatibility
I don’t know if u could find some relation among X, Y and Z as such.
\Device\HarddiskVolumeX <-> \Device\HarddiskY\PartitionZ
But, since \Device\Harddisky\PartitionZ are symbolic names, one can use
Zw(/Nt)QuerySymbolicLinkObject to find their respective target names.

thx
pash

\Device\HarddiskVolumeX <-> \Device\HarddiskY\PartitionZ

Cites from our internal document - maybe helpful to you:

"…creates a disk FDO on top of the scsiport’s PDO with the name:
\Device\Harddisk%d\DR%d

  • where the second decimal is the next value of some internal
    disk sequence number"

“…and creates 2 symlinks to the stack:
\Device\Harddisk%d\Partition0
\Device\PhysicalDrive%d
(decimals are the same in each symlink)”

"…PDO name is:
\Device\Harddisk%d\DP(%d)%%#I64x-%#I64x+%lx

  • where the second decimal is partition number
  • 2 64bit hex numbers are partition offset and length
  • last hex is the next value
    of some internal disk sequence number"

Max


You are currently subscribed to ntfsd as: xxxxx@Legato.COM
To unsubscribe send a blank email to $subst(‘Email.Unsub’)