dount in raw filesystem

When I use \Device\Harddisk\Partition0 as the object name to get the device object pointer in IoGetDeviceObjectPointer I always get the raw device as partition 0 for every disk.

so does the filesystem stack is like

fltmgr
ntfs
raw filesystem

I dont see the stack of raw filesystem in device tree.
All I see is rawdisk attached to fltmgr.

where does this raw filesystem sit. I am actually confused regarding this.
any points would be of greta help

OSR has a disk utility that might show you a little more about the
structure. Remember RAW is only mounted for volumes that don’t have
recognized partition types such as unformatted media. The HD0 objects are
there for access to the entire drive as a volume of sectors numbered from
zero to the end without any consideration for mounted volumes contained so
access to the MBR and the Extended MBR(s) can be obtained.

wrote in message news:xxxxx@ntdev…
> When I use \Device\Harddisk\Partition0 as the object name to get the
> device object pointer in IoGetDeviceObjectPointer I always get the raw
> device as partition 0 for every disk.
>
> so does the filesystem stack is like
>
> fltmgr
> ntfs
> raw filesystem
>
> I dont see the stack of raw filesystem in device tree.
> All I see is rawdisk attached to fltmgr.
>
> where does this raw filesystem sit. I am actually confused regarding this.
> any points would be of greta help
>


>OSR has a disk utility that might show you a little more about the
>structure.
Is it diskview utility

>Remember RAW is only mounted for volumes that don’t have
>recognized partition types such as unformatted media. The HD0 objects are
>there for access to the entire drive as a volume of sectors numbered from
>zero to the end without any consideration for mounted volumes contained so
>access to the MBR and the Extended MBR(s) can be obtained.
I am not sure whether I have understood the above or not.
Do u mean to say that if a recognised partitiontype is seen RAW filesystem will not get mounted.
so what is that \Device\Harddisk\Partition0 object name seen for every disk.

> When I use \Device\Harddisk\Partition0 as the object name to get the device object

pointer in IoGetDeviceObjectPointer I always get the raw device as partition 0 for every disk.

so does the filesystem stack is like
fltmgr
ntfs
raw filesystem

No it does not. Don’t forget that NTFS is mounted not on the physical partition but on logical volume that, in turn, is mounted on this partition - \Device\Harddisk0\Partition0 (which is PDO) ends up as a standalone device with no devices attached to it, while \Device\Harddisk0(DP 0) is FDO with PartMgr attached to it. Raw file system is mounted on this stack. This is why it is called “raw”, in the first place - it allows UM apps to access a disk directly via a name like “\.\PhysicalDrive0”, effectively bypassing NTFS. Ftdisk mounts its logical volume devices on physical partitions without attaching itself to these partitions - instead, it communicates with them via a proprietary interface that PartMgr exposes. NTFS mounts itself on the stacks that are built on top of logical volume PDOs that Ftdisk creates…

Anton Bassov

You have mentioned that \Device\Harddisk0\Partition0 is a stand alone device attached with partition manager.
you have also mentioned that " NTFS is mounted not on the physical partition
but on logical volume that, in turn, is mounted on this partition -
\Device\Harddisk0\Partition0 "

Both seems to be contradicting!!

when I see in device tree I see the stack something harddiskvolumex, ntfs, fltmgr.

As u said logical volume(harddiskvolumex) mounts itself to \Device\Harddisk0(DP 0) via the partition manager interface.

This is what I understood. Am I correct??

> You have mentioned that \Device\Harddisk0\Partition0 is a stand alone device attached

with partition manager.

No, I did not say that…

\Device\Harddisk0\Partition0 is a PDO that corresponds to a partition , and \Device\Harddisk0\ (DP0) is FDO that correspond to the disk itself. PartMgr is upper filter, so that filter device that it creates is attached
TO \Device\Harddisk0\ (DP0)…

you have also mentioned that " NTFS is mounted not on the physical partition but on logical volume
that, in turn, is mounted on this partition - \Device\Harddisk0\Partition0 "

This is, indeed, what I said …

when I see in device tree I see the stack something harddiskvolumex, ntfs, fltmgr.

No, you just cannot see a stack like that - harddiskvolumex belongs to a storage stack, while ntfs and fltmgr belong to FS one, i.e. these are different stacks…

As u said logical volume(harddiskvolumex) mounts itself to \Device\Harddisk0(DP 0) via
the partition manager interface.

Correct…

Anton Bassov

then what is this harddiskx\DRX ???

so when I try to open the \.\PhysicalDrive0 it calls \Device\Harddisk0(DP 0) in the driver side.

Raw file system sits on top of all \Device\Harddiskx(DP x) if NTFS is not mounted on logical volume.

Am I correct??

Is there any books that talk about these things or any article.

> Is there any books that talk about these things or any article.

“Windows Internals”…

Anton Bassov

I have few more doubts.

U have mentioned that

\Device\Harddisk0\Partition0 is a PDO that corresponds to a partition , and
\Device\Harddisk0\ (DP0) is FDO that correspond to the disk itself. PartMgr is
upper filter, so that filter device that it creates is attached
TO \Device\Harddisk0\ (DP0)…

somewhere in someotehr post I saw that u have posted that

DISK.SYS creates a FDO for a disk (named like "\DEVICE\HARDDISKx\DRx), plus PDOs for each partition of the disk (named like "\DEVICE\HARDDISKx\ DP(y)0x7…)).

