NFS network file system configuration and management in Linux

Source: Internet
Author: User
Article title: setting and managing NFS network file systems in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
   Introduction:
NFS was initially developed by Sun Microsytem in 1984. its primary function is to allow UNIX computers on the network to share directories and files. We can mount the file system shared by the remote end to the local end, and then we can easily use the remote end file, however, operations are similar to local operations and won't be very different. NFS has many advantages, such as centralized file management and disk space saving.
  
   Install NFS:
Most Linux Distribution will install NFS. in OpenLinux, NFS is composed of two RPM suites: nfs and nfs-server, nfs mainly includes the programs required by some clients, while nfs-server is mainly a daemon program of NFS Server.
  
   Set NFS:
Configuration File:/etc/exports
File format: file system [host] [option]
Example:
  
/Charlie (ro) john (rw, no_root_squash)
/Tmp pc * .col.com.tw (rw) 172.29.0.0/255.255.255.0.0 (ro)
/Pub (ro)
/Pub/private (noaccess)
  
   Option description:
Ro read only
Rw read write
No_root_squash: Trust the client, corresponding to UID
Noaccess client is not available
  
Start and end NFS services:
  
After changing the configuration file, remember to restart the NFS service. The start and stop methods are as follows:
  
#/Etc/rc. d/init. d/nfs [start | stop | restart | reload]
  
Start NFS service
Stop NFS service
Restart stop and restart NFS service
Reload the NFS setting value
  
   The client uses NFS:
1. View NFS services:
  
The client can use the showmount command to check which NFS services are provided by the Server.
  
# Showmount-e to see which directories are shared
# Showmount-a: All the mount entries are displayed.
  
2. connect to the NFS Server:
  
To use resources on the NFS server, use the mount command.
# Mount-t nfs hostname:/shared_dir
  
Example:
# Mount-t nfs 192.168.1.100:/tmp/mnt/nfs
  
3. automatically connect to NFS upon startup:
  
If you want to automatically mount NSF when starting the system, you need to edit the/etc/fstab file.
Example:
192.168.1.100:/tmp/mnt/nfs ULTS 0 0
Related Article

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.