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

WSL2 Not all drives mounted in /mnt #6286

Closed
ad-on-is opened this issue Nov 27, 2020 · 10 comments
Closed

WSL2 Not all drives mounted in /mnt #6286

ad-on-is opened this issue Nov 27, 2020 · 10 comments

Comments

@ad-on-is
Copy link

I just encountered, that only C:/ drive is mounted on /mnt/c, but all other drives (D,E,F, ...) are not.

C - internal drive - mounted
D - internal drive - not mounted
E - external drive (USB) - not mounted

I don't know what caused the issue, but after wsl --shutdown everything is mounted back again.

@caleb15
Copy link

caleb15 commented Apr 17, 2021

I ran into the same issue. I have a NTFS volume I mounted as a additional drive after launching WSL2, but it doesn't show up in /mnt/, even after restarting WSL2.

caleb@DESKTOP-AE53KE4:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal
caleb@DESKTOP-AE53KE4:~$ ls /mnt
c  wsl

Doing a full shutdown with wsl --shutdown and relaunching Ubuntu fixed it.

@pxcandeias
Copy link

The exact same thing is happening to me. Laptop with two internal drives, C: and D:, the latter is not mounted. Must always perform wsl --shutdown and relaunch Ubuntu again.

I am running Windows 10 Home, version 21H1, compilation 19043.928 with Windows Feature Experience Pack 120.2212.3530.0

@flatline-studios
Copy link

flatline-studios commented Jun 27, 2021

Same issue here.

Adding a manual entry to the /etc/fstab file, or using wsl --shutdown && wsl fix the issue, but there shouldn't really be an issue.

Edition	Windows 10 Pro
Version	21H1
Installed on	‎28/‎04/‎2021
OS build	19043.1081
Experience	Windows Feature Experience Pack 120.2212.3530.0
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal
Linux LAPTOP-2 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I should probably mention that the order of events was:

  1. Install WSL2
  2. Install Ubuntu-20.04 from the Windows Store
  3. Format D:\ drive as NTFS

I don't know if it would have worked, if the second hard drive existed before Ubuntu was installed... Just an idea.

I have the following in my /etc/fstab:

D:      /mnt/d  drvfs   defaults        0       0

Which fixes the problem, but as this is clearly a bug, I thought I'd throw my hat in to the ring, and provide a few more details.

@bradkrane
Copy link

I had the same issue it required a wsl --shutdown then relaunch and then all of the new HDD mount points are available.

@moreje
Copy link

moreje commented May 12, 2022

Hi,
I have a comparable issue...but with another variant ;)
I have a network drive Z: mounted in windows
Locally, I can mount this drive in my wsl2 Ubuntu and access it through /mnt/z (after editing fstab, this is permanent and functionnal)
BUT
if I SSH to this Ubuntu:
Z: is not seen and cannot be mounted in /mnt/z
no problem with C: and /mnt/c
any ideas?

@bitekas
Copy link

bitekas commented Jan 3, 2023

Same issue, the drive 'i' is empty. Worth mentioning, the drive is a Google Drive endpoint. Maybe it is initialized later than WSL upon the system start? Other drives (including mounted Google Drives) are mounted in WSL fine. wsl --shutdown fixes the issue until next reboot.

@LiamKarlMitchell
Copy link

LiamKarlMitchell commented Jan 24, 2023

Same issue after running wsl --update I suspect.
Mount does not seem to persist when windows is updated, so I have to keep naming a new volume each restart.

When I did the wsl --shutdown and restarted it, the Ubuntu could not use docker for commands like docker ps as the socket was not created/found even though Ubuntu is enabled under docker desktop WSL integrations.

volumes:
  files-data6:
    driver: local
    driver_opts:
      o: bind
      type: none
      device: /e/Files

@LiamKarlMitchell
Copy link

Happened again after an unexpected restart.
Maybe it is a timing issue, if WSL2 launches quickly after startup?

wsl --shutdown

Then clicking yes on docker desktops popup to restart wsl2 backend made it work again.

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

@Angelinsky7
Copy link

I need to this wsl --shutdown after every startup of window 11.
Is there anyone that have found a solution for this ?

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

No branches or pull requests

10 participants