tencent cloud

Cloud File Storage

DocumentaçãoCloud File StorageOperation GuideAutomatically Mounting File Systems

Automatically Mounting File Systems

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2024-01-22 22:15:48

Overview

You can configure a Linux or Windows client to which a Cloud File Storage (CFS) file system is mounted, so that the file system can be automatically mounted after the client is restarted.

Directions

Automatically mounting an NFS file system on Linux

1. Connect to the CVM instance that needs to automatically mount the file system by logging in to the CVM console or performing remote login. Then, open the "/etc/fstab" file (make sure that your login account has the root privileges).
// Run the following command to open the "fstab" file
vi /etc/fstab
2. Enter "i" (insert) and add the following command to /etc/fstab. The mounting methods are as follows:
Mount the file system with NFS v4.0
<Mount target IP>:/ <target mount directory> nfs vers=4,minorversion=0,hard,timeo=600,retrans=2,_netdev,noresvport 0 0
Example: 10.10.19.12:/ /local/test nfs vers=4,minorversion=0,hard,timeo=600,retrans=2,_netdev,noresvport 0 0
Mount the file system with NFS v3.0
<Mount target IP>:/<fsid> <target mount directory> nfs vers=3,nolock,proto=tcp,hard,timeo=600,retrans=2,_netdev,noresvport 0 0
Example: 10.10.19.12:/djoajeo4 /local/test nfs vers=3,nolock,proto=tcp,hard,timeo=600,retrans=2,_netdev,noresvport 0 0
Mount the file system with Turbo
<Mount target IP>@tcp0:/<fsid>/cfs <target mount directory> lustre defaults,_netdev 0 0
Example: 172.16.0.7@tcp0:/01184207/cfs /root/turbo lustre defaults,_netdev 0 0

3. Press Esc and enter ":wq" to save the change. Restart the client, with the file system automatically mounted.
Note:
When the command for automatic mounting is added, but the shared file system is abnormal, Linux may not be started normally, because the automatic start command in fstab is not executed. To solve this problem, enter "Single User Mode" upon startup, delete the automatic mounting command in fstab, and then restart the server.

Automatically mounting a file system on Windows

When mounting a file system, select "Reconnect at login". For more information, see Using CFS File Systems on Windows Clients.



Ajuda e Suporte

Esta página foi útil?

comentários