3.1.4.1.4 Disks

DiskMerge:  For call sequencing related to the dgid and cchDgid input parameters, see ImportDiskGroup. For call sequencing related to the numDisks and diskList input parameters, see ImportDiskGroup.

Before invoking DiskMerge, the client MUST invoke DiskMergeQuery to retrieve the disk group's last known state, an array of disk IDs, and a count of the disks in the array. The client MUST pass these returned values as the merge_config_tid, merge_dm_rids, and numRids input parameters to the DiskMerge method. The DiskMergeQuery method returns these values as the merge_config_tid, merge_dm_rids, and numRids output parameters.

DiskMergeQuery: Before invoking DiskMergeQuery, the client MUST invoke EnumDisks to retrieve the disk group's ID and the disk group's count of characters in the disk group ID. The client MUST pass these returned values as the dgid and cchDgid input parameters to the DiskMergeQuery method. The EnumDisks method returns these values as the DISK_INFO::dgid and DISK_INFO::cchDgid structure members.

Prior to invoking DiskMergeQuery, the client MUST invoke EnumDisks to retrieve the number of disks and a list of the disk IDs. The client MUST pass these returned values as the numDisks and diskList input parameters to the DiskMergeQuery method. The EnumDisks method returns an array of DISK_INFO structures; and the client MUST construct the list of disk IDs and the count of disks in the list, using this array of DISK_INFO structures.

Eject:  Before invoking Eject, the client MUST invoke EnumDisks to retrieve the disk ID and the disk's last known state. The client MUST pass these returned values as the diskId and diskLastKnownState input parameters to the Eject method. The EnumDisks method returns these values as the DISK_INFO::id and DISK_INFO::lastKnownState structure members.

EncapsulateDisk:  Before invoking EncapsulateDisk, the client MUST invoke GetEncapsulateDiskInfo to retrieve the lists of disks that will be converted to dynamic disks, as well as the lists of volumes and regions on these disks. The GetEncapsulateDiskInfo method also returns the count of items in each of these lists. The client MUST pass these returned values as the affectedDiskList, affectedVolumeList, affectedRegionList, affectedDiskCount, affectedVolumeCount, and affectedRegionCount in the input parameters to the EncapsulateDisk method. These values are returned by GetEncapsulateDiskInfo as the affectedDiskList, affectedVolumeList, affectedRegionList, affectedDiskCount, affectedVolumeCount, and affectedRegionCount output parameters. If the affectedVolumeCount returned by GetEncapsulateDiskInfo is zero, the client MUST allocate at least 1 byte for affectedVolumeList before passing it to EncapsulateDisk method. If the affectedRegionCount returned by GetEncapsulateDiskInfo is zero, the client MUST allocate at least 1 byte for affectedRegionList before passing it to the EncapsulateDisk method.

EncapsulateDiskEx: Before invoking EncapsulateDiskEx, the client MUST invoke GetEncapsulateDiskInfoEx to retrieve the lists of disks that will be converted to dynamic, as well as the lists of volumes and regions on these disks. The GetEncapsulateDiskInfoEx method also returns the count of items in each of these lists. The client MUST pass these returned values as the affectedDiskList, affectedVolumeList, affectedRegionList, affectedDiskCount, affectedVolumeCount, and affectedRegionCount in the input parameters to the EncapsulateDiskEx method. These values are returned by GetEncapsulateDiskInfoEx as the affectedDiskList, affectedVolumeList, affectedRegionList, affectedDiskCount, affectedVolumeCount, and affectedRegionCount output parameters. If the affectedVolumeCount returned by GetEncapsulateDiskInfoEx is zero, the client MUST allocate at least 1 byte for affectedVolumeList before passing it to EncapsulateDiskEx method. If the affectedRegionCount returned by GetEncapsulateDiskInfoEx is zero, the client MUST allocate at least 1 byte for affectedRegionList before passing it to the EncapsulateDiskEx method.

EnumDiskRegions:  Before invoking EnumDiskRegions, the client MUST invoke EnumDisks to retrieve the disk ID. The client MUST pass this returned value as the diskId input parameter to the EnumDiskRegions method. The EnumDisks method returns this value as the DISK_INFO::id structure member.

