This is the mail archive of the
mailing list for the Cygwin project.
New mount option "bind"
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-developers at cygwin dot com
- Date: Wed, 11 Aug 2010 13:36:59 +0200
- Subject: New mount option "bind"
- Reply-to: cygwin-developers at cygwin dot com
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
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.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com