Web lists-archives.com

Re: Junctions != Symlinks; Treat Junctions as MS-FS mounts; MS-symlinks are symlinks




Greetings, L A Walsh!

> Andrey Repin wrote:
>>  Greetings, L A Walsh!
>>
>> > Andrey Repin wrote:
>> >> I would argue against all junctions being treated blindly.
>> >> The difference with bind mounts in Linux is that in Linux
>> >> you don't have the
>> >> information available within the filesystem itself, and have
>> >> no other option,
>> >> than to treat them as regular directories.
>> >> Only direct volume junctions cause an issue, and this is what
>> >> should be fixed,
>> >> if possible, not sidetracked with questionable workarounds.
>> > ----
>> >         Could you describe the benefits of your proposed solution?
>>
>> >         You do know that MS originally called junctions "mountpoints",
>> > right?  So why would cygwin treating them as such be a "questionable
>> > workaround"?
>>
>>  How they are called, and how they behave is a two different questions.
>>
>> >         How would you want to treat them?
>> >         Could you describe the benefits of your proposed solution?
>>
>>  Easy way: As symlinks, just like now, unless it's a volume
>>  mount point that can't be normalized to a disk letter.
> ----
>     You say that throwing out the MS-designed ability
> to mount a filesystem subtree and treat them the same as another
> feature they added, "symlinks", is a benefit?

Where did I said that?

>     Sorry.  But throwing out useful features is not
> a benefit.  I asked for a benefit.  MS designed JUNCTIONS as
> 'bind' mountpoints.  That was an added feature added in WinXP
> and Windows2000.

Again, don't confuse design goals with implementation realities.

>     They added symlinks in Vista to create a feature,
> similar to *nix symlinks.  I don't see how throwing out mount
> points is anything but a BUG -- a removal of a useful feature.

You're insinuating.

>     I want to be able to mount other areas of other file
> systems onto directories.

Anybody trying to stop you doing so?

> Symlinks are destroyed by Cygwin's SETUP.EXE and the install process For
> example. I have a smallish "/usr" partition, but a large "/Users" partition.
> "/usr/share" grew to hold more and more data over time, and
> currently is using 16G, all by itself.  My "/usr" partition is
> 15GB with 4.7GB free, 11G used.  So I needed to split
> "/usr/share" off to somewhere else.  I don't have room for another
> drive, but I do have room on "/Users".  So tell me,
> why shouldn't I be able to create "/Users/share" and mount
> "/Users/share" at "/usr/share"?

That's a reason for bug reporting.

>     Same problem under "/opt" under linux.  "/opt" is
> a directory on my root partition.  When I wanted to
> install "VirtualBox" (which lives under "/opt/VirtualBox" it
> refused to run from a path that had a symlink in it.  How
> would you solve that?

We're not talking Linux or VirtualBox issues here, do we?

>     I used a 'bind' mount.  VirtualBox rejected
> symlinks in its base path, but it does work with mounted
> filesystems.

>     In the same way, not only Cygwin's "setup.exe"
> but also many of the "install" scripts that install programs
> under cygwin, check to see if there is a symlink as part
> of their base path.  If they find one -- they remove it
> and re-create the directory where there used to be a
> symlink.  Result: "/usr/share/man/man1/newprog1.gz"
> s all alone under 'man' as "/usr/share/info/newprog.gz"
> is by itself under /usr/share/info.   Where did the rest
> of my files go?

>     They are still there -- but under
> "/Users/share/...".  That's my main problem.  Cygwin
> doesn't install things in "/usr/share/<location>/<prog>"
> But first, removes all existing symlinks in its base
> path.

>     Without the ability to mount /Users/share
> (or /Users/opt) at /usr/share and /usr/opt, I have
> no way to manage the space on my devices.

>     So how would a Windows or Linux user solve
> the problem?  They'd use the OS's built-in 'bind-mount'
> feature (called 'junction' in MS-speak).  Because
> junctions are meant to be a way of splicing part of
> one file system into another at a specific path.

Cygwin is not Linux. I don't see why you're operating Linux arguments in the
native Windows area.

>>
>>  Preferred way: Fix volume mounts accessibility
>>  \\?\{UUID} -> /dev/disk/by-uuid/UUID
> ----
>     Sorry, but \\? is not a valid Windows path:

"\\?\" is not a "path", it's a "notation".

>>  ll //?/
> ls: cannot access //?/: No such file or directory

That's ls' problem.

/>> cmd
> C:\>dir \\?\
> dir \\?\
> The filename, directory name, or volume label syntax is incorrect.

That's CMD problem.

> Your suggestion doesn't work under windows,

You'll be surprised, if you really think so.
http://project.rootdir.org/gallery/web/?show=20170311-204648.png

> -----
> Show me how I can create a path that must have
> symlinks in it, that won't be removed or changed
> by cygwin's setup or other cygwin programs.

> With JUNCTIONs as a mount point, problem solved.
> With JUNCTIONsJ equated to symlinks -- paths are
> corrupted.

You're again substituting meanings with no clear understanding of the issue or
consequences.

> If you want to provide a Windows-compatible way to
> mount a file system+path at another path, fine.
> But reverting JUNCTIONs to their original mount
> functionality does work.  So, again, I ask you,
> how does your change benefit anyone (other than you)?

I don't quite understand the issue you are fighting over, right now.
In terms of *NIX, the closest possible meaning of junctions and volume reparse
points is "symlink".
You can't change this, it's core OS functionality. Trying to masquerade it is
one way road to hell. Been there with PHP's "realpath", I don't want Cygwin to
slip the same road.

> If 'bind' mounts were not a significant benefit over
> symlinks in linux -- they wouldn't have been implemented.

There's no "mounts" in Windows, other than Cygwin bind mounts written in
fstab.


-- 
With best regards,
Andrey Repin
Saturday, March 11, 2017 18:41:08

Sorry for my terrible english...


--
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