An irritation with Linux's '
mount -t nfs' output
The problem with '
mount -t nfs' is that it can't make up its mind
about what NFS mount options it lists. Is its purpose to list all of the
NFS mount options, or is its purpose to list only user-supplied ones?
Right now the answer is some peculiar mixed blend; most of the time
it lists only user-supplied options, but sometimes it will also list
I care about this because I have programs that parse
mount's output to see
if we need to remount NFS filesystems to update their mount options. When
mount -t nfs starts throwing in random additional options, the code
explodes; it always thinks that the state is different and so always
does remounts (which has various consequences).
I can deal with this in code, and have, but it's irritatingly
inconsistent, especially because the list of sometimes-added
mount options changes between different versions of
This is clearly going to make system upgrades somewhat more
exciting in the future.
(And my code has to be somewhat complicated, because included in the
extra options that
mount can list are options that we sometimes set
ourselves, so I can't just pretend that those mount options don't exist
Sidebar: what extra NFS mount options get added
The ones that I know of so far are:
addr=..., for the IP address of the NFS server; always added.
proto=udp, listed on Ubuntu 8.04 if the NFS server only supports NFS over UDP. (This doesn't happen on Ubuntu 6.06.)