Solved Error mounting nfs from /etc/fstab


From a Linux box, I've exported a directory that should be mounted inside a jail subdirectory.

In the Linux (server) box:
# grep incomi /etc/exports

In the FreeBSD (client) box:
Code: /usr/jails/mldonkey/usr/home/mldonkey/.mldonkey/incoming/  nfs rw 0 0

When trying to mount this as:
# mount /usr/jails/mldonkey/usr/home/mldonkey/.mldonkey/incoming/
mount: /usr/jails/mldonkey/usr/home/mldonkey/.mldonkey/incoming: unknown special file or file system
# echo $?

Oops, something is wrong.

But, when mounting from the command line:
# mount -t nfs  /usr/jails/mldonkey/usr/home/mldonkey/.mldonkey/incoming/

# echo $?

No problem to mount it.
To try to find out where the problem is, I changed the line in /etc/fstab to:
Code: /mnt  nfs  rw 0 0

# mount /mnt; echo $?

Mounts fine.

So, the problem doesn't seem to be in the server part and doesn't seem to be any syntax error in /etc/fstab.

My mounted filesystems are:
# mount                                                               
/dev/ada0p2 on / (ufs, local, journaled soft-updates)
devfs on /dev (devfs, local, multilabel)
/usr/jails/sharedfs on /usr/jails/mldonkey/sharedfs (nullfs, local, read-only)
devfs on /usr/jails/mldonkey/dev (devfs, local, multilabel)

What is wrong with this setup? How to correct it?
My guess is that the system is trying to mount it before the mldonkey jail has started. So the target directory simply doesn't exist yet.

Add the mount to /etc/fstab.mldonkey and configure the jail to mount it when it starts. That way it'll be mounted/unmounted when the jail starts/stops.
Thanks SirDice.
This is working and I don't know really why. What I did was to remove the trainling slash in the fstab entry. then it mounted fine. Tried again with the trailing slash and it worked fine again.