NFS Management
In addition to the local drive, users can use the NFS to mount the shared directory of a storage server to expand the storage space.
- The NFS protocol does not have a user authentication mechanism, and data is transmitted in plaintext on the network. Both pose security risks. You are advised to use the NFS protocol only in trusted security zones, and do not transmit sensitive data. The V4 protocol is used by default.
- The local path of the shared directory mounted to the NFS synchronizes the permission, owner, and owner group of the shared directory on the NFS server. Before using the shared directory, ensure that the NFS storage server is secure and the directory and file permissions meet service security requirements.
- If a file or executable file with a special permission bit (setuid or setgid) exists in the shared directory mounted to the NFS, the special permission bit of the file does not take effect and the executable file cannot be executed in the mounted local path.
- If the web page displays a message indicating that the NFS mounting is abnormal for a long time, the possible cause is that the NFS server is abnormal or shut down. As a result, the network between the edge device and the NFS server is disconnected. You are advised to unmount the abnormal NFS.
Creating a Shared Directory
- Choose Management > Storage Management > NFS Management.Figure 1 NFS Management
- Click Create Shared Directory. The Create Shared Directory dialog box is displayed.Figure 2 Creating a shared directory
- Configure the parameters as prompted. Table 1 describes the parameters.
Table 1 Parameters for creating a shared directory Parameter
Description
Example Value
Server IP Address
Specifies the IP address of the NFS server.
The value is an IPv4 address.
192.168.1.192
Shared Directory
Specifies the shared directory on the NFS server.
The value can contain a maximum of 256 characters, including uppercase and lowercase letters (a to z and A to Z), digits (0 to 9), and other characters (/_-). The value must start with a slash (/).
/home/nfssharedir
Local Mount Path
Specifies the mount directory of an edge device.
The value can contain a maximum of 256 characters, including uppercase and lowercase letters (a to z and A to Z), digits (0 to 9), and other characters (/_-). The value must start with a slash (/).
NOTE:The mount path can only be /opt/mount.
/opt/mount
NFS Protocol Version
Specifies the version of the NFS protocol.
Currently, only NFS4 is supported.
NFS4
- Click Confirm.
The directory information includes the server IP address, shared directory, mount directory, total capacity, remaining capacity, health status, and operations.
- The Health Status column displays the working status of the shared directory.
- The default permission on the mount point directory is 755. You need to review the permission of files in the directory and ensure that the permission is appropriate. You can log in to the IES, enter the develop mode, and run the chmod command to modify the permission.
Unmounting a Directory
If you unmount a directory, containerized applications mounted to this partition will be unavailable. Exercise caution when performing this operation. If you want to unmount a shared directory, perform this operation when no containerized application uses this shared directory.
- Choose Management > Storage Configuration > NFS Management.Figure 3 NFS Management
- Locate the directory to be unmounted and click Unmount in the Operation column. A confirmation dialog box is displayed.Figure 4 Unmounting a directory
- Click Confirm.