bind mounts in fstab
Mon Jun 8 15:48:00 GMT 2015
On Jun 8 14:53, Achim Gratz wrote:
> Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes:
> > > //server/some/directory /mnt/server-share none binary 0 0
> > > #bind mounts
> > > /mnt/server-share/some/other/directory /mnt/task1 none binary,bind
> > >
> > > That works well until I try to add another such bind mount and activate it
> > > via 'mount -a' without starting a new Cygwin session. Cygwin tries to
> > > create a mount to the underlying local directory of /mnt/task1 instead of
> > > binding, which doesn't work of course.
> > How does your second bind mount look like?
> # new bind mount
> /mnt/server-share/some/other/directory /mnt/task2 none binary,bind
> Which tries to mount to
> when I do a 'mount -a' in the same session. If I instead put in
> //server/some/directory/some/other/directory none binary 0 0
> then everything works OK, AFAICS. This might be related to the fact that
> some bind mounts appear before the physical mounts in the mount table (not
> in fstab!), at least if the mounts are processed in the same order.
Easily reproducible, thank you. I think I found the culprit. mount(1)
always converts the mnt_fsname field to backslash notation. That breaks
converting the bind mount from the expected POSIX notation to a valid
I fixed mount(1) in git. If you're set up to build Cygwin yourself, you
want to give the patch a try. No new DLL, just call the new mount(1)
tool. Otherwise I'll build a new snapshot today or tomorrow (I'm hacking
on something else right now).
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: not available
More information about the Cygwin