EnumDiskRegionsEx: Before invoking EnumDiskRegionsEx, the client MUST invoke EnumDisksEx to retrieve the disk ID. The client MUST pass this returned value as the diskId input parameter to the EnumDiskRegionsEx method. The EnumDisksEx method returns this value as the DISK_INFO_EX::id structure member.

GetEncapsulateDiskInfo: Before invoking GetEncapsulateDiskInfo, the client MUST invoke EnumDisks to retrieve the disk ID and the disk's last known state. The client MUST pass these returned values as the DISK_SPEC structure's ID and lastKnownState members in the input parameter to the GetEncapsulateDiskInfo method. These values are returned by EnumDisks as DISK_INFO::id and DISK_INFO::lastKnownState.

GetEncapsulateDiskInfoEx:  Before invoking GetEncapsulateDiskInfoEx, the client MUST invoke EnumDisksEx to retrieve the disk ID and the disk's last known state. The client MUST pass these returned values as the DISK_SPEC structure's ID and DISK_INFO::lastKnownState members in the input parameter to the GetEncapsulateDiskInfoEx method. These values are returned by EnumDisksEx as DISK_INFO_EX::id and DISK_INFO_EX::lastKnownState.

GetMaxAdjustedFreeSpace:  The client MUST use the preceding call sequence description for EnumDiskRegions, except that in the final step it MUST use GetMaxAdjustedFreeSpace rather than EnumDiskRegions.

ImportDiskGroup:  Before invoking ImportDiskGroup, the client MUST invoke EnumDisks to retrieve the disk group's ID and the disk group's count of characters in the disk group ID. The client MUST pass these returned values as the dgid and cchDgid input parameters to the ImportDiskGroup method. The EnumDisks method returns these values as the DISK_INFO::dgid and DISK_INFO::cchDgid structure members.

InitializeDisk:  Before invoking InitializeDisk, the client MUST invoke EnumDisks to retrieve the disk ID and the disk's last known state. The client MUST pass these returned values as the diskId and diskLastKnownState input parameters to the InitializeDisk method. The EnumDisks method returns these values as the DISK_INFO::id and DISK_INFO::lastKnownState structure members.

InitializeDiskEx:  The client MUST use the following call sequence description for InitializeDiskStyle, except that in the final step the client MUST use InitializeDiskEx rather than InitializeDiskStyle.

InitializeDiskStyle: Prior to invoking InitializeDiskStyle, the client MUST invoke EnumDisksEx to retrieve the disk ID, the disk's last known state, and the partition style. The client MUST pass these returned values as the diskId, style, and diskLastKnownState input parameters to the InitializeDiskStyle method. The EnumDisksEx method returns these values as the DISK_INFO_EX::id, DISK_INFO_EX::lastKnownState, and DISK_INFO_EX::partitionStyle structure members.

QueryChangePartitionNumbers: This call SHOULD be made after calling the EncapsulateDisk method to determine whether the conversion of basic disks to dynamic disks has caused a boot partition number to change.<13>

ReAttachDisk:  The client MUST use the preceding call sequence description for WriteSignature, except that in the final step it MUST use ReAttachDisk rather than WriteSignature.

ReConnectDisk: Before invoking ReConnectDisk, the client MUST invoke EnumDisks to retrieve the disk ID. The client MUST pass this returned value as the diskId input parameter to the ReConnectDisk method. EnumDisks returns this value as the DISK_INFO::id structure member.

UninitializeDisk:  Before invoking UninitializeDisk, the client MUST invoke EnumDisks to retrieve the disk id and the disk's last known state. The client MUST pass these returned values as the diskId and diskLastKnownState input parameters to the UninitializeDisk method. The EnumDisks method returns these values as the DISK_INFO::id and DISK_INFO::lastKnownState structure members.

WriteSignature: Before invoking WriteSignature, the client MUST invoke EnumDisks to retrieve the disk ID and the disk's last known state. The client MUST pass these returned values as the diskId and diskLastKnownState input parameters to the WriteSignature method. The EnumDisks method returns these values as the DISK_INFO::id and DISK_INFO::lastKnownState structure members.