3.2.4.4.1.37 IVolumeClient::ReConnectDisk (Opnum 41)

The ReConnectDisk method reactivates a failed dynamic disk, bringing the disk and the volumes residing on it online. This is an asynchronous task.

 HRESULT ReConnectDisk(
   [in] LdmObjectId diskId,
   [out] TASK_INFO* tinfo
 );

diskId: Specifies the OID of the disk to reactivate.

tinfo: Pointer to a TASK_INFO structure that the client can use to track the request's progress.

Return Values: The method MUST return 0 or a nonerror HRESULT on success, or an implementation-specific nonzero error code on failure (as specified in [MS-ERREF]; see also section 2.2.1 for HRESULT values predefined by the Disk Management Remote Protocol).

Upon receiving this message, the server MUST validate parameters:

  1. Verify that the dynamic disk specified by diskId is in the list of storage objects.

  2. Verify that tinfo is not NULL.

If parameter validation fails, the server MUST fail the operation immediately, returning an appropriate error as its response to the client.

Otherwise, the server MUST process the message as follows:

  1. Bring the failed dynamic disk specified by diskId online:

    • Bring any dynamic volumes that reside on the dynamic disk online if possible.

    • Start resynchronization for any mirrored and RAID-5 volumes that reside on the disk.

  2. Wait for the operation to either succeed or fail.

  3. Fill in the tinfo output parameter.

    TASK_INFO member

    Required for this operation

    TASK_INFO::id

    Required.

    TASK_INFO::storageId

    Not required.

    TASK_INFO::createTime

    Not required.<138>

    TASK_INFO::clientID

    Not required.<139>

    TASK_INFO::percentComplete

    Required for any task that returns REQ_IN_PROGRESS.

    TASK_INFO::status

    Required.

    TASK_INFO::type

    Required if PercentageComplete is being used.

    TASK_INFO::error

    Required.

    TASK_INFO::tflag

    Not required.<140>

  4. Return a response to the client that contains tinfo and the status of the operation.

  5. Send the task completion notification.

Note The server MAY decide not to wait for the disk reactivation operation to complete before returning the response to the client. This task is asynchronous and all rules for handling asynchronous tasks apply here.<141>

If the operation is successful, the server MUST make the following changes to the list of storage objects before returning the response:

  1. Modify the disk object to account for the change in status.

  2. Modify the region objects that reside on the disk to account for the change in status.

  3. Modify the volume objects that reside on the disk to account for the change in status.

  4. Modify drive letter objects to mark them as in use by the volumes brought online.

  5. Create file system objects for the volumes brought online.