Importing a Storage Device
Function
This API is used to import an existing storage device to a specified namespace.
Currently, EVS, SFS, SFS Turbo, and OBS volumes can be imported to CCI. The spec.storageClassName parameter specifies the volume type. It has the following values:
- sata: common I/O EVS volume
- sas: high I/O EVS volume
- ssd: ultra-high I/O EVS volume
- nfs-rw: Network File System (NFS) volume
- efs-performance: high-performance SFS Turbo volume
- efs-standard: standard SFS volume
- obs: OBS volume
- The reclaim policy is set to DELETE. To be specific, the storage is deleted immediately after the PVC is deleted. If you want to retain the storage, you can use Unbinding a Storage Device.
- OBS provides object buckets and Parallel File Systems (PFSs). PFS is a high-performance file system provided by OBS, with access latency in milliseconds. PFS can support a bandwidth performance up to TB/s and supports millions of IOPS, outperforming OBS buckets. Therefore, you are advised to use OBS parallel file systems instead of OBS buckets (when mounting these objects) in the production environment.
URI
POST /api/v1/namespaces/{namespace}/extended-persistentvolumeclaims
Parameter |
Type |
Description |
---|---|---|
namespace |
String |
Namespace to which the storage is to be imported. |
Request
Request parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
apiVersion |
Yes |
String |
apiVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. |
kind |
Yes |
String |
kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. |
metadata |
Yes |
Object |
Standard object's metadata. For details, see Table 10. For details about the annotations field, see Table 3. |
spec |
Yes |
Object |
Spec defines the desired characteristics of a volume requested by a pod author. For details, see Table 177. |
status |
No |
Object |
Status represents the current information/status of a persistent volume claim. Read-only. For details, see Table 178. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
fsType |
Yes |
String |
Name of the file system. The value can be:
|
volumeID |
Yes |
String |
Volume ID. |
deviceMountPath |
No |
String |
Shared path.
NOTE:
Set this parameter only for SFS and SFS Turbo volumes. |
Example request
{ "apiVersion": "v1", "kind": "PersistentVolumeClaim", "metadata": { "annotations": { "fsType": "nfs", "volumeID": "378dfa73-3ae4-4179-81c0-67699976b505", "deviceMountPath": "sfs-nas01.cn-north-4b.myhuaweicloud.com:/share-84b38e4d" }, "name": "cci-sfs-jxre8q80-ylpd", "namespace": "test-namespace" }, "spec": { "resources": { "requests": { "storage": "10Gi" } }, "storageClassName": "nfs-rw" } }
Response
Response parameters
Parameter |
Type |
Description |
---|---|---|
PersistentVolumeClaim |
Object |
For details, see Table 175. |
Example response
{ "metadata": { "name": "pvc-import-evs", "namespace": "test-namespace", "selfLink": "/api/v1/namespaces/test-namespace/persistentvolumeclaims/pvc-import-evs", "uid": "17646a17-a471-11e9-be8a-b44326d0c915", "resourceVersion": "65016560", "creationTimestamp": "2019-07-12T06:48:44Z", "annotations": { "kubernetes.io/volumeId": "378dfa73-3ae4-4179-81c0-67699976b505" } }, "spec": { "accessModes": [ "ReadWriteMany" ], "resources": { "requests": { "storage": "10" } }, "storageClassName": "sata" }, "status": { "phase": "Pending" } }
Status Code
Status Code |
Description |
---|---|
200 |
Export volume success. |
For more status codes, see Status Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot