Re: Cannot access volumes mounted with 'mklink /d' which point to a volume UUID

2017-02-28 Thread Corinna Vinschen
On Feb 24 13:49, L. A. Walsh wrote:
> Corinna Vinschen wrote:
> > This type of directory symlink to a GUID volume path isn't supported
> > at all yet in Cygwin.
> As I mentioned, symlinks don't support volume destinations
> under windows, but Junctions should be used instead.  They
> 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.  You can't easily
fetch all dir junctions on a volume, and the mount table is also
restricted in size.  Volume junctions look like mount points because the
device id changes below the reparse point, while they don't for dir
junctions to the same volume.  If you want them handled as mount points,
add the path as a Cygwin mount point to /etc/fstab or /etc/fstab.d/$USER


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat


signature.asc
Description: PGP signature


Re: Cannot access volumes mounted with 'mklink /d' which point to a volume UUID

2017-02-24 Thread L. A. Walsh

Corinna Vinschen wrote:

This type of directory symlink to a GUID volume path isn't supported
at all yet in Cygwin.  

As I mentioned, symlinks don't support volume destinations
under windows, but Junctions should be used instead.  They
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! ;-)

Thanks!


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



Re: Cannot access volumes mounted with 'mklink /d' which point to a volume UUID

2017-02-16 Thread Andrey Repin
Greetings, Matt D.!

> On Windows you can create symbolic links which point to volume UUIDs as 
> a way of mounting and unmounting them without having to use the 
> administrative disk management tools.

> For example, in cmd:

> mountvol
> ...
>  \\?\Volume{079b79c9----1000}\
>  C:\
> ...
> mklink /d test \\?\Volume{079b79c9----1000}\
> ...
> dir test

> I call mounvol to get a list of volumes and create a symbolic link 
> 'test' which points to the C:\ UUID. When I then 'dir test' it will list 
> all files on that volume.

> If I try to access it through Cygwin Bash I get the following error:

> $ dir test/
> dir: cannot access 'test/': No such file or directory

> This makes it difficult to work with unmounted volumes as it's not 
> always possible to access the administrative disk management snap-in and 
> the mountvol/mklink has always been my go-to for this type of 
> functionality. It would be great if Cygwin would support it.

$ (mountvol; cmd /C dir /N) | iconv -f CP866; dir sd?1/

...

\\?\Volume{80006d80-c2bb-4297-93c1-2f6d1a2a8acb}\
C:\
C:\dev\sda1\

\\?\Volume{6833c423-2223-11e4-b07d-806e6f6e6963}\
*** НЕТ ТОЧЕК ПОДКЛЮЧЕНИЯ ***

\\?\Volume{9d412aba-0e54-4628-9c6b-b84fb18d062a}\
*** НЕТ ТОЧЕК ПОДКЛЮЧЕНИЯ ***

\\?\Volume{6833c424-2223-11e4-b07d-806e6f6e6963}\
*** НЕТ ТОЧЕК ПОДКЛЮЧЕНИЯ ***

\\?\Volume{51810762-adac-11e4-9801-902b3437d8e4}\
W:\

\\?\Volume{152b5e11-3180-11e4-9bb8-806e6f6e6963}\
R:\

...

13.08.2016  23:13  .
13.08.2016  23:13  ..
21.08.2015  00:30 sda1 
[\\?\Volume{80006d80-c2bb-4297-93c1-2f6d1a2a8acb}\]
31.08.2014  23:57 sdb1 
[\\?\Volume{9d412aba-0e54-4628-9c6b-b84fb18d062a}\]
31.08.2014  23:55 sdc1 
[\\?\Volume{6833c423-2223-11e4-b07d-806e6f6e6963}\]
31.08.2014  23:55 sdd1 
[\\?\Volume{6833c424-2223-11e4-b07d-806e6f6e6963}\]
16.02.2017  13:43  temp

...

sda1/:
$Recycle.Bin  Documents\ and\ Settings  hiberfil.sys  Program\ Files
   Users
arc   DrWeb home  Program\ Files\ (x86) 
   usr
Config.MsiDrWeb\ Quarantine os792636.bin  ProgramData   
   var
cygwinftn   pagefile.sys  Programs  
   Windows
dev   Games PerfLogs  System\ Volume\ 
Information

sdb1/:
$RECYCLE.BIN  DirectoryHotlist.reg  Program\ Files  reg   System\ Volume\ 
Information
dev   Fraps Programsreg~  url.nobrain

