Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora User (http://www.linux-archive.org/fedora-user/)
-   -   how to hide nfs share absolute path to the clients (http://www.linux-archive.org/fedora-user/149075-how-hide-nfs-share-absolute-path-clients.html)

"Gianluca Cecchi" 08-26-2008 01:39 PM

how to hide nfs share absolute path to the clients
 
Hello,
I have a file system /fs
I want to export a directory /fs/nfsdir and all its subdirectories.
As on the client side /etc/fstab is world readable, I would like not to show the absolute path of the server side.

Is this possible with any kind of directives at client and/or server side?
So that /etc/fstab on the clients would be

nfsserver:/nfsapp /nfsapp nfs defaults 0 0

but actually /nfsapp is mapped to /fs/nfsdir on server.

I would also like to avoid links if possible.

I only found mp=path option server-side, but it seems for other means.
I also see something like "Optional mount point" in a web based config manual..... but don't find an option part into the man page


Any* hints?

Thanks,
Gianluca

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Mail Lists 08-27-2008 03:36 AM

how to hide nfs share absolute path to the clients
 
Gianluca Cecchi wrote:
> Hello,
> I have a file system /fs
> I want to export a directory /fs/nfsdir and all its subdirectories.
> As on the client side /etc/fstab is world readable, I would like not to
> show the absolute path of the server side.
> Is this possible with any kind of directives at client and/or server side?
> So that /etc/fstab on the clients would be
>

Have you considered bind mounting to somewhere different and
exporting the bind mount ?

To do this - on the nfs server fstab add a line something like:


/nfsapp/foo /mnt/friendlyfoo ext3 bind

then put /mnt/friendlyfoo into your /etc/exports file. This way if yo
uhave to roll to a backup disk or something you simply bind mount that
onto the friendly exported name.

g

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Joseph Loo 08-27-2008 03:44 AM

how to hide nfs share absolute path to the clients
 
On Tue, 2008-08-26 at 23:36 -0400, Mail Lists wrote:
> Gianluca Cecchi wrote:
> > Hello,
> > I have a file system /fs
> > I want to export a directory /fs/nfsdir and all its subdirectories.
> > As on the client side /etc/fstab is world readable, I would like not to
> > show the absolute path of the server side.
> > Is this possible with any kind of directives at client and/or server side?
> > So that /etc/fstab on the clients would be
> >
>
> Have you considered bind mounting to somewhere different and
> exporting the bind mount ?
>
> To do this - on the nfs server fstab add a line something like:
>
>
> /nfsapp/foo /mnt/friendlyfoo ext3 bind
>
> then put /mnt/friendlyfoo into your /etc/exports file. This way if yo
> uhave to roll to a backup disk or something you simply bind mount that
> onto the friendly exported name.
>
> g
>
I think he has to define by what he means to hide the links. I suspect,
if you do df -a it will expose the links.
--
Joseph Loo
jloo@acm.org

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

"Gianluca Cecchi" 08-27-2008 01:00 PM

how to hide nfs share absolute path to the clients
 
I confirm that the actual path is invisible now to the clients, using what g suggested:
On the nfs server I have

df
/dev/drbd0*********** 20635024** 4964288* 14622532* 26% /drbd0
/drbd0/nfs ***** 20635024** 4964288* 14622532* 26% /nfsapp



and
/etc/exports
/nfsapp 10.1.1.0/255.255.255.0(ro,all_squash,mp=/drbd0,async)

while fstab of client is

nfsserv1:/nfsapp*** /nfsapp*** *** *** nfs*** defaults,noauto******* 0 0


and a df command on it now gives:

nfsserv1:/nfsapp***** 20635040** 4964288* 14622560* 26% /nfsapp

So the original path is not visible at all to the client.

Thanks again g (whoever you are... ;-)


Gianluca

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


All times are GMT. The time now is 09:42 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.