Creates a fileset.
Operation description
-
CPFS usage notes
- Only CPFS V2.2.0 and later support fileset creation. You can view the version information on the file system details page in the console.
- A maximum of 10 filesets can be created for a CPFS file system.
- The parent directory must be an existing directory.
- The maximum depth supported by a fileset path is eight levels. The depth of the root directory / is 0 levels. For example, the fileset path /test/aaa/ccc/ has three levels.
- Nested filesets are not supported. If a fileset is specified as a parent directory, its subdirectory cannot be a fileset.
- A fileset supports a maximum of one million files. If the number of files exceeds the upper limit, the
no spaceerror message is returned when you add new files.
-
CPFS for Lingjun usage notes
- Only CPFS for Lingjun V2.7.0 and later support this operation. You can view the version information on the file system details page in the console.
- A maximum of 500 filesets can be created for a CPFS file system.
- The fileset path must be a new path and cannot be an existing path. Fileset paths cannot be renamed and cannot be symbolic links.
- The maximum depth supported by a fileset path is eight levels. The depth of the root directory / is 0 levels. For example, the fileset path /test/aaa/ccc/ has three levels.
- If the fileset path is a multi-level path, the parent directory must be an existing directory.
- Nested filesets are not supported. If a fileset is specified as a parent directory, its subdirectory cannot be a fileset. A fileset path supports only one quota.
- The minimum capacity quota of a fileset is 10 GiB. The scaling step size is 1 GiB.
- A fileset supports a minimum of 10,000 files or directories and a maximum of 10 billion files or directories. The scaling step size is 1.
- When you modify a directory quota, you must set the quota capacity or the number of files to be greater than the capacity or file quantity that has been used.
- The quota statistics have a 15-minute latency. The actual usage takes effect after 15 minutes.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| nas:CreateFileset | create | *Fileset acs:nas:{#regionId}:{#accountId}:filesystem/{#filesystemId} |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| FileSystemId | string | Yes | The ID of the file system.
| bmcpfs-290w65p03ok64ya**** |
| FileSystemPath | string | Yes | The absolute path of the fileset.
| /test/ |
| DryRun | boolean | No | Specifies whether to perform a dry run. During the dry run, the system checks whether the request parameters are valid and whether the requested resources are available. During the dry run, no fileset is created and no fee is incurred. Valid value:
| false |
| DeletionProtection | boolean | No | Specifies whether to enable deletion protection to allow you to release the fileset by using the console or by calling the DeleteFileset operation.
Note
This parameter can protect filesets only against manual releases, but not against automatic releases.
| false |
| Description | string | No | The description of the fileset.
| test |
| ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence. Note
If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
| 123e4567-e89b-12d3-a456-42665544**** |
| Quota | object | No | The quota information. Note
Only CPFS for Lingjun V2.7.0 and later support this parameter.
| |
| FileCountLimit | long | No | The file quantity quota. Valid values:
| 10000 |
| SizeLimit | long | No | The total quota capacity limit. Unit: bytes. Valid values:
| 10737418240 |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "98696EF0-1607-4E9D-B01D-F20930B6****",
"FsetId": "fset-1902718ea0ae****"
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | IllegalCharacters | The parameter contains illegal characters. | The parameter contains illegal characters. |
| 400 | MissingFileSystemId | FileSystemId is mandatory for this action. | - |
| 400 | MissingFileSystemPath | FileSystemPath is mandatory for this action. | - |
| 400 | InvalidFilesystemType.NotSupport | This Api does not support this fileSystem type. | The current interface does not support this type of file system. |
| 400 | InvalidFilesystemVersion.NotSupport | This Api does not support this fileSystem version. | This Api does not support this fileSystem version. |
| 400 | InvalidRequest | The request is invalid. | Invalid request |
| 400 | Quota.Invalid.Limit | Quota limit is invalid. | Invalid quota. |
| 400 | Resource.Exceed.Limit | Resource exceed limit. | The number of resources exceeds the limit. |
| 400 | Resource.Check.Fail | Resource check failed. | - |
| 400 | Fileset.Path.Duplicate | Fileset path is duplicate. | Fileset path is duplicate. |
| 400 | Fileset.Path.Nested | Fileset path is nested. | Fileset path is nested. |
| 400 | Fileset.Path.NotExist | Fileset.Path.Not.Exist. | Fileset parent directory path does not exist. |
| 400 | Fileset.Path.Exist | Fileset already exist. | Fileset path already exists. |
| 403 | OperationDenied.AlreadyExists | The operation is denied due to IdirName already exists in parent path. | - |
| 403 | OperationDenied.TooManyFilesets | The operation is denied due to too many fileset in filesystem. | - |
| 403 | OperationDenied.TooManyDepths | The operation is denied due to Fileset path too deep. | - |
| 403 | OperationDenied.NestedDir | The operation is denied due to nested directory. | - |
| 403 | OperationDenied.DependencyViolation | The operation is denied due to dependancy violation. | - |
| 403 | OperationDenied.FilesetNotSupported | The operation is not supported. | - |
| 404 | InvalidFileSystem.NotFound | The specified file system does not exist. | The specified file system does not exist. |
| 404 | InvalidFileSystemPath.ParentNotFound | The specified parent path does not exist. | - |
| 404 | InvalidFileSystemPath.NotDirectory | The specified idir parent path is not directory. | - |
| 404 | InvalidFileSystemPath.InvalidCharacters | The specified fileset path contains invalid characters. | - |
| 404 | InvalidFilesetPath.InvalidParameter | Fileset path is invalid. | - |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2024-10-24 | The Error code has changed. The request parameters of the API has changed | View Change Details |
| 2024-05-31 | The Error code has changed. The request parameters of the API has changed | View Change Details |
| 2023-04-24 | The Error code has changed | View Change Details |
