3.2.4.4.1.43 IVolumeClient::RestartVolume (Opnum 52)
The RestartVolume method attempts to bring a dynamic volume back online. This is a synchronous task.
-
HRESULT RestartVolume( [in] LdmObjectId volumeId, [in] hyper volumeLastKnownState, [out] TASK_INFO* tinfo );
volumeId: Specifies the OID of the volume to restart.
volumeLastKnownState: Volume's last known modification sequence number.
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:
Verify that the dynamic volume specified by volumeId is in the list of storage objects, and check whether volumeLastKnownState matches the field LastKnownState of the object.
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:
Bring the volume specified by volumeId online.
Wait for the operation to either succeed or fail.
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.<159>
TASK_INFO::clientID
Not required.<160>
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.<161>
Return a response to the client that contains tinfo and the status of the operation.<162>
Send the task completion notification.
If the operation is successful the server MUST make the following changes to the list of storage objects before returning the response:
Modify the dynamic volume object to account for the change in status.
Modify the drive letter object to mark it as in use by the volume (if the volume has a drive letter).
Create a file system object for the volume (if the volume is formatted with a file system).