misleading error message from mount

Bug #686154 reported by gpk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nfs-utils (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Binary package hint: util-linux

If you accidentally try to mount a regular file (rather than a directory), mount gives you the error message on the wrong file.

See here:
kitchen:/$ sudo mkdir /mnt/desk.swap
kitchen:/$ sudo mount -t nfs4 desk.lan:/swap/kitchen /mnt/desk.swap/
mount.nfs4: mount point /mnt/desk.swap is not a directory
kitchen:/$ ls -l mnt
total 4
drwxr-xr-x 2 root root 4096 2010-12-06 20:20 desk.swap
kitchen:/$

So, /mnt/desk.swap really is a directory. But, on the other end, .../swap/kitchen is a regular file, *not* a directory. So the mount correctly fails, but it reports that the wrong file "is not a directory". The problem is not the file at this end, but the file at the other end. Really, it should say "Attempting to mount a file, rather than a directory".

Possibly, this is an nfs4 problem rather than a problem with /sbin/mount .

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: mount 2.17.2-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-23.41-generic 2.6.35.7
Uname: Linux 2.6.35-23-generic x86_64
Architecture: amd64
Date: Mon Dec 6 20:23:11 2010
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_GB.utf8
 SHELL=/bin/bash
SourcePackage: util-linux

Revision history for this message
gpk (gpk-kochanski) wrote :
Revision history for this message
gpk (gpk-kochanski) wrote :

Looking at the error message, the problem seems to be in mount.nfs4 .

affects: util-linux (Ubuntu) → nfs-utils (Ubuntu)
Steve Langasek (vorlon)
Changed in nfs-utils (Ubuntu):
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.