This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New mount option "bind"


On Wed, Aug 11, 2010 at 01:36:59PM +0200, Corinna Vinschen wrote:
>Hi guys,
>
>I added a new mount option "bind" which I took from Linux.  It allows to
>remount an existing POSIX directory into another POSIX directory.  So
>the path on the left side of the fstab line can be a POSIX path as well.
>At Cygwin startup, when its added to the mount table, it's converted to
>a Win32 path using the already existing entries in the mount table to
>evaluate the path.  So, the path is either relative to a path which
>preceeds the "bind" path in /etc/fstab, or it's eventually relative to
>the root dir.
>
>The motivation for this was that this allows to specify mount points
>while retaining relocatability of the Cygwin install tree.  So, even if
>you don't know in which path the Cygwin installation has been installed,
>you can do stuff like this now:
>
>  $ cat /etc/fstab
>  /var /usr/var none bind
>
>  $ mount
>  C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
>  C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
>  C:/cygwin/var on /usr/var type ntfs (binary,bind)  <<<<<<<<<<
>  C:/cygwin on / type ntfs (binary,auto)
>  C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
>
>I also updated the docs to describe this new option.  If you find a
>problem with this option, or if the documentation is not good enough,
>please feel free to send patches.

If the mount for /var changes then is that reflected by /usr/var?  I
believe that's how it works for linux.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]