2004-09-25 19:12:02

by Sven Köhler

[permalink] [raw]
Subject: export directory under different name

Hi,

is it possible to export a directory under a different name?
Let's say i have a directory called /mnt/disk1/home3 and other machines
would like to mount it as if it was /home3. Is this possible? i wouldn't
know, how an entry in /etc/exports would look like.

The problem is, that i have to adjust my configuration to match an
existing structure. I must must export the directory /home3, but i don't
want to mount the whole partition there.

At present, i do a "mount -o bind /mnt/disk1/home3 /home3" which works
fine *fingers crossed*. Is this a supported configuration, or does this
only work "by accident"?

Thx
Sven




-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs


2004-09-26 18:47:01

by Michael Richardson

[permalink] [raw]
Subject: Re: export directory under different name

-----BEGIN PGP SIGNED MESSAGE-----


>>>>> "hler" == hler <Sven> writes:
hler> is it possible to export a directory under a different name?

No, it is not.
There is no theorectical reason why mountd can not do more complicated
mappings before giving out file handles, but it does not (to my
knowledge) do so.
It does follow symlinks, though.

hler> Let's say i have a directory called /mnt/disk1/home3 and other
hler> machines would like to mount it as if it was /home3. Is this
hler> possible? i wouldn't know, how an entry in /etc/exports would
hler> look like.

Assuming that you don't have a /home3 already, I'd just do:
ln -s /mnt/disk1/home3 /home3

and then list /home3 in exports.

hler> At present, i do a "mount -o bind /mnt/disk1/home3 /home3"
hler> which works fine *fingers crossed*. Is this a supported
hler> configuration, or does this only work "by accident"?

That should be supported.

- --
] "Elmo went to the wrong fundraiser" - The Simpson | firewalls [
] Michael Richardson, Xelerance Corporation, Ottawa, ON |net architect[
] [email protected] http://www.sandelman.ottawa.on.ca/mcr/ |device driver[
] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Finger me for keys

iQCVAwUBQVcOKYqHRg3pndX9AQHzpQQAp6y25V2X5e9VJoq7UU/fPL8+oonog930
6iN9XOK3822iWoa4TJd4BR5MzmlW4U6GzgrRL+MIiSFGxGq+BshCFJyUXAtMAYAy
NE9dp9fev0CJ1PV/IzCFwaihQPtbtJXMcrSV8Y29nUeSK9T0Ao6cX/vg3brMCICd
FsopMxIr3uQ=
=bjX3
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

2004-09-26 18:55:34

by Sven Köhler

[permalink] [raw]
Subject: Re: export directory under different name

> No, it is not.
> There is no theorectical reason why mountd can not do more complicated
> mappings before giving out file handles, but it does not (to my
> knowledge) do so.
> It does follow symlinks, though.

Symlinks should be sufficient for me. I didn't expect mountd to follow
symlinks, so i didn't try that. I just did, and it works as expected.

Thx
Sven


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs