Host Storage System Unmount Vmfs Volume
Unmount the Vmfs volume.
An unmounted volume cannot be used for any filesystem operation requiring I/O. In contrast to removal, this operation does not destroy or alter partitions on which vmfs volumes reside. The mountState will be persisted across filesystem rescans and host reboots. See MountVmfsVolume.
unmountVmfsVolume is part of the Unmount / Detach workflow used when a device will be permanently removed.
Mounted Vmfs Volume
unmountVmfsVolume | ^ mountVmfsVolume
V |
Unmounted Vmfs Volume
Attached Scsi Device (honors I/O)
detachScsiLun | ^ attachScsiLun
V |
Detached Scsi Device (does not honor I/O)
It is safe to unprovision a Lun from the Storage array *only* after a Scsi device is detached.
The best practice for decommisioning a Lun would be to find out the set of subsystems that a Lun is being used for. Many of the systems are listed as exceptions in the function documentation.
One typical workflow could be:
- Find out if the device is used as a Vmfs Extent. (See VmfsVolume.Extent API)
- Unmount the Vmfs Volume.
- Find out if device is used by the Diagnostic system (See Diagnostic System API).
- Deactivate the diagnostic system, if it is being used.
- Find out if this device is used to back a VM's RDM (See VirtualMachine API).
- Remove this device from the VM.
- Detach the Scsi device.
- On success, it is safe to decommision the Lun at this point.
See also DetachScsiLun.
Required privileges: Host.Config.Storage
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId
, in this case HostStorageSystem/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.3.0 APIs.
{
"vmfsUuid": "string"
}
vmfsUuid
No Content
NotFound: if VMFS Uuid is not found on the host.
InvalidState: if
- The volume is already unmounted.
- The volume is inaccessible.
ResourceInUse: if
- There is any VM registered on this volume.
- 1 or more programs have I/O outstanding on this volume.
HostConfigFault: for all other configuration failures.
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}