[Bug 251923] Re: /sbin/mount.nfs doesn't understand mount option mountvers=n
Steve Langasek
steve.langasek at canonical.com
Sat Oct 22 02:49:15 UTC 2011
> So this explains why I need above command to work, no matter how
> strange and pointless it may look.
Well, the straightforward workaround for this should be:
- create a shell script named 'mount' that maps 'mountvers=2' to 'nfsvers=2' and calls /bin/mount
- put this shell script in /usr/local/bin
- make sure /usr/local/bin is in the path before /bin
- call /opt/tta_tem/bin/tem startcdm
If that doesn't work, you can use 'dpkg-divert' to permanently move
/bin/mount aside in a way that will be respected on upgrades, and
install your script directly as /bin/mount.
> My assertion is that this option should not have been touched, damn
it!!
That's as may be, but we didn't touch it. You'd have to take up the
question of not touching it with linux-nfs upstream.
> This boneheaded changing of options because "nobody should be using
> this" is making Debian and Ubuntu *impossible* to use in a professional
> environment.
This is not due to any Debian or Ubuntu changes; it's due to an upstream
change, probably one that was meant to fix something else and only
incidentally broke mount version 2 support. And it probably went
unnoticed because the only thing affected was a version of the protocol
that's been *obsolete* for a decade.
I agree that it's a bug to have the option stop working. I also think
it's a bug that the software you're using is setting that option.
Neither of these bugs are going to be a high priority for the Ubuntu
team, because the number of users affected by problems with NFSv2
support is very, very small.
> One day the option is there ... you upgrade a few packages
> and ... *POOOOFFF!* ... option is gone all of a sudden and your
> Enterprise Remote Access solution partially stops to work.
> Nice one. Seriously. :-(
If by "upgrade a few packages" you mean "upgrade to the next version of
the release, which is not guaranteed to be feature-compatible with the
previous version", sure.
The way I see it, you have several options to get this bug fixed.
- Talk to upstream.
- Work out how to fix it yourself.
- Contract someone to fix the bug. There are a number of companies that provide paid support for Linux distributions, including for Debian and Ubuntu. For information about Canonical's paid support options, see <http://www.ubuntu.com/support>.
But escalating the bug via the community bug tracker is not likely to
lead to a fix in the foreseeable future, because this is going to be a
deep bug and there are a lot of other bugs that need fixing.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to nfs-utils in Ubuntu.
https://bugs.launchpad.net/bugs/251923
Title:
/sbin/mount.nfs doesn't understand mount option mountvers=n
Status in “nfs-utils” package in Ubuntu:
Confirmed
Bug description:
It appears that on Ubuntu 8.04 the binary /sbin/mount.nfs no longer
understands certain (standard?) mount options which work on Ubuntu
7.10. This is bad for compatibility!
Instructions to reproduce the behaviour:
1.) both on Ubuntu 8.04 and 7.10:
Configure an NFS server and have it export a directory "/smb" ... e.g. my /etc/exports looks like this:
/smb *(rw,async,no_root_squash,no_subtree_check)
2.) Now try to mount it onto your localhost with this command:
sudo mount -t nfs -o rw,udp,mountvers=2,port=4242 localhost:/smb /smb
Results you will get:
* Ubuntu 7.10:
Everything OK, works tip top. A simple "mount" returns this:
~$ mount
...
localhost:/smb on /smb type nfs (rw,udp,mountvers=2,port=4242,addr=127.0.0.1)
The application (please see below for details) I have to do this for
also works tip top with Ubuntu 7.10.
* Ubuntu 8.04:
Does not work! The "mount" binary immediately exists with this error message:
"mount.nfs: an incorrect mount option was specified"
If I modify above command e.g. so that it now looks like this (leaving
away the "mountvers=2" parameter) ...:
sudo mount -t nfs -o rw,udp,port=4242 localhost:/smb /smb
... then "mount" seems to hang for quite a while and then after
several minutes simply exits with this message:
"mount.nfs: internal error"
... Without giving any further explanation of what might be wrong!
"dmesg" shows this line:
"[718405.028275] nfs: server localhost not responding, timed out"
... But according to the "nfs-kernel-server" itself it is running:
# /etc/init.d/nfs-kernel-server status
nfsd running
The same message about "nfs: server localhost not responding, timed
out" is also present in /var/log/messages but other than this there
are no indications of why this does not work anymore (again: it works
tip top in Ubuntu 7.10 and other Linux distributions).
Background:
We are using "Sun Secure Global Desktop" (see here:
http://www.sun.com/software/products/sgd/get.jsp) and Ubuntu as
application server (e.g. Ubuntu's Gnome desktop session is served as
application to our SGD users) and for everything (= audio forwarding,
client drive mapping, seamless window mode) to work it is necessary to
install the "SGD Client Enhancement Module". Details about that one
can be found here: http://docs.sun.com/source/820-2550/cdm.html
This page explains in detail how NFS and exporting the "/smb" share is needed for "Client Drive Mapping" to work:
http://docs.sun.com/source/820-2550/cdm.html#unixappserver
As per these instructions by SUN, when you issue this command:
/opt/tta_tem/bin/tem startcdm
... to trigger the "client drive mapping" functionality then this
script "/opt/tta_tem/bin/tem" is executed which ultimately triggers
the mount command I give above (I checked via "strace"):
"mount -t nfs -o rw,udp,mountvers=2,port=4242 localhost:/smb /smb"
So this explains why I need above command to work, no matter how
strange and pointless it may look.
As explained above, I can use "Sun Secure Global Desktop" with Ubuntu
7.10 and with "client drive mapping" (and therefore via that funny-
looking "mount" command above!) users who login get the drives of
their client PC (e.g. their C:\ .... or their $HOME directory) mapped
onto the remotely running desktop session (e.g. Ubuntu's Gnome
session) as if it were connected directly to the server. Trust me,
this is a very cool feature.
With Ubuntu 8.04 however this does not work anymore.
So it all boils down to the fact that this command (regardless how odd
and pointless it may look):
sudo mount -t nfs -o rw,udp,mountvers=2,port=4242 localhost:/smb /smb
... works tip top on Ubuntu 7.10
... but does not work at all on Ubuntu 8.04
... Which means that we cannot use Ubuntu 8.04 in connection with "Sun Secure Global Desktop" and maybe other enterprise products as well.
So am I right to assume that something was changed in the "mount.nfs"
binary and that this might be a bug?
If it's not a bug .... could we please have 7.10's binaries back?
:-)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/251923/+subscriptions
More information about the foundations-bugs
mailing list