3.2.4.4.1.17 IVolumeClient::FTReplaceParityStripePartition (Opnum 20)

The FTReplaceParityStripePartition method repairs an FT RAID-5 set on basic disks by replacing the failed member of the set with another partition.<71>

 HRESULT FTReplaceParityStripePartition(
   [in] LdmObjectId volumeId,
   [in] hyper volumeLastKnownState,
   [in] LdmObjectId oldMemberId,
   [in] hyper oldMemberLastKnownState,
   [in] LdmObjectId newRegionId,
   [in] hyper newRegionLastKnownState,
   [in] DWORD flags,
   [out] TASK_INFO* tinfo
 );

volumeId: Specifies the OID of the FT RAID-5 set to modify.

volumeLastKnownState: Last known modification sequence number of the FT RAID-5 set.

oldMemberId: This member MUST be set to 0 and ignored by the server.

oldMemberLastKnownState: This member MUST be set to 0 and ignored by the server.

newRegionId: Specifies the OID of the replacement partition.

newRegionLastKnownState: Last known modification sequence number of the replacement partition.

flags: Bitmap of flags for the replacement operation. The value of this field is a logical 'OR' of zero or more of the following applicable flags.

Value

Meaning

FTREPLACE_FORCE

0x00000001

Do not fail the operation if the replacement partition has been changed since newRegionLastKnownState.

FTREPLACE_DELETE_ON_FAIL

0x00000002

Delete the replacement partition if the operation fails.

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] section 2.1; 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 FT volume specified by volumeId is in the list of storage objects, and check whether volumeLastKnownState matches the LastKnownState field of the object. Verify that the FT volume is an FT RAID-5 set.

  2. Verify that the partition specified by newRegionId is in the list of storage objects, and check whether newRegionLastKnownState matches the LastKnownState field of the object:

    • Ignore newRegionLastKnownState if the flag FTREPLACE_FORCE is set in flags.

  3. 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. Delete the failed member from the FT volume specified by volumeId.

  2. Attempt to add the replacement partition specified by newRegionId to the FT volume.

  3. Wait for the replacement to either succeed or fail.

    • If the replacement failed and the flag FTREPLACE_DELETE_ON_FAIL is set in flags, delete the replacement partition.

  4. Fill in the tinfo output parameter. This is a synchronous task.

    TASK_INFO member

    Required for this operation

    TASK_INFO::id

    Required.

    TASK_INFO::storageId

    Not required.

    TASK_INFO::createTime

    Not required.<72>

    TASK_INFO::clientID

    Not required.<73>

    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.<74>

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

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

  1. Modify the FT volume object to account for the change in the list of members.

  2. Modify the disk object of the deleted member to account for the change in region allocation.

  3. Delete the disk region object that corresponds to the deleted member.

If the addition of the replacement partition is successful, the server MUST make the following change to the list of storage objects before returning the response:

  • Modify the disk region object that corresponds to the replacement partition to account for transformation from the partition to a member of the FT volume.

If the addition of the replacement partition fails and the FTREPLACE_DELETE_ON_FAIL flag is set, the server MUST make the following changes to the list of storage objects before returning the response:

  1. Modify the disk object of the deleted replacement partition to account for the change in region allocation.

  2. Delete the disk region object that corresponds to the deleted replacement partition.

  3. Create a new free region object or modify an adjacent free region object to account for the free space created by the deletion.