Test environment: [root @ tpsystem] # uname-aLinuxtp3.3.4-5.fc17.x86_64 #1SMPMonMay717: 29: Configure/Linux nfsexports: vim/etc/exports/run/media/k/Elements/unzip/ora11gR2forL
Test environment:
[Root @ tp system] # uname-
Linux tp 3.3.4-5. fc17.x86 _ 64 #1 SMP Mon May 7 17:29:34 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Configure nfs exports:
Vim/etc/exports
/Run/media/k/Elements/unzip/ora11gR2forLinux64 192.168.221.0/24 (rw, sync, no_root_squash)
Activate exports and use exportfs to refresh or restart the service:
1. exportfs Refresh:
[Root @ tp system] # exportfs-avf
Exporting 192.168.221.0/24:/run/media/k/Elements/unzip/ora11gR2forLinux64
2. Restart the service:
[Root @ tp system] # systemctl restart nfs-server.service
View the nfs folder shared by the local machine:
[Root @ tp system] # showmount-e
Export list for tp:
/Run/media/k/Elements/unzip/ora11gR2forLinux64 192.168.221.0/24
Mount the nfs folder on the new server:
[Root @ rac1 ~] # Mount-t nfs 192.168.221.1:/run/media/k/Elements/unzip/ora11gR2forLinux64/mnt
[Root @ rac1 ~] # Df-h
File System capacity used available % mount point
/Dev/mapper/VolGroup00-LogVol00
188 GB 2.7G 176G 2%/
/Dev/sda1 99 M 23 M 71 M 25%/boot
Tmpfs 2.0G 0 2.0G 0%/dev/shm
/Dev/sr0 3.6G 3.6G 0 100%/media
192.168.221.1:/run/media/k/Elements/unzip/ora11gR2forLinux64
932G 806G 127G 87%/mnt
[Root @ rac1 ~] #
Note:
1. Check that the configuration is correct and you still cannot find nfs sharing. You can temporarily disable the firewall (systemctl stop iptables. service) and SELINUX (setenforce 0) and try again.
2. nfs sharing can be found on the client and mounted successfully. However, you do not have the permission to list the Mounted Directories. You must addNo_root_squashTo the nfs exports option, so that the client can view the nfs shared folder with the root permission.
Man exports
Root_squash
Map requests from uid/gid 0 to the anonymous uid/gid. Note that
This does not apply to any other uids or gids that might be
Equally sensitive, such as user bin or group staff.
No_root_squash
Turn off root squashing. This option is mainly useful for disk ‐
Less clients.