3.4.5.2.19.8 IVdsPack::RemoveMissingDisk (Opnum 11)

The IVdsPack::RemoveMissingDisk method removes the specified missing disk from a disk pack. This method only applies to dynamic disks. At least one dynamic disk needs to be present to enumerate missing disks.

 HRESULT RemoveMissingDisk(
   [in] VDS_OBJECT_ID DiskId
 );

DiskId: The VDS object ID of the disk object to remove.

Return Values: The method MUST return zero or a non-error HRESULT (as specified in [MS-ERREF]) to indicate success, or return an implementation-specific nonzero error code to indicate failure. For the HRESULT values predefined by the Virtual Disk Service Remote Protocol, see section 2.2.3.

When the server receives this message, it MUST validate the parameters:

  • Verify that DiskId belongs to a disk object in the list of storage management objects that correspond to a disk that is missing. The missing disk has its pack pointer set to this pack object.

  • If this method is called against a disk which contains data volume extents, then this method MUST return VDS_E_DISK_NOT_EMPTY.

For each callback object that is registered in the list of callback objects, call the callback object's IVdsAdviseSink::OnNotify (section 3.3.4.3.1) method by using a VDS_NOTIFICATION (section 2.2.1.3.9) structure that has the following attributes:

The server MUST remove the disk having a VDS_OBJECT_ID that is specified by DiskId to this pack, remove the corresponding disk object from the list of storage management objects, and return an HRESULT indicating failure or success.<85>