Introduction to NFS Network File System

Source: Internet
Author: User

In network protocols, one type of protocols manage file storage. This Protocol is called the NFS Network File System. We will introduce the specific functions and security and configuration of this protocol in this article.

Concept of NFS Network File System

Network File System (NFS) is a way to share files between machines on the network, just as files are located on the customer's local hard drive. red Hat Linux can be either an NFS server or an NFS client, which means that it can export the file system to another system or mount the file system imported from another machine.

NFS Installation

NFS is installed in RedHad by default. If NFS is not installed, manually install the following five rpm packages:

Setup-*: the shared NFS directory is defined in/etc/exports.

Initscripts-*: includes the BASIC script for loading the network directory during the boot process.

Nfs-utils-*: includes basic NFS commands and monitoring programs.

Portmap-*: supports secure connections to the nfs rpc service.

Quota-*: quota of shared directories on the network, including rpc. rquotad. This package is not required)

Configuration of the NFS Network File System server, operations performed on the host that needs to share the file system)

Edit the/etc/exports file to add a shared directory:

/Home/stb 192.168.1.235 (rw, sync, no_root_squash)

/Home/stb 192.168.1.170 (rw, sync, no_root_squash)

/Home/stb 192.168.1.31 (rw, sync, no_root_squash)

/Home/stb Is the shared directory;

192.168.1.235 is the IP address of the host client that needs to be mounted to the shared directory;

) Is opitons;

Rw: read/write permission;

Ro: Read-Only permission;

No_root_squash: if the user logging on to the NFS host is a ROOT user, the user has the ROOT permission. root_squash: if the user logging on to the NFS host is a root user, the user has the permission.

Sync: data is synchronized to the storage.

Async: The data is temporarily stored in the memory and not directly written to the hard disk.

NFS Network File System Startup

Service nfs start

Service nfs restart

Service nfs stop

Service nfs reload when the/etc/exports file is modified, you do not need to restart the service to execute this command.

Client mounting

Mount by using the mount command

Mount 192.168.1.162:/home/stb/mnt/stb

Mount-t nfs 192.168.1.162:/home/stb/mnt/stb-o nolock

// The client must have the/mnt/stb directory.

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.