How can I share FolderA on ServerA so that my client can simply access it as ServerA:/FolderA if FolderA is not in / ?

Lets say FolderA is actually

/usr/local/test/RandomName

I can use bind in fstab to shorten it and put it in /export

/usr/local/test/RandomName /export/FolderA none bind 0 0

So now, I can mount it as

mount -t nfs ServerA:/export/FolderA /media/folderA

What I really want is

mount -t nfs ServerA:/FolderA /media/folderA

The server is Ubuntu 10.04 and the clients will include Macs and Linux machines

link|improve this question

73% accept rate
feedback

2 Answers

I'm not sure if you can do that using bind in your server's fstab. but I do know you can do this:

ln -s /usr/local/test/RandomName /FolderA

Configure your /etc/exports file to export /FolderA and you should be good.

link|improve this answer
I'd prefer not to clutter up my root / folder if possible – wag2639 Mar 28 '11 at 16:59
Pretty sure that's the only way to do it though. Else, I think you're stuck with /exports/FolderA or /nfs/FolderA – Richard June Mar 29 '11 at 2:20
feedback

Open following file on NFS server:

/etc/exports

and enter following details to it:

/usr/local/test/RandomName XX.XX.XX.XX(rw)

Then login NFS client and do mount as follows:

mount -t nfs YY.YY.YY.YY:/usr/local/test/RandomName /media/folderA

Fstab entry:

YY.YY.YY.YY:/usr/local/test/RandomName /media/folderA nfs defaults 0 0

Note:

XX.XX.XX.XX - IP of NFS client
YY.YY.YY.YY - IP of NFS server
link|improve this answer
You didn't answer his question at all – Richard June Mar 27 '11 at 14:20
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.