nfsv4: Invalid fstype: Invalid argument

Now that I have vm_bhyve working, I wanted to try nfsv4 between two FreeBSD vms.

On the client (FreeBSD 14.0-RELEASE-p5) I get an error. Why?

Code:
root@ohabo:~ # mount  -t nfsv4 nicola:/data /mnt/data
mount: nicola:/data: Invalid fstype: Invalid argument

/mnt is: /dev/vtbd0p2 on / (ufs, local, soft-updates, journaled soft-updates)

Guess the Invalid argument refers to the server.

Server (13.2-RELEASE-p10) configured along NFSV4(4) :

Code:
nfs_server_enable="YES"
nfsv4_server_enable="YES"
nfsv4_server_only="YES"
nfsuserd_flags="-verbose"

nfsuserd_enable="YES"
rpcbind_enable="YES"


Code:
V4: / -sec=sys
/data
 
I get an error. Why?
Rich (BB code):
mount  -t nfsv4 nicola:/data /mnt/data
It's 'mount -o nfsv4', not '-t' on FreeBSD (mount -t nfsv4 is Linux mount command argument). Or mount -t nfs -o nfsv4.

When mounting a NFS share, the mount(8) command will execute mount_nfs(8), therefor the file system type can be omitted (-t nfs). In the above case, only the NFS version protocol needs to be specified as argument.

mount(8)
Rich (BB code):
-t [no]type[,type ...]
             The argument following the -t is used to indicate the file system
             type.  The type ufs is the default.  The -t option can be used to
             indicate that the actions should only be taken on file systems of
             the specified type.  More than one type may be specified in a
             comma separated list.  The list of file system types can be
             prefixed with no to specify the file system types for which
             action should not be taken.  For example, the mount command:

                   mount -a -t nonfs,nullfs

             mounts all file systems except those of type NFS and NULLFS.

             The default behavior of mount is to pass the -t option directly
             to the nmount(2) system call in the fstype option.

             However, for the following file system types: cd9660, mfs,
             msdosfs, nfs, nullfs, smbfs, udf, and unionfs mount will not call
             nmount(2) directly and will instead attempt to execute a program
             in /sbin/mount_type where type is replaced by the file system
             type name.  For example, nfs file systems are mounted by the
             program /sbin/mount_nfs.
 
Back
Top