I got the oabove from this link
http://www.osronline.com/showThread.cfm?link=115098

so basically which is the FDO and which is the PDO.
Both r contradicting!!

Again in device tree I see partition manager attached to \DEVICE\HARDDISKx\DRx which I am not sure whether it is PDO or FDO.

Nothing is attached to \DEVICE\HARDDISKx\ DP(y)0x7…!!!

Does Raw file system sits on top of all \Device\Harddiskx(DP x) if NTFS is not
mounted on logical volume.

> Nothing is attached to \DEVICE\HARDDISKx\ DP(y)0x7…!!!

I could well be mistaken about abbreviations,and by saying " \DEVICE\HARDDISKx\ DP(y)" I meant
“\DEVICE\HARDDISKx\DRx” , which is FDO created by DISK.SYS (I haven’t seen Windows screen for around 18 months or even more, so that such “forgetfulness” is more or less understandable). Now I recall that, in actuality, \Device\Harddisk0\Partition0 is not a name but a symbolic link to
\DEVICE\HARDDISKx\ DP(y), which is standalone PDO for partition…

Does Raw file system sits on top of all \Device\Harddiskx(DP x) if NTFS is not mounted
on logical volume.

Raw file system never “sits of top” of ANY device created by Disk.sys - it may be just mounted on it, so that it is not the same stack. …

Anton Bassov

Now I recall that, in actuality,
\Device\Harddisk0\Partition0 is not a name but a symbolic link to
\DEVICE\HARDDISKx\ DP(y), which is standalone PDO for partition…

I thought it is a symbolic link to \DEVICE\HARDDISKx\DRx

The below I got from some other post
"\Device\Harddisk%d\Partition0 is a symlink to the DO which is the whole
physical disk. In NT4, this was a real disk DO name, since w2k it is a symlink,
and the real DO name is \Device\Harddisk%d\DR0
"

link is http://www.osronline.com/showThread.cfm?link=130705

I am getting confused:(

so finally \DEVICE\HARDDISKx\ DP(y) is the pdo.
But I dont see partmgr attached to it in the device tree.

>Raw file system never “sits of top” of ANY device created by Disk.sys - it may
>be just mounted on it, so that it is not the same stack. …

so can I say that when NTFS is not getting mounted for some reason on a volume raw file system gets mounted by default.

> so finally \DEVICE\HARDDISKx\ DP(y) is the pdo. But I dont see partmgr attached to it in the device tree.

As I told you already, PartMgr is an upper filter that attaches itself to FDO (i.e. disk), and PDO (i.e physical partition)ends up as standalone device - volume is MOUNTED on it…

Anton Bassov

Yeah I see that pdo is a standalone device.

You confirmed that

As u said logical volume(harddiskvolumex) mounts itself to \Device\Harddisk0(DP 0) via
the partition manager interface.

That is why I was searching for the partition manager interface to the pdo.
I was expecting this to be seen in device tree

I’m sorry… I don’t understand this at all.

WHAT were you expecting to see in Device Tree?

Peter
OSR

> WHAT were you expecting to see in Device Tree?

I am not sure the poster understands the difference between attaching and mounting…

Anton Bassov

> Do u mean to say that if a recognised partitiontype is seen RAW filesystem will not get mounted.

Partition type is not important for this at all.

All existing FSDs are enumerated and the mount path is called for each. If some of them will successfully mount - then OK. Otherwise, RAW is mounted.

RAW is IIRC only used to support NtQueryVolumeInformationFile/GetDiskFreeSpaceEx on an unrecognized volume, for nothing else.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

> \Device\Harddisk0\Partition0 is a PDO that corresponds to a partition ,

\Device\Harddisk0\Partition0 is a symlink to \Device\Harddisk0\DR0, which is a FDO for the disk, sitting on top of the storage port’s LUN PDO.

“Partition0” means - whole disk.

\Device\Harddisk0\Partition1 is a symlink to “…\DP0” which is a partition PDO created by Disk.sys/ClassPnP.sys


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Use devicetree and winobj. Combined together it should give you a good
picture.
Harish

-----Original Message-----
From: xxxxx@yahoo.co.in [mailto:xxxxx@yahoo.co.in]
Sent: Friday, March 06, 2009 12:54 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] dount in raw filesystem

Yeah I see that pdo is a standalone device.

You confirmed that

As u said logical volume(harddiskvolumex) mounts itself to
\Device\Harddisk0(DP 0) via
the partition manager interface.

That is why I was searching for the partition manager interface to the
pdo.
I was expecting this to be seen in device tree


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

Thanks Maxim.

>I am not sure the poster understands the difference between attaching and
>mounting…

Can u tell me the difference.

>All existing FSDs are enumerated and the mount path is called for each. If some
>of them will successfully mount - then OK. Otherwise, RAW is mounted.

what is that mount path? Is it the drive letter assignment??

. > Can u tell me the difference.

Attaching/stacking describes relationship between DOs from IO Manager’s perspective. Mounting describes logical relationship between different devices/ stacks in terms of functionality. For example, although, from the logical standpoint, logical volumes and FSDs are related, from IO Manager’s perspective these are totally independent stacks that have no relationship to one another - IRPs that are send to the logical volumes are not seen by FSDs…

what is that mount path?

IRP_MN_MOUNT request that gets sent to FSD…

Is it the drive letter assignment??

Drive letter assignment is out of FSD’s scope…

Anton Bassov