There is no requirement for a 1-1 mapping. A volume can be contained on more
than one disk. What is the disk partition for an LDM mirrored volume?
You can get at related information from
IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS, which gives you an array of
DISK_EXTENTS for the volume:
typedef struct _DISK_EXTENT {
DWORD DiskNumber;
LARGE_INTEGER StartingOffset;
LARGE_INTEGER ExtentLength;
} DISK_EXTENT, *PDISK_EXTENT;
You could, if your were clever, correlate this back to the partition on a
particular harddisk FOR NON LDM volumes, based on how partitions are named.
For LDM volumes your question is not particularly applicable.
=====================
Mark Roddy
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Fred
Sent: Wednesday, April 06, 2005 2:48 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How can I relate \Device\HarddiskVolumeX to
\Device\HarddiskY\PartitionZ
I’m writing a volume filter driver that sits atop disk.sys. I create a
device object for each volume (e.g. \Device\HarddiskVolume1) on the system.
I need to figure out where this volume resides on the physical
drive/parition (e.g. \Device\Harddisk0\Partition1).
Any ideas on how I can find the physical-drive/partition from a volume?
Thanks!
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com