NFS mount problems



  • Hi,

    I am trying to mount a nfs to my pfsense for a kickstart linux server.
    i enabled nfs client in rc.conf, but when i tray mount the nfs export to pfsens i get the flowing error.

    [2.0-RELEASE][admin@home]/root(2): mount 172.16.10.3:/volume1/web/ /mnt/
    [tcp] 172.16.10.3:/volume1/web: Permission denied

    dose anyone know what the problem can be?

    Thanks.

    Br,
    Vukomir



  • It is most likely your export options.



  • Hi,

    i mounted the export on a linux system with no problems, only on pfsense i am heaving problems mounting it.

    Br,
    Vukomir



  • try creating a subfolder in mnt to make sure mnt is ready for a mount. Are you running embedded pfsense? what are the export options on the server? I just tested a mount and it worked without any problems.



  • [2.0-RELEASE][admin@gw.home.vukomir.info]/mnt(9): mkdir vmax
    [2.0-RELEASE][admin@gw.home.vukomir.info]/mnt(10): mount 172.16.10.3:/volume1/web /mnt/vmax/
    [tcp] 172.16.10.3:/volume1/web: Permission denied

    VMAX /root > cat /etc/exports
    /volume1/web    172.16.10.*(ro,sync,no_wdelay,root_squash,anonuid=65534,anongid=65534)

    Current version: 2.0-RELEASE
      NanoBSD Size : 2g

    FreeBSD gw.home.vukomir.info 8.1-RELEASE-p4 FreeBSD 8.1-RELEASE-p4 #0: Tue Sep 13 18:02:33 EDT 2011    root@FreeBSD_8.0_pfSense_2.0-snaps.pfsense.org:/usr/obj./usr/pfSensesrc/src/sys/pfSense_wrap.8.i386  i386



  • of course it will be denied, you have root_squash option turned on and you are trying to mount it from root user on pfsense. Like I said, it is most likely an export option that is causing the problem.

    Edit:
    There is also a problem if you changed user to admin since admin will not have permission to mount.



  • @vukomir:

    VMAX /root > cat /etc/exports
    /volume1/web    172.16.10.*(ro,sync,no_wdelay,root_squash,anonuid=65534,anongid=65534)

    I believe this is the problem.  Wildcards (* and ?) are allowed in host names but not IP networks.
    I would try:

    /volume1/web    172.16.10.0/24(ro,sync,no_wdelay,root_squash,anonuid=65534,anongid=65534)



  • In Linux, I think it is a bit more relaxed and they are allowed. That said, CIDR notation is much better if you are going to use an IP.



  • Hi,

    so.. i tried to put switch the wildcard with the ip and the fqdn of the pfsende the same.

    below is the configuration of the rc.conf located in /etc/defaults

    [2.0-RELEASE][admin@gw.home.vukomir.info]/root(1): grep nfs /etc/defaults/rc.conf
    netfs_types="nfs:NFS nfs4:NFS4 smbfs:SMB portalfs:PORTAL nwfs:NWFS" # Net filesystems.
    nfs_client_enable="YES"        # This host is an NFS client (or NO).
    nfs_access_cache="60"          # Client cache timeout in seconds
    nfs_server_enable="YES"        # This host is an NFS server (or NO).
    nfs_server_flags="-u -t -n 4"  # Flags to nfsd (if enabled).
    nfs_reserved_port_only="NO"    # Provide NFS only on secure port (or NO).
    nfs_bufpackets=""              # bufspace (in packets) for client
    nfsv4_server_enable="YES"      # Enable support for NFSv4
    nfscbd_enable="YES"            # NFSv4 client side callback daemon
    nfscbd_flags=""                # Flags for nfscbd
    nfsuserd_enable="NO"            # NFSv4 user/group name mapping daemon
    nfsuserd_flags=""              # Flags for nfsuserd

    maybe i have missed something in the conf file.

    i do not see any error in dmesg.

    thanks.



  • That is all fine and good, but in exportfs you have root_squash so only users with mount access can mount the remote location. In pfSense's case, admin does not seem to have mount access and if you login as root, the NFS server will not allow the connection because it is root trying to mount. A catch 22. So, I think you need to change the exportfs to no_root_squash or find some way to allow the admin user in pfsense to mount.



  • apparently the did not solved the problem.  :'(

    i created a new file /etc/rc.conf and added the nfs info, but i can not reboot the router not.

    i will wait until tomorrow to test this. :D

    if you have any new ideas please do not estate :D

    Thanks.

    Br,
    Vukomir



  • Did you change the export options on the NFS server?



  • Hi podilarius,

    I have change the exports options on the nfs server.

    Br,
    Vukomir


Log in to reply