I also use IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS,
and I also use it for basic volumes in W2K/XP to have identical handlin=
g
for both kinds of volumes.
At least, if a basic volume has only one extent, it’s a “normal” basic
volume.
I do not agree with 3.:
my extents for a certain volume are all of the same size to simplify
creation
of extents for testing.
To see if it is spanned, compare the
PVOLUME_DISK_EXTENTS->DISK_EXTENT[index].DiskNumber(s).
Regards
Else
=
=20
“Benoit FAURE” =
=20
evelopers" =20
.com> cc: <kristian.traik>xxxxx@atia.com> =20
Sent by: Subject: *[ntfsd] R=
E: How to get Volume/Partition type( Simple, =20
xxxxx@lis Striped, Spanned…)? =
=20
ts.osr.com =
=20
=
=20
=
=20
26.11.2002 11:13 =
=20
Please respond to =
=20
“File Systems =
=20
Developers” =
=20
=
=20
=
=20
Under W2K, there are no IOCTL.
I think I have a solution for dynamic disks.
The following algorithm works for many cases, buy it cannot distinguish=
between a “Striped”
volume and a “Spanned” volume when every extent is the same size.
1. Call IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS for the volume.
2. If there is only one extent then the volume is “Simple”.
3. Otherwise, if the extents are not all the same size, then the
volume is “Spanned”.
4. Otherwise, if there are two extents, but the volume size is equal
to one extent, then the volume is “Mirrored”.
5. Otherwise, if there are N extents, and the volume size is the sum
of N-1 extents, then the volume is “RAID-5”.
6. Otherwise, the volume is “Spanned” or “Striped”.
An (undocumented) idea to solve #6 would be to call
IOCTL_MOUNTDEV_QUERY_DEVICE_NAME (mountmgr.h)
on the volume handle. For stripes the name looks like
\Device\HarddiskDmVolumes<diskgroupname>\StripeN.
And, after discussions with MICROSOFT, they answered me :
"we do not recommend or support any attempt to bypass our volume
manager. "
"We strongly urge customers not to try such tricks. "
"So do not really have a permenant solution now. "
Let me know if you have a better solution or a solution for basic disks=
.
Benoit
-----Original Message-----
From: Kristian Traikov [mailto:xxxxx@atia.com]
Sent: Thursday, November 07, 2002 3:57 PM
To: File Systems Developers
Subject: [ntfsd] How to get Volume/Partition type( Simple, Striped,
Spanned…)?
Hi all,
I just need to create two “simple” UserMode functions like these:
///////////////////////////////////////////////////////////////////////=
/
/
// For DYNAMIC volumes
//
BOOL GetDynamicVolumeType( LPCTSTR lpRootPathName, LPDWORD
lpVolumeType);
Where volume types are:
typedef enum {
Mirror,
Stripe,
RAID5,
Spanned,
Simple,
…
} VOLUME_TYPE;
///////////////////////////////////////////////////////////////////////=
/
/
// For BASIC partitions
//
BOOL GetBasicPartitionType( LPCTSTR lpRootPathName, LPDWORD
lpPartitionType);
Where partition types are:
typedef enum {
Mirror,
Stripe,
ParityStripe,
VolumeSet,
NonFT,
WholeDisk
} PARTITION_TYPE;
BASIC partitions
I found that W2K recognizes multipartition volumes created under
NT(stripe, volume set…) IF there is at least one “RESTORE disk
configuration” on these disks (it could be from different W2K
workstation).
For example:
1. You create stripe set under NT workstation (A) and save disk
configuration diskette.
2. Move disks on W2K workstation (B) and restore disk configuration fro=
m
the diskette. Disk Manager creates registry disk key on local W2K
computer
and writes some sectors on NTFT disks.
3. Now, move disk on different W2K workstation (C) and you can use the
stripe set whithout restoring disk configuration.
I have to get this type of information for both dynamic and basic
volumes
without digging into Veritas LDM database records NOR DiskKey registry
key.
Are there some undocumented functions or IOCTLS??
Kristian
__________________________________________________
Modem offert : 150,92 euros rembours=E9s sur le Pack eXtense de Wanadoo=
!
Haut d=E9bit =E0 partir de 30 euros/mois : http://www.ifrance.com/_relo=
c/w
—
You are currently subscribed to ntfsd as: xxxxx@utimaco.de
To unsubscribe send a blank email to %%email.unsub%%
=</kristian.traik>