doubt in device name for dynamic disk

I wanted to get the partition device object for a partition on dynamic disk.
I saw that the device name for it is \Device\HarddiskDmVolumes\W2k32112Dg0\Volume1
from the disk view.

How to get the system name in the kernel side???

What do you mean by ‘system name’? By the way dynamic disks only have one
partition. Dynamic disk volumes are not presented as partition device
objects.
Mark Roddy

On Mon, Feb 16, 2009 at 4:29 AM, wrote:

>
> I wanted to get the partition device object for a partition on dynamic
> disk.
> I saw that the device name for it is
> \Device\HarddiskDmVolumes\W2k32112Dg0\Volume1
> from the disk view.
>
> How to get the system name in the kernel side???
>
> —
> 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
>

yes I know that dynamic disk have only one partition ie partition 0 if I am not wrong.

I want to get the device object pointer for the named device object.
I use IoGetDeviceObjectPointer API.

For basic disk my objectName would be of the format \Device\Harddisk1\Partition2

For dynamic disk its obvious that it would fail since there is no partition 1 or 2.
we have only partition0 if I am not wrong.

My question is how to get the device object for dynamic disk for dmio driver.
what should be my objectName string that I should pass???

RELATIVELY OFF-TOPIC MODE>

For basic disk my objectName would be of the format \Device\Harddisk1\Partition2

What are you going to do with it??? Look - this is a standalone device object with no devices attached and no requests sent to it. Instead, logical volumes are just mounted on it - PartMgr attaches itself to the disk object and exposes proprietary interface that logical volume manghement (FTDISK in pre-Vista OS versions) uses…

< /RELATIVELY OFF-TOPIC MODE>

My question is how to get the device object for dynamic disk for dmio driver.

Concerning your actual question, the string will be in a form \Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolumeXXXX

Anton Bassov

>What are you going to do with it??? Look - this is a standalone device object
with no devices attached and no requests sent to it. Instead, logical volumes
are just mounted on it - PartMgr attaches itself to the disk object and exposes
proprietary interface that logical volume manghement (FTDISK in pre-Vista OS
versions) uses…

I am passing IOCTLs like IOCTL_DISK_GET_DRIVE_GEOMETRY_EX etc to the object obtained from the \Device\Harddisk1\Partition2 objectname nad populating my internal structures.
I do this for basic disk.
However I fail for dynamic disk.

Concerning your actual question, the string will be in a form
\Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolumeXXXX

I saw this string in device tree. I thought this was a different string though.

when I see the string for basic disk I see something like
\device\harddiskvolumeX.
But I am not using this string in my code to get the device object.
where is device name in the device tree \Device\Harddisk1\Partition2.
I am not seeing this object name in ftdisk or anywhere.

It looks like you have mixed up everything you possibly could - DISK.SYS, FTDISK.SYS, DMIO.SYS, disks, partitions,volumes,etc…

I am passing IOCTLs like IOCTL_DISK_GET_DRIVE_GEOMETRY_EX etc to the object obtained
from the \Device\Harddisk1\Partition2 objectname nad populating my internal structures.

As I told you already, \Device\Harddisk1\Partition2 is standalone device object that is created by DISk.SYS - it corresponds to a physical partition, and nothing is attached to it. All request to DISK.SYS go to \Device\Harddisk1\ DP(X) - device objects named this way are created by DISk.SYS and correspond
to the physical disks themselves. PartMgr attaches itself to these device objects, and FTDISK communicates with these stacks via a proprietary interface that PartMgr exposes - it does not send its requests to the partition objects themselves…

when I see the string for basic disk I see something like \device\harddiskvolumeX.

\device\harddiskvolumeX is a logical volume that is *mounted* on hard disk’s physical partition, and it is created and managed by FTDISK.SYS

Anton Bassov

Hmm…I understand now.

\Device\Harddisk1\ DP(X) is the devicename for the device object created by disk.sys.
so where is this string " \Device\HarddiskX\PartitionX" in device tree for disk.sys.
I was expecting this string to be seen somewhere in device tree.

Also another doubt,
I checked with objdir.exe
There if I check under ArcName I see that the target is always of the format “\Device\HarddiskX\PartitionX” even for the dynamic disks.

what does that mean. I thought dynamic disk has only one partition.
But when I see the objdir it doesnt seem like that.