55. Exportfs Command, NFS client problem

Source: Internet
Author: User

55. Exportfs Command, NFS client problem

First, Exportfs command

This command was installed with Nfs-utils. The NFS service cannot be restarted in any way, and if you want to reboot, uninstall the mounted directory on the other shared machine or use the EXPORTFS command.

Common options

-A all mount or uninstall all

-R Re-mount

-U Uninstalls a directory

-V Show shared directory

The following operations are on the service side

# Vim/etc/exports//Add

/TMP/192.168.93.2/24 (Rw,sync,no_root_squash)

# Exportfs-arv//Do not restart the NFS service, the configuration file will take effect

And look at the client.

# SHOWMOUNT-E 192.168.93.130

Export list for 192.168.93.130:

/tmp 192.168.93.129/24

/home/nfstestdir 192.168.93.2/24

The/tmp directory appears on the shared directory

# mount-t NFS 192.168.93.130:/tmp//newdir//This IP is service-side IP

# df-h

Now the client's Newdir directory is the server's TMP directory.

The file that is created now belongs to and belongs to the group root, because No_root_squash, does not limit root.


II. Client Issues with NFS

This issue occurs with NFS version 4

When a client mounts a shared directory, whether it is a root user or a normal user, a new file is created with the owner and group nobody

(i) Add-o nfsvers=3//Specify NFS version 3 for client mount

[Email protected] ~]# umount/newdir/

[Email protected] ~]# mount-t nfs-o nfsvers=3 192.168.93.130:/tmp//newdir

[Email protected] ~]# mount-t nfs-oremount,nfsvers=3 192.168.93.130:/tmp//newdir

(ii) Both the client and the server need

# vim/etc/idmapd.conf//

Change "#Domain = local.domain.edu" to "Domain = xxx.com" (here xxx.com, Custom), and then restart the RPCIDMAPD service, CENTOS7 without this service, restart Rpcbind.


55. Exportfs Command, NFS client problem

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.