NFS mounting a directory of symbolic links to other directories

Derek Atkins warlord-DPNOqEs/LNQ at public.gmane.org
Thu Feb 26 10:22:06 EST 2009


Jerry Feldman <gaf-mNDKBlG2WHs at public.gmane.org> writes:

> Second, while you can hard link a file on one directory to a name in
> another directory, if you are exporting those directories via NFS or
> SAMBA, they will be in different file systems on the importing system.

Umm.. as far as NFS is concerned a hardlink of a file is the same
as a copy of the file.  The way a hardlink works is that it adds
a second directory entry to the same file inode (which is why it
cannot cross a filesystem boundary -- the inode is unique to the
filesystem).  This means you have access to the underlying file
contents from two places in the filesystem (i.e. the link count).

A symlink, however, is a higher-level mapping which requires going
through the (local) filesystem to find the target inode.  So if
you want to limit which files are available then hardlinks are better.

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord-DPNOqEs/LNQ at public.gmane.org                        PGP key available





More information about the Discuss mailing list