Basic concepts of NFS ora NFS

Source: Internet
Author: User

Fedora NFS? What is this? Many friends may not know. It doesn't matter. Next we will introduce this system in detail. Fedora NFS (Network File System) Network File System is a long-History File Sharing Method in Unix/Linux. It is easy to install, use, and efficient, it is widely used.

The following operations are based on Fedora Core 1. If there is no description, the current user is the root user. The rpm package is the easiest and most convenient to install. Of course, you can also download the source code package to compile and install it yourself, in general, Linux has built-in Fedora NFS. http://nfs.sourceforge.net

To install NFS ora NFS, you must first install portmap. Now we have downloaded it:

Nfs-utils-1.0.6-1.rpm

Portmap-4.0-57.rpm

Fedora NFS installation:

# Rpm-ivh nfs-utils-1.0.6-1.rpm

# Rpm-ivh portmap-4.0-57.rpm

In general, both Fedora NFS and portmap are well-installed. Now we have Fedora NFS and portmap in our system and are in the service. Now we start nfs and portmap, remember to start the nfs service. You must first start portmap.

# Service portmap start

# Srvice nfs start

The main configuration file of NFS ora NFS is the/etc/exports file. The default file is empty, which is used to save your contribution and path information and permissions. for example, I need to share the/home/heiyeluren directory and the permission is read-only:

/Home/heiyeluren * (sync, ro)

Let's take a look at the following line of information:

/Home/heiyelure is the path to be shared

* Access the shared host, which can be an IP address, a subnet through a mask, or a domain name, * representing any machine

(Sync, ro). This is a permission and synchronization configuration. sync sets the NFS server to synchronize disk writes without causing data loss. ro is a read-only permission, rw is a readable and writable permission.

If we need to share the/var/share directory for all machines to read and write, the share/var/read directory only allows the read-only permission of 192.168.0.1, add the following two lines to the/etc/exports file:

/Var/share * (sync, rw)

/Var/read 192.168.0.1 (sync, ro)

You can restart nfs to read the configuration, or use the exportfs command to re-read the configuration file without restarting the NFS ora nfs service.

The exportfs command has three main functions:

Exportfs-rv reads the shared configuration file again, and takes effect immediately

Exportfs-when you stop NFS sharing on all hosts, the file content in the/etc/exports is not changed, but the sharing is stopped.

Exportfs-av displays NFS shared directory information on all current machines

If you want to view the contribution of a Fedora NFS server, you can use the showmount command. For example, we want to view all the Shared Paths of the machine 192.168.0.200:

Showmount-e 192.168.0.200

To view the shared connections between the local machine and those machines:

Showmount

To view the directories shared between the local machine and the specified machine:

Showmount-d 192.168.0.200

Now I want to load all the directories shared by remote NFS ora NFS. Run the mount command. For example, I want to load the/var/share directory on 192.168.0.200:

Mount 192.168.0.200:/var/share/mnt/nfs. If the permission permits, I can directly access the/mnt/nfs Directory, just like operating a local disk.

Now I want to see which of the following NFS folders shared with Fedora are loaded on the local machine, which can be mount or shomount-d. at last, we don't need to contribute to NFS ora nfs, so we can directly use the umount command to unmount the shared path: umount/mnt/NFS.

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.