WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Input/output error on Windows disk mount to path

Open glstewart opened this issue 8 years ago • 18 comments

I have a development disk mounted in Windows to the path C:\Dev instead of a drive letter. However, I can't see any of the files on this disk from the bash shell. WSL seems to be missing support for path-mounted disks.

/mnt/c$ cd Dev -bash: cd: Dev: Input/output error

Versions: Windows 10 Version 1803 (10.0.17134.48). 4.4.0-17134-Microsoft

glstewart avatar May 29 '18 22:05 glstewart

I'm not too familiar with disks mounted to path, but based on your description, it seems Box sync is doing the same.

The issue is raised here:

https://community.box.com/t5/Desktop-and-Mobile-Forum/Box-Sync-folder-accessibility-through-Windows-Subsystem-for/td-p/61212

I can easily get to this folder in the Windows command line at the default directory C:\Users<username>\Box (for example, I can cd \Users<username>\Box and access the folder. However, this same folder is inaccessible from the Linux command line

The solution the user has found is:

I have found out that the default location of the Box Sync folder is inaccessible to WSL. I have reinstalled Box Sync and placed it inside the Documents folder, where it is now accessible!

I would also be interested to access this folder without using the work-around described above.

Versions: Windows 10 Version 1809 (Build 17763.195).

kinekt4 avatar Jan 02 '19 11:01 kinekt4

Possibly a known issue related to this: #1475

kinekt4 avatar Jan 02 '19 23:01 kinekt4

the same issue

/mnt/c$ ls ls: ls: cannot open directory '.': Input/output error

versions: windows10 Version [10.0.18950.1000]

rexming avatar Aug 08 '19 09:08 rexming

I solved this problem on my Windows 10 ( version: 18950.1000 ) by runningwsl --shutdown, and then wsl in the powershell!

walshzhang avatar Aug 11 '19 05:08 walshzhang

confirmed that wsl --shutdown followed by wsl fixes it - however, if you're running the docker desktop WSL2 preview, it permanently disconnects you and the only remedy is a full restart.

tobybellwood avatar Aug 12 '19 21:08 tobybellwood

however, if you're running the docker desktop WSL2 preview, it permanently disconnects you and the only remedy is a full restart.

The following works if you want Docker WSL 2 Preview up and running after WSL restart:

  1. Exit Docker Desktop
  2. Stop the service "Docker Desktop Service" from services.msc
  3. Start Docker Desktop again

You can now start WSL 2 Tech Preview from inside Docker again.

@tobybellwood

KristianI avatar Aug 27 '19 08:08 KristianI

You may also be able to stop the Docker WSL2 service before shutting down WSL, which makes it a couple of steps easier

tobybellwood avatar Aug 27 '19 10:08 tobybellwood

I am experiencing this problem on both WSL and WSL2. Running build 19041.264. The "wsl --shutdown, re-run wsl from powershell" doesn't solve it in my case.

MaineTim avatar Jun 02 '20 20:06 MaineTim

Hm, in my case wsl --shutdown helped to fix the issue without rebooting.

strarsis avatar Jun 22 '20 12:06 strarsis

Although "wsl --shutdown and re-run wsl" helps, it's not perfect as I get used to shutdown my PC when I don't use it which means I have to do this every time I boot up. This also causes Docker for Win (with WSL2 backend) notifying me to restart docker and it's annoying too. So is there any workaround or fix to solve the problem now?

lonelyion avatar Jul 28 '20 01:07 lonelyion

+1, this is annoying, wsl --shutdown doesnt help me. I'm running Windows version 19041.388 with WSL2 Ubuntu 20.04 LTS

EthanHaid avatar Aug 08 '20 20:08 EthanHaid

After restart pc, problem seems to be appeared. However running wsl --shutdown seems to fix.. Its a bit annoyinng to do this every time you open the pc. Is there any solution around applied by someone here?

thanosalexander avatar Aug 15 '20 19:08 thanosalexander

After restart pc, problem seems to be appeared. However running wsl --shutdown seems to fix.. Its a bit annoyinng to do this every time you open the pc. Is there any solution around applied by someone here?

I just encountered this issue after boot randomly. I tried the wsl --shutdown procedure posted and it did not work for me. Uninstalling and reinstalling VSCode (without rebooting in between) worked though - hoping that it remains functional across future restarts.

radusuciu avatar Sep 05 '20 17:09 radusuciu

I had to run VSCode as administrator to get past this issue.

constrictor14 avatar Oct 22 '20 16:10 constrictor14

It’s not only about VScode . It happens even if you just run a ll /mnt after open pc. You’ll notice that mounts didn’t worked, so this is the reason it drops this error. After run wsl —shutdown It is ok for me. But its not a correct and permanent solution

thanosalexander avatar Oct 22 '20 18:10 thanosalexander

Just to add my solution to this:

Restarting the "LxssManager" windows service (which hosts WSL) via the windows "Services" control panel fixed it for me, no system restart required :)

dupski avatar Mar 03 '23 13:03 dupski

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!

As a work around to solve my ever growing disk space needs for Docker, was to create a symbolic links for both rancher-desktop and rancher-desktop-data wsl instances in: %LOCALAPPDATA%\rancher-desktop

  1. close Rancher Desktop
  2. wsl --shutdown
  3. move *%LOCALAPPDATA%\rancher-desktop\distro-data" and "%LOCALAPPDATA%\rancher-desktop\distro" to a new location
  4. Create symbolic links to the moved folders
mklink /d "%LOCALAPPDATA%\rancher-desktop\distro-data" "<my new location distro-data>"
mklink /d "%LOCALAPPDATA%\rancher-desktop\distro" "<my new location> distro"

pit-hub avatar Aug 30 '24 16:08 pit-hub