Creating a File System
Function
This API is used to create a file system.
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Account token |
Content-Type |
Yes |
String |
MIME type |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
share |
Yes |
Share object |
Request body for creating a file system |
bss_param |
No |
BssInfo object |
Yearly/Monthly billing mode. This parameter is mandatory. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
availability_zone |
Yes |
String |
Code of the AZ where the file system resides |
description |
No |
String |
Description of the file system, which can contain 0 to 255 characters. This parameter is not supported by the current version. Minimum: 0 Maximum: 255 |
enterprise_project_id |
No |
String |
ID of the enterprise project to which the file system will be added |
metadata |
No |
Metadata object |
Metadata of the file system. The value consists of key and value pairs as a directory of strings. |
name |
Yes |
String |
Name of the SFS Turbo file system. The name contains 4 to 64 characters and must start with a letter. It can contain letters (case insensitive), digits, hyphens (-), and underscores (_), and cannot contain other special characters. Minimum: 4 Maximum: 64 |
security_group_id |
Yes |
String |
Security group ID of a tenant in a region |
share_proto |
Yes |
String |
File sharing protocol. The valid value is NFS. Network File System (NFS) is a distributed file system protocol that allows different computers and operating systems to share data over a network. |
share_type |
Yes |
String |
File system type. Valid values are STANDARD and PERFORMANCE. General: Use STANDARD for Standard and Standard Enhanced file systems, and PERFORMANCE for Performance and Performance Enhanced file systems. HPC: This field is not verified. Use either STANDARD or PERFORMANCE. HPC Cache: This field is not verified. Use either STANDARD or PERFORMANCE. |
size |
Yes |
Integer |
For a General (Standard or Performance) file system, the capacity ranges from 500 to 32768, in GB. For a General (Standard Enhanced or Performance Enhanced) file system, whose expand_type field under metadata is set to bandwidth, the capacity ranges from 10240 to 327680, in GiB. For an HPC file system, whose expand_type field under metadata is set to hpc, the capacity ranges from 3686 (or 1228) to 1048576, in GiB. For an HPC file system of the 20 MB/s/TiB storage class, the minimum capacity is 3686 GiB. For an HPC file system with another storage class, the minimum capacity is 1228 GiB. The capacity of an HPC file system must be a multiple of 1.2 TiB, and the value must be rounded down after being converted to GiB. For example, use 3686 GiB for a 3.6 TiB HPC file system, 4915 GiB for a 4.8 TiB file system, and 8601 GiB for a 8.4 TiB file system. For an HPC Cache file system, whose expand_type field under metadata is set to hpc_cache, the capacity ranges from 4096 to 1048576, in GiB. The minimum capacity varies depending on the bandwidth, and the expansion increment is 1 TiB. For example, if the bandwidth is 2 GB/s, the minimum capacity is 4 TiB, which is 4,096 GiB. If the bandwidth is 4 GB/s, the minimum capacity is 8 TiB, which is 8,192 GiB. If the bandwidth is 8 GB/s, the minimum capacity is 16 TiB, which is 16,384 GiB. Minimum: 500 Maximum: 1048576 |
subnet_id |
Yes |
String |
Subnet ID of a tenant in a VPC |
vpc_id |
Yes |
String |
VPC ID of a tenant in a region |
backup_id |
No |
String |
Backup ID. This parameter is mandatory if you create a file system from a backup. |
tags |
No |
Array of ResourceTag objects |
Tag list |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
crypt_key_id |
No |
String |
ID of a KMS professional key. This parameter is used if you want to create an encrypted file system. |
dedicated_flavor |
No |
String |
VM flavor used for creating a dedicated file system |
dedicated_storage_id |
No |
String |
ID of the dedicated distributed storage used when creating a dedicated file system |
expand_type |
No |
String |
Extension type. This parameter is mandatory when an enhanced, HPC, or HPC Cache file system is created. Use bandwidth if you are creating an enhanced (Standard - Enhanced or Performance - Enhanced) file system. Use hpc if you are creating an HPC file system. Use hpc_cache if you are creating an HPC Cache file system. |
hpc_bw |
No |
String |
File system bandwidth specifications. This parameter is mandatory when an HPC or HPC Cache file system is created. Use 20M, 40M, 125M, 250M, 500M, or 1000M if you are creating an HPC file system. Use 2G, 4G, 8G, 16G, 24G, 32G, or 48G if you are creating an HPC Cache file system. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
key |
Yes |
String |
Tag key. It can contain a maximum of 36 characters. It cannot be left blank and cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (*), left angle brackets (<), right angle brackets (>), backslashes (\), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). Minimum: 1 Maximum: 36 |
value |
Yes |
String |
Tag value. It can contain a maximum of 43 characters and can be left blank. It cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (*), left angle brackets (<), right angle brackets (>), backslashes (\), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_). Minimum: 0 Maximum: 43 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
is_auto_renew |
No |
Long |
Whether to enable automatic renewal Enumeration values:
|
period_num |
Yes |
Long |
Yearly/Monthly subscription terms Minimum: 1 Maximum: 11 |
period_type |
Yes |
Long |
Yearly/Monthly subscription type. The value can be 2 (monthly subscription) or 3 (yearly subscription). Enumeration values:
|
is_auto_pay |
No |
Long |
Whether to automatically pay for the order Enumeration values:
|
Response Parameters
Status code: 202
Parameter |
Type |
Description |
---|---|---|
id |
String |
ID of the created SFS Turbo file system |
name |
String |
Name of the created SFS Turbo file system |
status |
String |
Status of the SFS Turbo file system |
Example Requests
General: Creating a 500-GB SFS Turbo Standard file system, with file system name set to sfs-turbo-test, protocol NFS, AZ code cn-north-4a, security group ID 8c4ebbd0-6edf-4aae-8353-xxx, subnet ID b8884abe-f47b-4917-9f6c-xxx, and VPC ID d651ea2b-2b20-4c6d-8bbf-xxx
POST HTTPS://{endpoint}/v1/{project_id}/sfs-turbo/shares { "share" : { "name" : "sfs-turbo-test", "availability_zone" : "cn-north-4a", "security_group_id" : "8c4ebbd0-6edf-4aae-8353-xxx", "share_proto" : "NFS", "share_type" : "STANDARD", "size" : 500, "subnet_id" : "b8884abe-f47b-4917-9f6c-xxx", "vpc_id" : "d651ea2b-2b20-4c6d-8bbf-xxx" } }
General + dedicated scenario: Creating a 500-GB SFS Turbo Standard file system, with file system name set to sfs-turbo-dedicated-test, protocol NFS, AZ code cn-north-4a, dedicated storage pool ID 198f0704-xxx-4d85-xxx-c25caa4d3264, dedicated ECS flavor c6.xlarge.2, security group ID 8c4ebbd0-6edf-4aae-8353-xxx, subnet ID b8884abe-f47b-4917-9f6c-xxx, and VPC ID d651ea2b-2b20-4c6d-8bbf-xxx
POST HTTPS://{endpoint}/v1/{project_id}/sfs-turbo/shares { "share" : { "name" : "sfs-turbo-dedicated-test", "availability_zone" : "cn-north-4a", "security_group_id" : "8c4ebbd0-6edf-4aae-8353-xxx", "share_proto" : "NFS", "share_type" : "STANDARD", "size" : 500, "subnet_id" : "b8884abe-f47b-4917-9f6c-xxx", "vpc_id" : "d651ea2b-2b20-4c6d-8bbf-xxx", "metadata" : { "dedicated_flavor" : "c6.xlarge.2", "dedicated_storage_id" : "198f0704-xxx-4d85-xxx-c25caa4d3264" } } }
HPC: Creating a 3,686-GB SFS Turbo HPC file system, with file system name set to sfs-turbo-hpc-test, protocol NFS, file system specifications 125 MB/s/TiB, AZ code cn-north-4a, security group ID 8c4ebbd0-6edf-4aae-8353-xxx, subnet ID b8884abe-f47b-4917-9f6c-xxx, and VPC ID d651ea2b-2b20-4c6d-8bbf-xxx
POST HTTPS://{endpoint}/v1/{project_id}/sfs-turbo/shares { "share" : { "name" : "sfs-turbo-test", "availability_zone" : "cn-north-4a", "security_group_id" : "8c4ebbd0-6edf-4aae-8353-xxx", "share_proto" : "NFS", "share_type" : "STANDARD", "size" : 3686, "subnet_id" : "b8884abe-f47b-4917-9f6c-xxx", "vpc_id" : "d651ea2b-2b20-4c6d-8bbf-xxx", "metadata" : { "expand_type" : "hpc", "hpc_bw" : "125M" } } }
HPC Cache: Creating a 4,096-GB SFS Turbo HPC Cache file system, with file system name set to sfs-turbo-hpccache-test, protocol NFS, file system bandwidth 2 GB/s, AZ code cn-north-4a, security group ID 8c4ebbd0-6edf-4aae-8353-xxx, subnet ID b8884abe-f47b-4917-9f6c-xxx, and VPC ID d651ea2b-2b20-4c6d-8bbf-xxx
POST HTTPS://{endpoint}/v1/{project_id}/sfs-turbo/shares { "share" : { "name" : "sfs-turbo-test", "availability_zone" : "cn-north-4a", "security_group_id" : "8c4ebbd0-6edf-4aae-8353-xxx", "share_proto" : "NFS", "share_type" : "PERFORMANCE", "size" : 4096, "subnet_id" : "b8884abe-f47b-4917-9f6c-xxx", "vpc_id" : "d651ea2b-2b20-4c6d-8bbf-xxx", "metadata" : { "expand_type" : "hpc_cache", "hpc_bw" : "2G" } } }
Example Responses
Status code: 202
Response body for creating a file system
{ "id" : "708c017c-54b5-429a-a098-7692e23fa518", "name" : "sfs-turbo-test", "status" : "100" }
Status Codes
Status Code |
Description |
---|---|
202 |
Response body for creating a file system |
Error Codes
See Error 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