Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update /mnt #2237

Closed
strarsis opened this issue Jun 20, 2017 · 5 comments
Closed

Update /mnt #2237

strarsis opened this issue Jun 20, 2017 · 5 comments
Labels

Comments

@strarsis
Copy link

strarsis commented Jun 20, 2017

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Microsoft Windows [Version 10.0.15063]

  • What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)

ls /mnt

  • What's wrong / what should be happening instead:
    /mnt still contains outdated drive letter folders, newly connected drive not listed

When connecting/disconnecting/changing drives (e.g. external drive via USB3),
the /mnt directory is not updated, the old drive letters are still listed.
Also, trying to access the drive letter folder of a now non-existing drive results
in error ('argument not valid').

It would be great if changes to drives are reflected by /mnt automatically or
at least a command provided/documented that can be used to trigger an update.
Currently I have to open a new bash session to have /mnt updated.

@sunjoong
Copy link

When connecting/disconnecting/changing drives (e.g. external drive via USB3),
the /mnt directory is not updated, the old drive letters are still listed.

@strarsis - You look like to use the current public release of WSL and drives you mentioned above seem not to be the fixed ones. I think your drivers don't satisfy the first requirement from below quote from #1079 (comment);

  1. The drive must be a fixed drive (your drives satisfy this requirement)
  2. The drive must be formatted to NTFS (your drives to not satisfy this requirement).

#891 looks very similar to yours. The last comment of that issue, they mentioned about 16176, not 15063; 16176 is the insider preview builds of WSL, not a public release you're using on.

Also, trying to access the drive letter folder of a now non-existing drive results
in error ('argument not valid').

On 16176, I heard you could access "external drive via USB3" like E: drive after

$ sudo mkdir /mnt/e
$ sudo mount -t drvfs E: /mnt/e

@strarsis
Copy link
Author

Thanks for your answer!
The drives in question (which aren't updated) are NTFS formatted drives.
They are "fixed" as being normal HDDs, but they are connected over USB3 and
disconnected/reconnected while using Windows/Bash on Windows.

@sunjoong
Copy link

@strarsis - Haha... well... It looks like there are... confusion between "fixed" or "removable" :).

@rodrymbo
Copy link

I can usually get my USB3 and Veracrypt drives connected if I refrain from loading any bash window until after they are mounted in Windows. And there they are... So that might be a workaround.

Getting them to update in the WSL environment when you connect or disconnect in Windows seems to be a problem.

There's some capability newly added where you can use mount; that might be helpful.

@benhillis
Copy link
Member

If you'd like to see which drives are currently mounted in your WSL instance a better approach would be to read the /proc/mounts file.

benhill@BENHILL-DELL:~$ cat /proc/mounts
rootfs / lxfs rw,noatime 0 0
root /root lxfs rw,noatime 0 0
home /home lxfs rw,noatime 0 0
data /data lxfs rw,noatime 0 0
cache /cache lxfs rw,noatime 0 0
mnt /mnt lxfs rw,noatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,noatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,noatime 0 0
none /dev tmpfs rw,noatime,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,noatime 0 0
none /run tmpfs rw,nosuid,noexec,noatime,mode=755 0 0
none /run/lock tmpfs rw,nosuid,nodev,noexec,noatime 0 0
none /run/shm tmpfs rw,nosuid,nodev,noatime 0 0
none /run/user tmpfs rw,nosuid,nodev,noexec,noatime,mode=755 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noatime 0 0
C: /mnt/c drvfs rw,noatime 0 0
D: /mnt/d drvfs rw,noatime 0 0
S: /mnt/s drvfs rw,noatime 0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants