runtime nfs mount options for existing mounts

Rick Macklem rmacklem at uoguelph.ca
Fri Jan 28 23:08:26 UTC 2011


> 
> How would I find out about the current mount options for an existing
> NFS
> mount on an NFS client?
> 
> For example, if I mount an NFS file system using:
> mount -t nfs -o rw,rsize=32768,wsize=32768,readahead=2 rhost:path node
> 
> Suppose time goes by and I forgot what I used to mount the filesystem,
> how can I find out what the rsize, wsize and readahead are for the
> existing mount?
> 
> (On another OS the settings are printed when just typing mount without
> any other options, which I find usefull in some circumstances)
> 
I don't think you can get this stuff out of the FreeBSD kernel right now.
(I was hoping someone else was going to answer, but no one did:-)

As to whether or not it should, I think it would be a nice feature, but
I've got a lot of other stuff on my plate right now.

I think it would take some sort of extension to the nmount(2) syscall or
maybe a new syscall + noew VFS_xxx() op.

I can say that, if someone else came up with the syscall/VFS changes, I
could easily implement a function in the NFS client that generates the
name/value pairs like nmount() uses. (There is currently a function that
basically does that for the old mount() and I think a slightly modified
version of that would do it. However, I haven't actually tried it.:-)

Anyone feel like an nmount() related project to do this?

rick


More information about the freebsd-fs mailing list