sdc1/:
$RECYCLE.BINEDIUS-Data Profiles  src  usr
10-remote-vpn.conf  eventcuts.zip  Programs  System\ Volume\ Information  var
CapCharges.jpg  FCPF9C.htmlRECYCLER  temp 
VirtualBox
default.wjr ftnREINSTThumbs.db
VirtualPad
Disks   Other  ReservTrack12-2.wav
xD-2010-07-23.rar

sdd1/:
$RECYCLE.BIN  arc  Games  Scratch  System\ Volume\ Information


-- 
With best regards,
Andrey Repin
Thursday, February 16, 2017 16:55:19

Sorry for my terrible english...

Re: Cannot access volumes mounted with 'mklink /d' which point to a volume UUID

2017-02-16 Thread Corinna Vinschen
On Feb 15 07:30, Matt D. wrote:
> On Windows you can create symbolic links which point to volume UUIDs as a
> way of mounting and unmounting them without having to use the administrative
> disk management tools.
> 
> For example, in cmd:
> 
> mountvol
> ...
> \\?\Volume{079b79c9----1000}\
> C:\
> ...
> mklink /d test \\?\Volume{079b79c9----1000}\
> ...
> dir test
> 
> I call mounvol to get a list of volumes and create a symbolic link 'test'
> which points to the C:\ UUID. When I then 'dir test' it will list all files
> on that volume.
> 
> If I try to access it through Cygwin Bash I get the following error:
> 
> $ dir test/
> dir: cannot access 'test/': No such file or directory
> 
> This makes it difficult to work with unmounted volumes as it's not always
> possible to access the administrative disk management snap-in and the
> mountvol/mklink has always been my go-to for this type of functionality. It
> would be great if Cygwin would support it.

This type of directory symlink to a GUID volume path isn't supported
at all yet in Cygwin.  However, you can access the directory directly
without having to go through MKLINK.  In Cygwin:

  $ cd /proc/sys/GLOBAL\?\?/Volume{079b79c9----1000}/

or

  $ ln -s \
  /proc/sys/GLOBAL\?\?/Volume\{079b79c9----1000}/ \
  my_vol
  $ cd my_vol

Note the trailing slash.  Volume{079b79c9----1000}
without the slash is the block device.
Volume{079b79c9----1000}/ with trailing slash is the
filesystem on the block device.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat


signature.asc
Description: PGP signature


Re: Cannot access volumes mounted with 'mklink /d' which point to a volume UUID

2017-02-15 Thread L. A. Walsh

Matt D. wrote:
On Windows you can create symbolic links which point to volume UUIDs 
as a way of mounting and unmounting them without having to use the 
administrative disk management tools.


For example, in cmd:

mountvol
...
\\?\Volume{079b79c9----1000}\
C:\
...
mklink /d test \\?\Volume{079b79c9----1000}\

---
   mklink and mklink /d create SYMLINKs (and SYMLINKDs).  To create
MS mount points you need to create them as junctions (mklink /J) and
I think that should work for what you are doing.

   Unfortunately, cygwin breaks MS-mounts by treating them as symlinks,
so if you use standard *nix utils to copy that dir, it won't be read as a
dir, but as a symlink, so when it's written to a destination, it seems like
it would attempt to overwrite the directory with a symlink. 


   I know it messes up being able to keep cygwin dirs on a separate disk
unless you _only_ store 1 cygwin-dir/mount point.

   For example, if you have a cygwin on a "D" drive, you won't be
able to use junctions to mount D:/usr on /usr and D:/bin on /bin without
cygwin destroying the mountpoints when software is installed. 


   Very unfortunate, since linux DOES have the dynamic-mount points
with its 'bind' options.

   Somehow, having users be able to destroy mount-points doesn't seem
that secure.


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



Cannot access volumes mounted with 'mklink /d' which point to a volume UUID

2017-02-15 Thread Matt D.
On Windows you can create symbolic links which point to volume UUIDs as 
a way of mounting and unmounting them without having to use the 
administrative disk management tools.


For example, in cmd:

mountvol
...
\\?\Volume{079b79c9----1000}\
C:\
...
mklink /d test \\?\Volume{079b79c9----1000}\
...
dir test

I call mounvol to get a list of volumes and create a symbolic link 
'test' which points to the C:\ UUID. When I then 'dir test' it will list 
all files on that volume.


If I try to access it through Cygwin Bash I get the following error:

$ dir test/
dir: cannot access 'test/': No such file or directory

This makes it difficult to work with unmounted volumes as it's not 
always possible to access the administrative disk management snap-in and 
the mountvol/mklink has always been my go-to for this type of 
functionality. It would be great if Cygwin would support it.



Matt D.

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