Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

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.

share|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

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
share|improve this answer
    
You didn't answer his question at all –  Richard June Mar 27 '11 at 14:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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