mount --bind question.

From: Andy Baxter (news2_at_earthsong.null.free-online.co.uk)
Date: 09/29/03


Date: Mon, 29 Sep 2003 05:43:23 +0100

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?

The situation in question is I'm trying to split my filesystem between two
hard disk partitions; one which contains everything which would be
automatically reinstalled if I had to install from scratch, and another
which contains all the data I've either created or downloaded.

So far I have a partition which mounts as /mnt/dat which has the home
directories, /var (because mysql puts data there, apt caches downloaded
.debs there, and apache is configured to use /var/www in debian, though I
guess I could change these), and /usr/local. At the moment, these are put
back into the right place in the filesystem through symlinks in the root
directory tree, but I'm wondering if it would be better to use mount
--bind?

A problem with this seems to be that there isn't an option I can put in
fstab to do this, so I'd have to write a custom init script to do it.

andy.

-- 
remove ' n - u - l - l ' to email me.
Please don't send me html mail or un-notified attachments. These will be
automatically filed under 'probable spam' unless I'm expecting an email
which hasn't come.
If you do need to send an attachment or html mail, put [attachment] or
[html] in the subject line.
Thanks, andy.


Relevant Pages

  • Re: mount() function problem !
    ... mount() attaches the filesystem specified by source (which is often a device name, ... point within a file system. ... details of the options available for each filesystem type. ... Specifies the journalling mode for file data. ...
    (comp.lang.c)
  • Re: [autofs] [RFC] Towards a Modern Autofs
    ... >entangling autofs with that work. ... >filesystem it's willing to export. ... >>map is mounted. ... The result is that some users will see mount points ...
    (Linux-Kernel)
  • Re: Screw Linux, Im going back to Windows!
    ... When mounting you get to choose one device, one mount point, one ... The filesystem actually doesn't have ... Making a symlink that points to a mount point is sometimes a good ... removed and reinserted in different drives a lot of times before ...
    (comp.os.linux.security)
  • Re: UFS Bug: FreeBSD 6.1/6.2/7.0: MOKB-08-11-2006, CVE-2006-5824, MOKB-03
    ... They can simply mount a filesystem with any number of SUID ... root binaries on it and have their way with the box. ... They have physical access to the machine. ...
    (FreeBSD-Security)
  • Re: Automove vs Noautomove in BPXPRMxx
    ... read/write filesystem and the executables are in a separate, ... trying to manually mount the filesystem or you have a corrupted mount ... Automove vs Noautomove in BPXPRMxx ... Are you saying you have the same data set name but 2 physically ...
    (bit.listserv.ibm-main)