Volumes take too long to appear

Hey,

Our product records digital video to several hard drives all with the
same partitioning scheme and in order to ease things for production I’ve
created a custom partitioning and formatting tool in userspace. The
method I’m currently using to repartition and format the disk is the
following:

Call IOCTL_DISK_GET_DRIVE_GEOMETRY_EX to get the drive geometry

Call IOCTL_DISK_CREATE_DISK, if neccesary (signature = 0)

Set up the desired partitioning scheme in a DRIVE_LAYOUT_INFORMATION_EX
structure

Call IOCTL_DISK_SET_DRIVE_LAYOUT_EX to repartition the drive

Call IOCTL_DISK_VERIFY on the whole disk

Call IOCTL_DISK_UPDATE_PROPERTIES to get the O/S to update the partition
table

Keep running FindFirstVolume/Find Next Volume in a loop and using
IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS to find the Unique Volume IDs for
each new volume we’ve just created

Format each volume using the undocumented FormatEx function in FMIFS.dll
(details from sysinternals)

This procedure seems to work fine, with the exception that it can take a
very long time for the new volumes to appear (sometimes up to a few
minutes). My question is, is there any way to speed this up? i.e. Is
there any way to tell the mount manager that we’ve just repartitioned a
disk so could it start assigning volume names now rather than when it
next polls or whatever.

Thanks,
JHZ

Try running DISKPART and FORMAT from a BAT file.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Jared Holzman”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 03, 2006 7:14 AM
Subject: [ntdev] Volumes take too long to appear

> Hey,
>
> Our product records digital video to several hard drives all with the
> same partitioning scheme and in order to ease things for production I’ve
> created a custom partitioning and formatting tool in userspace. The
> method I’m currently using to repartition and format the disk is the
> following:
>
> Call IOCTL_DISK_GET_DRIVE_GEOMETRY_EX to get the drive geometry
>
> Call IOCTL_DISK_CREATE_DISK, if neccesary (signature = 0)
>
> Set up the desired partitioning scheme in a DRIVE_LAYOUT_INFORMATION_EX
> structure
>
> Call IOCTL_DISK_SET_DRIVE_LAYOUT_EX to repartition the drive
>
> Call IOCTL_DISK_VERIFY on the whole disk
>
> Call IOCTL_DISK_UPDATE_PROPERTIES to get the O/S to update the partition
> table
>
> Keep running FindFirstVolume/Find Next Volume in a loop and using
> IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS to find the Unique Volume IDs for
> each new volume we’ve just created
>
> Format each volume using the undocumented FormatEx function in FMIFS.dll
> (details from sysinternals)
>
> This procedure seems to work fine, with the exception that it can take a
> very long time for the new volumes to appear (sometimes up to a few
> minutes). My question is, is there any way to speed this up? i.e. Is
> there any way to tell the mount manager that we’ve just repartitioned a
> disk so could it start assigning volume names now rather than when it
> next polls or whatever.
>
> Thanks,
> JHZ
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer