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

Improve logical disk detection in WSL #1059

Closed
lmakarov opened this issue May 10, 2019 · 1 comment
Closed

Improve logical disk detection in WSL #1059

lmakarov opened this issue May 10, 2019 · 1 comment
Assignees
Labels

Comments

@lmakarov
Copy link
Member

Just ran into an edge case when the simplification done in
772f708#diff-41adca34c3eac75ca9453c7cb0634f6aL2496 fails.

/mnt/ in WSL has empty folders for all of the logical Windows drives that ever existed. If a drive is removed/disconnected (e.g. a USB disk) its letter is not cleaned up from /mnt/.

$ ls /mnt/
c  d

fin then tries to mount a non-existing drive:

Adding docker SMB share docksal-d...
mount: special device //192.168.64.1/docksal-d does not exist
exit status 32
              Mount command failed... Trying an alternative method...
mount: wrong fs type, bad option, bad superblock on //192.168.64.1/docksal-d,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
exit status 32
               ERROR:  SMB share mount failed.
         Make sure your Windows password is correct and run fin vm mount to try again.
         For troubleshooting instructions see https://docs.docksal.io/troubleshooting/windows-smb/

The older method, while not being elegant, is far for reliable:

$ wmic.exe logicaldisk get drivetype,name | grep 3 | awk '{print $2}' | sed 's/\r//g'
C:
@lmakarov lmakarov added this to To do in Docksal 1.12.2 via automation May 10, 2019
@lmakarov lmakarov self-assigned this Jun 1, 2019
@lmakarov
Copy link
Member Author

lmakarov commented Jun 5, 2019

Fixed in d433e24

@lmakarov lmakarov closed this as completed Jun 5, 2019
Docksal 1.12.2 automation moved this from To do to Done Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

1 participant