Re: NFS setup -

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 18, 2018 at 8:03 PM, Gordon Messmer
<gordon.messmer@xxxxxxxxx> wrote:
> On 04/18/2018 08:43 AM, Bob Goodwin wrote:
>>
>> # mount 192.168.1.86:/home/exports/home /mnt/test
>> mount.nfs: access denied by server while mounting
>> 192.168.1.86:/home/exports/home
>>
>> What am I missing and/or doing wrong?
>
> If you are using NFSv4, remember that the first export is the *root*.
> That is, clients refer to filesystems relative to that export. If your
> /etc/exports looks like this:
>
> /home/export 192.168.1.0/255.255.255.0(ro)
> /home/export/home 192.168.1.0/255.255.255.0(rw)
>
> ...then clients would mount "server:/home" not "server:/home/export/home".


If you don't set "fsid=0" for one of your shares, "/" is the root fsid.




## EXPORT "/SRV/NFS" WITHOUT "FSID=0" AND MOUNT "/SRV/NFS" ##


root@nfs ~ # cat /etc/exports
/srv/nfs *(rw,no_root_squash)


root@nfs ~ # exportfs
/srv/nfs <world>


root@nfs ~ # mount localhost:/srv/nfs /mnt


root@nfs ~ # cat /proc/fs/nfs/exports
# Version 1.1
# Path Client(Flags) # IPs
/srv/nfs *(rw,no_root_squash,sync,wdelay,no_subtree_check,...)
/srv *(ro,no_root_squash,sync,no_wdelay,no_subtree_check,v4root,...)
/ *(ro,no_root_squash,sync,no_wdelay,no_subtree_check,v4root,fsid=0,...)




## EXPORT "/SRV/NFS" WITHOUT "FSID=0" AND MOUNT "/" ##


root@nfs ~ # umount /mnt


root@nfs ~ # mount localhost:/ /mnt


root@nfs ~ # cat /proc/fs/nfs/exports
# Version 1.1
# Path Client(Flags) # IPs
/srv/nfs *(rw,no_root_squash,sync,wdelay,no_subtree_check,...)
/srv *(ro,no_root_squash,sync,no_wdelay,no_subtree_check,v4root,...)
/ *(ro,no_root_squash,sync,no_wdelay,no_subtree_check,v4root,fsid=0,...)




## EXPORT "/SRV/NFS" WITH "FSID=0" AND MOUNT "/" ##


root@sophia ~ # umount /mnt


root@sophia ~ # vi /etc/exports
root@sophia ~ # cat /etc/exports
/srv/nfs *(rw,no_root_squash,fsid=0)


root@sophia ~ # exportfs -ra


root@sophia ~ # mount localhost:/srv/nfs /mnt
mount.nfs: Cannot assign requested address


root@sophia ~ # mount localhost:/ /mnt


root@sophia ~ # cat /proc/fs/nfs/exports
# Version 1.1
# Path Client(Flags) # IPs
/srv/nfs *(rw,no_root_squash,sync,wdelay,no_subtree_check,fsid=0,...)
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux