3.2.4.4.1.12 IVolumeClient::FTDeleteVolume (Opnum 15)

The FTDeleteVolume method deletes the FT volume specified by volumeId on basic disks (rather than dynamic disks). This is a synchronous task.<48>

 HRESULT FTDeleteVolume(
   [in] LdmObjectId volumeId,
   [in] boolean force,
   [in] hyper volumeLastKnownState,
   [out] TASK_INFO* tinfo
 );

volumeId: Specifies the OID of the volume to delete.

force: Boolean value that indicates whether deletion of a partition will be forced. The call to delete will fail if the volume is locked by some other application and this flag is not set.

Value

Meaning

FALSE

0

Deletion will not be forced if the partition is in use.

TRUE

1

Deletion of the partition will be forced.

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] 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:

  • 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 tinfo is not NULL.

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

Otherwise, the server MUST process the message as follows:

  1. Attempt to delete the FT volume specified by volumeId, as specified by the force parameter.<49>

  2. Wait for the volume deletion 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.<50>

    TASK_INFO::clientID

    Not required.<51>

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

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

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 objects where the FT volume resided to account for the change in region allocation.

  2. Delete the disk region objects used by the FT volume.

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

  4. Modify the drive letter object associated with the FT volume to mark it as free.

  5. Delete the file system object associated with the FT volume.