Olaf Klischat | 14 Jul 23:47 2011

Bug: dynamically mounted USB drives inaccessible

(Git Bash / msysGit 1.7.4, WinXP & 7)

Git Bash never sees the drive letter of a USB memory stick here if the
stick was attached to the computer while the Git bash instance
(actually any Git Bash instance) was already running. The
corresponding directory (e.g. /e/) just doesn't exist, neither in any
of the previously running Git Bashes NOR in Git Bash instances that
were started after the stick was attached, while any of the previously
running instances were still running too. The letter is accessible
from all other Windows apps (e.g. Explorer, etc.) just fine.

The only way to gain access to the drive from Git Bash is to close ALL
running Git Bash instances and then open new ones.

Is this a known bug? Is there a workaround? Some "refresh drive
mappings" command maybe?

Johannes Schindelin | 15 Jul 01:07 2011
Picon
Picon

Re: Bug: dynamically mounted USB drives inaccessible

Hi Olaf,

On Thu, 14 Jul 2011, Olaf Klischat wrote:

> (Git Bash / msysGit 1.7.4, WinXP & 7)
> 
> Git Bash never sees the drive letter of a USB memory stick here if the
> stick was attached to the computer while the Git bash instance
> (actually any Git Bash instance) was already running. The
> corresponding directory (e.g. /e/) just doesn't exist, neither in any
> of the previously running Git Bashes NOR in Git Bash instances that
> were started after the stick was attached, while any of the previously
> running instances were still running too. The letter is accessible
> from all other Windows apps (e.g. Explorer, etc.) just fine.
> 
> The only way to gain access to the drive from Git Bash is to close ALL
> running Git Bash instances and then open new ones.
> 
> Is this a known bug? Is there a workaround? Some "refresh drive
> mappings" command maybe?

Search for "NO_FSTAB_THREAD" in 
http://permalink.gmane.org/gmane.comp.version-control.git/141867

Hth,
Johannes

Olaf Klischat | 15 Jul 19:27 2011

Re: Bug: dynamically mounted USB drives inaccessible

Hello Johannes,

On 15 Jul., 01:07, Johannes Schindelin <Johannes.Schinde... <at> gmx.de>
wrote:
> Search for "NO_FSTAB_THREAD" inhttp://permalink.gmane.org/gmane.comp.version-control.git/141867

OK. So..what should I do? I added an environment variable named
NO_FSTAB_THREAD with value 1 in the Windows system control panel, and
it made no difference. The USB drive still doesn't become visible
until all msys bashes are stopped/restarted. The variable is visible
as $NO_FSTAB_THREAD in the bash processes; I can also set it in
~/.bash_profile etc, all to no avail.

Olaf Klischat | 16 Jul 19:47 2011

Re: Bug: dynamically mounted USB drives inaccessible

On Jul 15, 7:27 pm, Olaf Klischat <olaf.klisc... <at> googlemail.com>
wrote:
> OK. So..what should I do? I added an environment variable named
> NO_FSTAB_THREAD with value 1 in the Windows system control panel, and
> it made no difference. The USB drive still doesn't become visible
> until all msys bashes are stopped/restarted. The variable is visible
> as $NO_FSTAB_THREAD in the bash processes; I can also set it in
> ~/.bash_profile etc, all to no avail.

Update: It looks like it works sometimes, and/or with some USB sticks,
but not at other times. From my experiments it seems that in does work
in cases where the drive letter in question is visible in the Windows
Explorer permanently (labeled "removable drive" or similar), even
while the stick isn't plugged into the machine (the drive is just
inaccessible then), and it doesn't work in cases where the drive
letter appears/vanishes in Explorer when the stick is plugged in /
unplugged.

Is this possible? Does this description help you?

Thanks.

Johannes Sixt | 16 Jul 20:37 2011

Re: Re: Bug: dynamically mounted USB drives inaccessible

Please do not cull the Cc list. Then you are more likely to receive
feedback.

