Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NFS mounting a directory of symbolic links to other directories

On 02/25/2009 11:43 AM, Ben Eisenbraun wrote:
> On Wed, Feb 25, 2009 at 11:34:29AM -0500, Don Levey wrote:
>  =20
>> All symlinks - I can't make hardlinks to a directory.
>>    =20
> You can use 'cp -al' to easily make hard links to a directory tree.
> Hard links can't cross file system boundaries.  Are /base/music and=20
> /base/kidsmusic on the same file system?
>  =20
First, you can't hard link directories explicitly. (Actually the . and=20
=2E. are hard links).
Second, while you can hard link a file on one directory to a name in=20
another directory, if you are exporting those directories via NFS or=20
SAMBA, they will be in different file systems on the importing system.

Symbolic links can certainly cross file system boundaries, but they=20
contain paths. The issue is that the paths on the importing system must=20
be the same as on the exporting system. I do this at work using=20
automount. Example, the home directories are NFS exported from one=20
system and another set of directories are mounted separately. There is a =

directory on the NFS server, /mnts/buildarea. I have a symlink in my=20
home directory to several subdirectories in /mnts/buildarea. But,=20
buildarea is always mounted on /mnts in the root file system on the=20
importing systems:
lrwxrwxrwx  1 gaf  algo      54 Sep  2 10:02 LifeInsurance ->=20

If the path on the exporting system is different from the path on the=20
importing system, you can still set up your symlink, but set it up=20
explicitly on the importing system. So, in my example, if buildarea was=20
not a subdirectory of mnts on the exporting system, I could still create =

the symlink, but I would have to create it on the imported system, but=20
it would not work when you were logged in to the NFS server. I set up=20
our systems here to look similar to the systems in Toronto because some=20
scripts make assumptions :-( that things are always in the same place.=20
Try building a million line of code system and you are missing a library =

because they updated it in Toronto, but we didn't pick up that update=20
because we copy only what we need to build.

Jerry Feldman <gaf-mNDKBlG2WHs at>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB  CA3B 4607 4319 537C 5846

BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!

Boston Linux & Unix /