Re: mount --bind question.

From: Toby A Inkster (UseTheAddressInMySig_at_deadspam.com)
Date: 09/29/03


Date: Mon, 29 Sep 2003 07:41:52 +0100

Andy Baxter wrote:

> Is there any advantage in using mount --bind to mount a subdirectory of a
> mounted volume somewhere else in the filesystem, rather than simply using a
> symlink?

Yes there is.

Programs can tell that symlinks are symlinks and choose to ignore them
or handle them in some strange way...

-- man find --------------------------------------------
       -follow
              Dereference symbolic links. Implies -noleaf.
--------------------------------------------------------

-- man mkisofs------------------------------------------
       -f Follow symbolic links when generating the filesystem. When this
              option is not in use, symbolic links will be entered using Rock
              Ridge if enabled, otherwise the file will be ignored.
--------------------------------------------------------

-- man tar ---------------------------------------------
       -h, --dereference
              don't dump symlinks; dump the files they point to
--------------------------------------------------------

With 'mount --bind' the program effectively has no way of knowing if a
file is really there or just a 'link'.

-- 
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?id=132


Relevant Pages

  • Re: [opensuse] Beagle frontend
    ... And what 'organized' filesystem will let me see related IMs, documents, ... Filsystem symlinks do not provide the functionality of multi key indexing or a relational database. ... You would have to create an insane number of symlinks for every document in order to come close to even merely poorly faking the functionality of searching the document contents. ...
    (SuSE)
  • Re: How to Create a Symbolic Link to a Mounted Volume
    ... I tried to make a symbolic link to this directory by running the command ... You can't create usable symlinks pointing to somewhere outside the ... including making symlinks to files in its own filesystem. ...
    (Ubuntu)
  • Re: VFS + path walktrough
    ... to do the lookup in one go, ... We not just pass the pathname to filesystem (note ... Symlinks are easy: filesystem just needs to *stop* the resolution the ... _Then_ we can do saner logics for revalidate, ...
    (Linux-Kernel)
  • Re: Jail to jail network performance?
    ... One way to do this is with nullfs. ... Symlinks are just a path mapping mechanism performed by the kernel at ... parts of a filesystem are visible that are at or below the jail's root ...
    (freebsd-stable)
  • Re: [PATCH] cowlinks v2
    ... >> It is easy to add something like a cowstat or a readcowlink and teach ... cow files. ... You are limited to normal files, no directories, no symlinks, and the ... original must resided on the same filesystem as the copy. ...
    (Linux-Kernel)