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:
- You create stripe set under NT workstation (A) and save disk
configuration diskette.
- Move disks on W2K workstation (B) and restore disk configuration from
the diskette. Disk Manager creates registry disk key on local W2K computer
and writes some sectors on NTFT disks.
- 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
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.
- Call IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS for the volume.
- If there is only one extent then the volume is “Simple”.
- Otherwise, if the extents are not all the same size, then the
volume is “Spanned”.
- Otherwise, if there are two extents, but the volume size is equal
to one extent, then the volume is “Mirrored”.
- Otherwise, if there are N extents, and the volume size is the sum
of N-1 extents, then the volume is “RAID-5”.
- 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 from
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?s sur le Pack eXtense de Wanadoo !
Haut d?bit ? partir de 30 euros/mois : http://www.ifrance.com/_reloc/w