Manage protocol services
This topic describes how to manage CPFS protocol services in the console, including creating, modifying, and deleting protocol services.
Prerequisites
-
A file system has been created. For more information, see Create a file system.
-
If you want to use a Fileset export directory, make sure that the Fileset has been created. For more information, see Create a fileset.
-
Creating a protocol service consumes IP addresses on the specified vSwitch (up to 32 IP addresses). Make sure that the target vSwitch has sufficient IP resources.
Usage limits
-
Protocol services are supported only by CPFS 2.3.0 and later.
-
Each CPFS file system can have only one protocol service.
Usage notes
-
Billing
-
General-purpose: free of charge.
-
Cache-based: fees are charged based on the maximum internal bandwidth configured per hour. For more information, see CPFS billing.
-
-
Protocol service types
Protocol services come in two types: General-purpose and Cache-accelerated. Cache-accelerated services store hot data in server memory. On a cache hit, bandwidth exceeds the CPFS file system limit and reaches the configured protocol service maximum.
-
General-purpose: provides NFS protocol access for CPFS and Directory-level mount point, so users do not need to configure POSIX clients to manage the cluster. This feature is free of charge.
-
Cache-based: provides server-side in-memory caching based on the LRU policy, in addition to the General-purpose features. When data is cached in memory, CPFS can deliver higher internal bandwidth. Cache-based protocol services come in two types: Cache Type 1 and Cache Type 2, which differ in internal bandwidth and memory cache size.
-
-
Export directory
-
After a Fileset or directory in a CPFS file system has a protocol export created, ECS instances can access the data by mounting via NFS.
-
A single protocol service can create protocol exports for up to two VPCs. A security group named
<cpfs-fsid>-<vpc-id>-nfs-sgis created in each VPC. -
Fileset exports are recommended because Filesets offer more powerful features than regular directories, such as file count limits and data flow. When creating an export, make sure that the Fileset or directory already exists.
-
When exporting a directory, you must specify a VPC and a vSwitch. Only ECS instances in that VPC can access CPFS through the protocol service. Creating an export directory consumes IP addresses on the specified vSwitch. Make sure that the vSwitch has sufficient IP resources.
-
Create a protocol service
-
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.
-
On the Protocol Service tab, click Create Protocol Service and configure the following parameters.
Parameter
Description
Protocol Service Configuration
Select the protocol service type. The default type is General-purpose.
NoteThe bandwidth of a General-purpose protocol service is the same as that of the CPFS file system. It does not provide data caching and incurs no charges.
Protocol Type
Only NFSv3 is supported.
VPC Network
The VPC used by the protocol cluster is the same as that of the CPFS file system and cannot be changed.
vSwitch
Select the vSwitch for the protocol cluster. The default vSwitch is the one used by the CPFS file system. You can also select another vSwitch in the same VPC.
NoteA single protocol service can consume up to 32 IP addresses on the vSwitch. Make sure that the vSwitch has sufficient IP resources.
Export Agreement
Specify the Fileset or directory in the CPFS file system to be exported through the protocol service. Fileset exports are recommended because they offer more powerful features, such as file count management and data flow.
Note-
The specified Fileset or directory to be exported must already exist.
-
When using a directory export, the directory format is as follows:
-
The length must be 1 to 1,024 characters.
-
Use UTF-8 encoding.
-
Must start and end with a forward slash (/). The root export directory is
/.
-
Export VPC
Select the VPC that is the same as the ECS instance. ECS instances in this VPC can access the CPFS file system through the protocol service.
Export vSwitch
Select the same vSwitch as the ECS instance. The protocol cluster uses this vSwitch to export the protocol service to the specified export VPC.
NoteA single protocol service can consume up to 32 IP addresses on the vSwitch. Make sure that the vSwitch has sufficient IP resources.
Permission Group
Only the default VPC permission group is supported.
-
-
After the configuration is complete, click OK.
Delete a protocol service
Deleting a protocol service will prevent ECS instances from mounting and accessing CPFS through the protocol service. Proceed with caution. It takes 5 to 10 minutes to delete a protocol service.
-
On the Protocol Service page, find the target protocol service.
-
In the Actions column, click Delete to delete the specified protocol service.
-
Click OK.
Modify a protocol service
You can modify the internal bandwidth and description of a protocol service. Modifying a protocol service takes 2 to 5 minutes.
-
On the Protocol Service page, find the target protocol service.
-
In the Actions column, click Modify to modify the configuration of the specified protocol service.
-
Click OK.
Change protocol service type
-
Switching from General-purpose to Cache-based
Important-
A General-purpose protocol service cannot be directly switched to a Cache-based one. You must first delete the General-purpose protocol service and then create a Cache-based one. The same applies in reverse. During the change, the service will be interrupted. Reserve a maintenance window before making the change.
-
The export directory needs to be regenerated.
-
Delete the General-purpose protocol service
On the Protocol Service page, click Delete in the Actions column of the target protocol service, and then click OK.
-
Create a Cache-based protocol service
For the specific steps, see Create a protocol service.
-
-
Switching between Cache-based types
-
On the Protocol Service page, find the target protocol service.
-
In the Actions column, click Modify to reselect the protocol service type.
-
Click OK.
-
View protocol services
You can view created protocol services and create export directories on a protocol service.
On the Protocol Service page, view the information of the specified protocol service.