Am 15.07.2011 19:27, schrieb Olaf Klischat:
> Hello Johannes,
> 
> On 15 Jul., 01:07, Johannes Schindelin <Johannes.Schinde... <at> gmx.de>
> wrote:
>> Search for "NO_FSTAB_THREAD" inhttp://permalink.gmane.org/gmane.comp.version-control.git/141867
> 
> OK. So..what should I do? I added an environment variable named
> NO_FSTAB_THREAD with value 1 in the Windows system control panel, and
> it made no difference. The USB drive still doesn't become visible
> until all msys bashes are stopped/restarted. The variable is visible
> as $NO_FSTAB_THREAD in the bash processes; I can also set it in
> ~/.bash_profile etc, all to no avail.

The variable Johannes meant is named MSYS_WATCH_FSTAB, and it must be
set before the first MSYS program starts, i.e. via system settings.
.bash_profile is definitely too late.

But I am afraid it will not make a difference. The feature that the
environment variable controls is needed to distribute mount points among
MSYS programs when 'mount' is called explicitly. I don't know whether
MSYS is capable to detect USB drives that are plugged in at all.

-- Hannes

Olaf Klischat | 21 Jul 19:34 2011

Re: Re: Bug: dynamically mounted USB drives inaccessible

On Sat, Jul 16, 2011 at 8:37 PM, Johannes Sixt <j6t <at> kdbg.org> wrote:
> The variable Johannes meant is named MSYS_WATCH_FSTAB, and it must be
> set before the first MSYS program starts, i.e. via system settings.
> .bash_profile is definitely too late.
>
> But I am afraid it will not make a difference.

Indeed it doesn't.

> The feature that the
> environment variable controls is needed to distribute mount points among
> MSYS programs when 'mount' is called explicitly. I don't know whether
> MSYS is capable to detect USB drives that are plugged in at all.

So, what's so hard about it? Can't you just check whether the letter
exists everytime someone accesses /<letter>? Or is it just that no one
has written support for this yet?

Sebastian Schuberth | 22 Jul 14:04 2011
Picon

Re: Bug: dynamically mounted USB drives inaccessible

On 21.07.2011 19:34, Olaf Klischat wrote:

>> The feature that the
>> environment variable controls is needed to distribute mount points among
>> MSYS programs when 'mount' is called explicitly. I don't know whether
>> MSYS is capable to detect USB drives that are plugged in at all.
>
> So, what's so hard about it? Can't you just check whether the letter
> exists everytime someone accesses /<letter>? Or is it just that no one
> has written support for this yet?

This is something you should discuss upstream with the MINGW/MSYS guys. 
We're just using MSYS.

--

-- 
Sebastian Schuberth

Johannes Schindelin | 22 Jul 14:27 2011
Picon
Picon

Re: Bug: dynamically mounted USB drives inaccessible

Hi,

On Fri, 22 Jul 2011, Sebastian Schuberth wrote:

> On 21.07.2011 19:34, Olaf Klischat wrote:
> 
> > > The feature that the environment variable controls is needed to 
> > > distribute mount points among MSYS programs when 'mount' is called 
> > > explicitly. I don't know whether MSYS is capable to detect USB 
> > > drives that are plugged in at all.
> >
> > So, what's so hard about it? Can't you just check whether the letter 
> > exists everytime someone accesses /<letter>? Or is it just that no one 
> > has written support for this yet?
> 
> This is something you should discuss upstream with the MINGW/MSYS guys. 
> We're just using MSYS.

Well, if our hack to make life easier for cmd users is responsible, then 
not. I have a slight suspicion that plain MSys would detect the USB drive.

Ciao,
Dscho

Sebastian Schuberth | 22 Jul 14:56 2011
Picon

Re: Bug: dynamically mounted USB drives inaccessible

On Fri, Jul 22, 2011 at 14:27, Johannes Schindelin
<Johannes.Schindelin <at> gmx.de> wrote:

>> This is something you should discuss upstream with the MINGW/MSYS guys.
>> We're just using MSYS.
>
> Well, if our hack to make life easier for cmd users is responsible, then
> not. I have a slight suspicion that plain MSys would detect the USB drive.

It does not. I just checked with the plain MSYS environment installed
by mingwGitDevEnv [1] and the MSYS_WATCH_FSTAB variable set to 1.

[1] https://github.com/sschuberth/mingwGitDevEnv/

--

-- 
Sebastian Schuberth


Gmane