I try to figure out role of partition driver in storage stacks.
Volume is something that gets a letter and file system over it. One or more volumes may reside on the same disk and a volume may reside on different physical drives. It is possible to query volume with IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS to find which disks service it. This is about physical back end. But when the partition driver comes to play? What is its role? I found that querying volume with IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS and IOCTL_DISK_GET_PARTITION_INFO_EX give the same results: partition offset and extent offset are the same. As I understand, extents describe physical regions of different disks that belong to a volume. A volume can not be split at logical level (it gets only one letter and FS at a time). So what are PartMgr.sys’s and partition’s roles in this scheme?
But what is partition in this case? Extent is something about physical drive and region on it, volume is kind of logical subject that hides hardware implementation. While partition looks kinda superfluous. I understand that it is not true, but still don’t get what partition is. Also another question is how to distinguish between Dynamic disk and Basic disk? Thank you.
IOCTL_VOLUME_IS_DYNAMIC tells you whether a volume is dynamic or not.
As Max said, if IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS returns multiple
xxtents again this is an indication for being dynamic.
(Also, an MBR dynamic disk has a partition type of PARTTION_LDM in the MBR.)
The IOCTL naming tells you where this information is derived from.
To further distinct dynamic or basic (GPT & MBR too) you need the _EX variants of
IOCTL_DISK_GET_DRIVE_LAYOUT / IOCTL_DISK_GET_PARTITION_INFO.
You need to find “clever” combinations of these IOCTLs to collect
information that fits your purpose.
Probably you could regard a partition as base object to build various types
of volume (like dynamic or basic).
AFAIR in XP removable devices had no volume DeviceObject at all but a single
partition only.
But what is partition in this case? Extent is something about physical drive and region on it, volume is kind of logical subject that hides hardware implementation. While partition looks kinda superfluous. I understand that it is not true, but still don’t get what partition is. Also another question is how to distinguish between Dynamic disk and Basic disk? Thank you.
Utimaco Safeware AG - A member of the Sophos Group
Sitz: Oberursel - Registergericht Bad Homburg HRB 5302
WEEE-Reg.Nr.: DE39805015
Vorstandsmitglieder: Steve Munford (Vorsitzender), Malte Pollmann
Aufsichtsratsvorsitzender: Dr. Peter Lammer
Maxim, it looks like that a partition represents RAID-oriented essence, that I miss due to lack of RAID organization details.
Else, so what is the best way? I think that it is enough to check number of disks returned from IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS to consider a volume as dynamic or not.
Also I’m going to check partition/extent relations in a dynamic volume on two disks (hope it is enough to add a disk in VMWare) and in two volumes on the same disk.
I’ve heard that a single partition may have multiple volumes (that sounds very strange). Is it true? Another question is where RAID controller drivers usually reside in storage stack?
> I’ve heard that a single partition may have multiple volumes (that sounds very strange). Is it true?
No.
RAID controller drivers like Promise are lowest-level storage miniports. So the rest of the OS (except the mgmt tool of the RAID controller) knows nothing on phys disks, only on LUNs.
Maxim, thank you for reply. One more question: in which case a dynamic volume may have several partitions? Will it have one driver letter in this case? Thank you.
So a dynamic volume that spans multiple partitions is just one volume
and hence in simple terms will only have one drive letter. More
precisely it can only have one mount point. Mount points can be mounted
as links inside other mount points, so there may be no drive letter. On
the other hand, there can be multiple drive letters to a mount point,
e.g. the subst command can create a new drive letter reference to the
same mount point.
Maxim, thank you for reply. One more question: in which case a dynamic volume may have several partitions? Will it have one driver letter in this case? Thank you.
Mark, thank you for the explanation. But anyway I would like to get an example when a volume has multiple partitions. It will help me to understand why partitions are needed at all.
A volume spans two or more disks by using 1 partition off each disk to
create a logical volume that concatenates the two partitions to create
one large volume. Say each partition is 100GB in size, the size of the
volume will be 200GB and the file system formatted on it will assume
200GB of contiguous blocks. When the file system access a logical block
within the volume, the LVM has to work out which disk and which
partition the I/O has to be sent and uses the partition information to
calculate the actual addresses in the I/O request to the physical media.
Read up on RAID for more complex cases. This is ok for quick diagrams - http://www.thegeekstuff.com/2010/08/raid-levels-tutorial/. With dynamic
disks Windows can support software RAID levels 0, 1, 5 and 10. That can
be a lot of disks/partitions hidden under a single volume mount point.
Mark, thank you for the explanation. But anyway I would like to get an example when a volume has multiple partitions. It will help me to understand why partitions are needed at all.
> disks Windows can support software RAID levels 0, 1, 5 and 10
>
RAID 10 with DynDisk? starting from what version?
Perhaps not RAID 10, too long since I played in that space and had the
disks available to check. I had a lingering memory of reading it as
added, but was probably just dreaming.
However, software RAID 0, 1 & 5 are still examples for the OP of dynamic
disks with multiple partitions under the single volume.
Well, I just tried to figure out WHY OS needs partitions. Driver letters are assigned to volumes, volumes have extents, so partitions are kinda useless. Now I think that partitions in dynamic disks are used to separate RAID’s internal structures like parity data and user data. Not sure about it, have to convert my VMWare disks to dynamic disk and setup RAID. Will do it later. If a disk is not dynamic, then partitions in MBR/GPT describe different volumes.
Suppose the user wants C,D,E&F drives to all use one physical disk. This is
what using partitions allows and this goes back to the beginning of DOS
wrote in message news:xxxxx@ntdev…
Well, I just tried to figure out WHY OS needs partitions. Driver letters are
assigned to volumes, volumes have extents, so partitions are kinda useless.
Now I think that partitions in dynamic disks are used to separate RAID’s
internal structures like parity data and user data. Not sure about it, have
to convert my VMWare disks to dynamic disk and setup RAID. Will do it later.
If a disk is not dynamic, then partitions in MBR/GPT describe different
volumes.