public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrey Repin <anrdaemon@yandex.ru>
To: "Matt D." <codespunk+cygwin@gmail.com>, cygwin@cygwin.com
Subject: Re: Cannot access volumes mounted with 'mklink /d' which point to a volume UUID
Date: Thu, 16 Feb 2017 14:05:00 -0000	[thread overview]
Message-ID: <16410157605.20170216165626@yandex.ru> (raw)
In-Reply-To: <58A4741E.5020408@gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 3655 bytes --]

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-0000-0000-0000-100000000000}\
>          C:\
> ...
> mklink /d test \\?\Volume{079b79c9-0000-0000-0000-100000000000}\
> ...
> 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    <DIR>          .
13.08.2016  23:13    <DIR>          ..
21.08.2015  00:30    <JUNCTION>     sda1 [\\?\Volume{80006d80-c2bb-4297-93c1-2f6d1a2a8acb}\]
31.08.2014  23:57    <JUNCTION>     sdb1 [\\?\Volume{9d412aba-0e54-4628-9c6b-b84fb18d062a}\]
31.08.2014  23:55    <JUNCTION>     sdc1 [\\?\Volume{6833c423-2223-11e4-b07d-806e6f6e6963}\]
31.08.2014  23:55    <JUNCTION>     sdd1 [\\?\Volume{6833c424-2223-11e4-b07d-806e6f6e6963}\]
16.02.2017  13:43    <DIR>          temp

...

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

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

sdc1/:
$RECYCLE.BIN        EDIUS-Data     Profiles  src                          usr
10-remote-vpn.conf  eventcuts.zip  Programs  System\ Volume\ Information  var
CapCharges.jpg      FCPF9C.html    RECYCLER  temp                         VirtualBox
default.wjr         ftn            REINST    Thumbs.db                    VirtualPad
Disks               Other          Reserv    Track12-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...\0ТÒÐÐ¥\a&ö&ÆVÒ\a&W\x06÷'G3¢\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒ÷\a&ö&ÆV×2æ‡FÖÀФd\x15\x13¢\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöf\x17\x12ðФFö7VÖVçF\x17F–öã¢\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöFö72æ‡FÖÀÐ¥Vç7V'67&–&R\x06–æfó¢\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöÖÂò7Vç7V'67&–&R×6–×\x06ÆPРÐ

      parent reply	other threads:[~2017-02-16 14:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15 15:30 Matt D.
2017-02-16  0:59 ` L. A. Walsh
2017-02-16  9:26 ` Corinna Vinschen
2017-02-24 21:49   ` L. A. Walsh
2017-02-28 21:43     ` Corinna Vinschen
2017-03-02 21:43       ` showing all JUNCTIONS as normal dirs as w/linux --bind (was Re: Cannot access volumes mounted with 'mklink...) L. A. Walsh
2017-03-09  4:17       ` Treating Junctions consistently, as "normal dirs" as w/linux "bind"-type mount L. A. Walsh
2017-03-09 13:50         ` Andrey Repin
2017-03-09 15:48           ` L A Walsh
2017-03-09 16:41             ` Corinna Vinschen
2017-03-09 19:13               ` L A Walsh
2017-03-10 13:20             ` Andrey Repin
2017-02-16 14:05 ` Andrey Repin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16410157605.20170216165626@yandex.ru \
    --to=anrdaemon@yandex.ru \
    --cc=codespunk+cygwin@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).