runtime nfs mount options for existing mounts

Ronald Klop ronald-freebsd8 at klop.yi.org
Sat Jan 29 00:10:58 UTC 2011


On Sat, 29 Jan 2011 00:08:25 +0100, Rick Macklem <rmacklem at uoguelph.ca>  
wrote:

>>
>> 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

Linux gives this with nfsstat -m. Also when wsize/rsize is negotiated  
between server/client you can see the used value with that.

Ronald.


More information about the freebsd-fs mailing list