Web lists-archives.com

showing all JUNCTIONS as normal dirs as w/linux --bind (was Re: Cannot access volumes mounted with 'mklink...)

Corinna Vinschen wrote:

half-way work under Cygwin (junctions to volumes look like
mounted file systems look under linux, but junctions to
pathnames get converted by cygwin to symlinks -- losing
information when such junctions are restored.

Corinna -- could you _please_ re-look at supporting both
types of junctions as mount points?  Then Cygwin could have
"mount-parity" with linux! ;-)

That's not easily possible.  Mount points in Cygwin are virtual entries
stored in the per-user session, in-memory mount table.
   Ahh.. you are making it more complicated than what I'm
asking! (yey! this should be simpler)...

   If I have a junction to the root of another volume, in
cygwin it looks like a normal directory:

Using mountvol...

C:\>mountvol mountedVol \\?\Volume{578b2172-f917-11e4-b3d9-a0369f15ce28}
03/02/2017 01:24 PM <JUNCTION> mountedVol [\??\Volume{578b2172-f917-11e4-b3d9-a0369f15ce28}\]
01/11/2017  04:17 PM    <JUNCTION>     var [C:\Windows\System32\cygwin\var]

### a junction is created ... under Cygwin. Note, BTW, that 'var' is also a JUNCTION (a MS-mount point).

/> ll
total 100672654
drwxrwx---+  1            0 Nov 20  2010 $RECYCLE.BIN/
drwxrwx---+  1            0 May 15  2015 mountedVol/
lrwxrwxrwx 1 28 Jan 11 16:17 var -> /Windows/System32/cygwin/var/

/> ls mountedVol
$RECYCLE.BIN/  System Volume Information/

### mountedVol looks like a normal directory ^^^, but 'var' shows
### as a symlink.  That's the problem I'm referring to.  I'm saying
### JUNCTIONs (MS-mountpoints) should show up as the 'same' in
### Cygwin -- i.e. --

### But is not necessary that it be shown in Cygwin's "mount table":

/> mount
C:/bin on /usr/bin type ntfs (binary,auto)
C:/lib on /usr/lib type ntfs (binary,auto)
C: on / type ntfs (binary,auto)
B: on /b type smbfs (binary,user,noumount,auto)

It's the same on linux.
linux> stat -c %D /var
linux> sudo mount --rbind /var/rtmp /tmp
linux> stat -c %D /tmp

A mount from the same fs to another place on the same fs,
looks like a normal directory (not a symlink).

This is the behavior I would want for 'JUNCTION's under
On Windows, mklink creates a 'SYMLINK' or 'SYMLINKD' when
directories are linked.  Those would stay as "Symlinks".

Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple