Learn how to create, modify, and delete export directories in the CPFS console.
Prerequisites
-
A file system must be created. For more information, see Create a general-purpose CPFS file system.
-
A protocol service must be created. For more information, see Create a protocol service.
-
If you want to use a fileset for the export directory, ensure that the fileset is created. For more information, see Create a fileset.
-
Ensure that the vSwitch has sufficient available IP addresses. Creating an export directory consumes up to 32 IP addresses from the specified vSwitch.
Limitations
-
A protocol service can export up to 10 filesets or directories.
-
A protocol service can create exports to up to two VPCs.
Usage
-
After you create an export for a fileset or directory in a CPFS file system, ECS instances can mount it by using NFS to access the data.
-
We recommend using a fileset for an export. Compared with a regular directory, a fileset provides more features, such as file count limits and data flow.
-
When you create an export directory, you must specify a VPC and a vSwitch. Only ECS instances within that VPC can access CPFS through the protocol service.
-
The protocol service creates a security group in each VPC with a name in the format <cpfs-fsid>-<vpc-id>-nfs-sg.
-
The mount target for an export directory uses one of the following formats:
cpfs-xxxx.cn-region.cpfs.aliyuncs.com:/share/{fileset_path}orcpfs-xxxx.cn-region.cpfs.aliyuncs.com:/share/{directory_path}.
Create an export directory
-
Log on to the NAS console.
-
In the left-side navigation pane, choose File System > File System List.
-
In the top navigation bar, select a region.
-
On the File System List page, click the name of the file system.
-
On the details page of the file system, click Protocol Service.
-
In the Actions column of the target protocol service, click Export Directory to open the Export Directory panel.
-
Click Add Export Directory and configure the following parameters.
Parameter
Description
Export Agreement
Select the fileset or directory in the CPFS file system that you want to export. We recommend using a fileset, which offers more features, such as file count management and data flow.
NoteYou must specify a fileset or directory that exists in the CPFS file system.
An exported folder has the following format:
The path must be 1 to 1,024 characters in length.
Use UTF-8 encoding.
The path must start and end with a forward slash (/). To export the root directory, enter
/.
Permission Group
Only Default VPC permission group (all allowed) is supported.
VPC Network
Select the same VPC as your ECS instances. ECS instances in this VPC can access the CPFS file system through the protocol service.
vSwitch
Select the same vSwitch as your ECS instances. The protocol service uses this vSwitch to create an export in the specified VPC.
NoteUp to 32 IP addresses in the specified vSwitch are occupied to create a protocol service. Make sure that the specified vSwitch contains sufficient IP addresses.
-
Click OK.
View an export directory
You can view information about your export directories.
-
On the Protocol Service tab, find the target protocol service.
-
In the Actions column, click Export Directory to view the export directory details.
Modify an export directory
You can modify only the description of an export directory.
-
In the Export Directory panel, find the target export directory.
-
Click Modify and update the description of the export directory.
-
Click OK.
Delete an export directory
-
Deleting an export directory does not delete the directory's data. However, this action immediately interrupts all I/O operations to the directory through the protocol service. Proceed with caution.
-
It takes 2 to 5 minutes to delete an export directory.
-
In the Export Directory panel, find the target export directory.
-
Click Delete.
-
In the confirmation message that appears, click OK.