Linux learning-server B mounts the folder of server A, and linux mounts

Source: Internet
Author: User

Linux learning-server B mounts the folder of server A, and linux mounts

Environment:CentOS 1, 7.0

1. In centos, server B mounts the folder of server.

Server A: 101,. 10.0.1
Server B: 101.10.12.1
Prerequisites: ensure that the server A and server B have/ifs/data/folders.
Objective: To mount the/ifs/data/folder of server A to your/ifs/data/folder on server B.

Step 1. Edit the/etc/exports file of server.
# vi/etc/exports

Add the following content to allow it to add trust to server B

/ifs/data 101.10.12.1 (rw,no_root_squash,no_all_squash,sync)

Enter the following command to make the configuration take effect

exportfs -r
Step2. mount the shared folder on server B

Mount the folder of server A on server B and enter the following command:
Mount the file by using the mount command. It takes effect only once and is invalid after restart. The command is as follows:

 mount -t nfs 101.10.0.1:/ifs/data /ifs/data

If you want to take effect after restart, You need to modify the/etc/fstab file of server B.

vi /etc/fstab

Add the following content

101.10.0.1:/ifs/data   /ifs/data  nfs   defaults    0 0

After saving and exiting wq, you can run the mount-a command to check whether the mount is successful.

Refer to the blog post: torque cluster configuration under CentOS (2) Configure NFS in the cluster for file sharing

The Linux Learning Series in this topic will be updated continuously. Welcome to this blog: Dream_Angel_z

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.