VPC provisions an isolated virtual network environment defined and managed by yourself, improving the security of cloud resources and simplifying network deployment. When using SFS, a file system and the associated ECSs need to belong to the same VPC for file sharing.
In addition, VPC can use network access control lists (ACLs) to implement access control. A network ACL is an access control policy system for one or more subnets. Based on inbound and outbound rules, it determines whether data packets are allowed in or out of any associated subnet. In the VPC list of a file system, each time an authorization address is added and the corresponding permissions are set, a network ACL is created.
For more information about VPC, see the Virtual Private Cloud User Guide.
Multiple VPCs can be configured for an SFS Capacity-Oriented file system so that ECSs belonging to different VPCs can share the same file system, as long as the VPCs that the ECSs belong to are added to the VPC list of the file system or the ECSs are added to the authorized addresses of the VPCs.
This section describes how to configure multi-VPC access for an SFS Capacity-Oriented file system.
You can select multiple VPCs from the drop-down list.
Parameter |
Description |
---|---|
Name |
Name of the added VPC, for example, vpc-01 |
Authorized Addresses/Segments |
Number of added IP addresses or IP address segments |
Operation |
The value can be Add or Delete. Add: Adds an authorized VPC. This operation configures the IP address, read/write permission, user permission, user root permission, and priority. For details, see Table 2. Delete: Deletes this VPC. |
Parameter |
Description |
---|---|
Authorized Address/Segment |
|
Read-Write Permission |
The value can be Read-write or Read-only. The default value is Read-write. |
User Permission |
Specifies whether to retain the user identifier (UID) and group identifier (GID) of the shared directory. The default value is no_all_squash.
|
User Root Permission |
Specifies whether to allow the root permission of the client. The default value is no_root_squash.
|
Priority |
The value must be an integer ranging from 0 to 100. 0 indicates the highest priority, and 100 indicates the lowest priority. In the same VPC, the permission of the IP address or address segment with the highest priority is preferentially used. If some IP addresses or address segments are of the same priority, the permission of the most recently added or modified one is used. For example, if the IP address for mounting is 10.1.1.32 and both 10.1.1.32 (read/write) with priority 100 and 10.1.1.0/24 (read-only) with priority 50 meet the requirements, the permission of 10.1.1.0/24 (read-only) with priority 50 is used. That is, if there is no other authorized priority, the permission of all IP addresses in the 10.1.1.0/24 segment, including 10.1.1.32, is read-only. |
For an ECS in VPC A, its IP address can be added to the authorized IP address list of VPC B, but the file system of VPC B cannot be mounted to this ECS. The VPC used by the ECS and the file system must be the same.
After another VPC is configured for the file system, if the file system can be mounted to ECSs in the VPC and the ECSs can access the file system, the configuration is successful.
A user creates an SFS Capacity-Oriented file system A in VPC-B. The network segment is 10.0.0.0/16. The user has an ECS D in VPC-C, using the private IP address 192.168.10.11 in network segment 192.168.10.0/24. If the user wants to mount file system A to ECS D and allow the file system to be read and written, the user needs to add VPC-C to file system A's VPC list, add ECS D's private IP address or address segment to the authorized addresses of VPC-C, and then set Read-Write Permission to Read-write.
The user purchases an ECS F that uses the private IP address 192.168.10.22 in the VPC-C network segment 192.168.10.0/24. If the user wants ECS F to have only the read permission for file system A and its read priority to be lower than that of ECS D, the user needs to add ECS F's private IP address to VPC-C's authorized addresses, set Read-Write Permission to Read-only, and set Priority to an integer between 0 and 100 and greater than the priority set for ECS D.