mount -t nfs 10.1.1.1:/X instead of 10.1.1.1:/mnt/data/X

madtsoia

Cadet
Joined
Sep 24, 2016
Messages
7
Hi,

Migrating from a QNAP nas box to FreeNAS I ran into an issue: The NFS shares must be mountable the same way as before (otherwise a large number of clients have to be updated).

So, e.g.
if a "documents" share can be mounted from a client like this:
mount -t nfs 10.1.1.1:/documents

It should be the same command when FreeNAS is running at 10.1.1.1

Are there any workarounds to avoid long paths like
mount -t nfs 10.1.1.1:/mnt/data/documents

I have been searching in this forum and found an older answer saying it's not possible but maybe it has become possible since? It's a big problem for me.
Thanks again!
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
No, this is not possible. It's likely the QNAP has a custom NFS daemon which makes it behave this way. Normal behavior is to use the exported path.
 

madtsoia

Cadet
Joined
Sep 24, 2016
Messages
7
Alright, thank you. In that case we'll update the path on the other systems. Would be nice if FreeNAS could do it in the future. openmediavault can do it.
 

Magius

Explorer
Joined
Sep 29, 2016
Messages
70
Talking off the top of my head here, and with zero experience w/ BSD, so take that for what it is.

I had a similar issue on a previous system which was running Linux, and exporting files via NFS. NFS does not handle symbolic links properly (by design, it turns out...), so for example if the data is really at /mnt/data/documents, and you try to create a symlink to /documents and export that, NFS can blow up in very interesting ways :)

That said, I was able to work around the problem by creating a 'binding mount' (ie: mount --bind) instead of a symlink and my clients were able to do exactly what you're asking for. They would hit 10.1.1.1/documents on the NFS server, and because the underlying filesystem had bound (re-mounted) /mnt/data/documents at that location, NFS worked perfectly.

Again though, this was Linux, I've never even seen a BSD prompt, so whether there is any similar BSD construct that is compatible with NFS is anyone's guess. Given that monkey said it's not possible, I'm inclined to believe him, I'm just throwing this out in case anyone with more experience believes there's a BSD analogue for the technique.
 

George Kyriazis

Dabbler
Joined
Sep 3, 2013
Messages
42
Has freenas behavior changed recently (maybe with 11.2)? I'm running into a similar problem (migrating from a Synology machine to FreeNAS), and I'd like to avoid busywork and downtime of various clients.

Thanks!
 
Top