1

I've got the following /etc/exports entry on my Mac OS X machine:

/Volumes/a/long/path/to/folder -ro -alldirs -network 192.168.1.0 -mask 255.255.255.0

It works great, except I don't want it exported as /Volumes/a/long/path/to/folder, I want it as /nfs/folder.

Tried, symlinks, but doesn't work. Per manage:

The pathnames must not have any symbolic links in them and should not have any "." or ".." components.

What other options do I have to mount the folder as I'd like without having to install additional software?

3
  • (I use Linux, not OSX, so I can't advise specifics, hence a comment) - /etc/exports says [on the server] what can be exported. In order to work out where its exported TO, you need to change the mount path on the client. I imagine that OSX has a file /etc/fstab - and if so, you can (using a text editor) select the destination by adding a line like "server.ip:/Volumes/a/long/path/to/folder /nfs/folder nfs defaults 0 0" and then rebooting or typing mount -a to mount it. You will need to make sure the directory /nfs/folder exists.
    – davidgo
    Jan 3, 2016 at 20:12
  • @davidgo My goal is to hide the specifics of the filesystem layout on the server, not simply have an easy-to-use path.
    – Ana
    Jan 3, 2016 at 20:27
  • In that case you have an uphill battle. I guess you could trick the file system layout by using an overlay filesystem of some sort overlay filesystem like unionfs (see osx.iusethis.com/app/macfuse) to make a mirror of the filesystem tree without using symlinks). The heretic in me asks if you would not be better off using SAMBA and sharing the files using the Windows filesharing/CIFS protocol ? (You have more control of mount points on the server in SAMBA)
    – davidgo
    Jan 3, 2016 at 20:56

1 Answer 1

0

Given the comments, the only obvious two answers are:

  1. Use a hard link in the place you want it to appear to come from - that should work! Or;

  2. Move the material you want to export to the location you want it to appear to come from, so it "really is there", and then use a soft link from where you otherwise want it to be in your file system hierarchy.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .