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

wsl 2 can not use the mount path from dev drive #10792

Open
1 of 2 tasks
leolcao opened this issue Nov 19, 2023 · 44 comments
Open
1 of 2 tasks

wsl 2 can not use the mount path from dev drive #10792

leolcao opened this issue Nov 19, 2023 · 44 comments

Comments

@leolcao
Copy link

leolcao commented Nov 19, 2023

Windows Version

Microsoft Windows [Version 10.0.22621.2715]

WSL Version

1.2.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.90.1

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

  1. create the dev drive from dev home preview app, also from https://learn.microsoft.com/en-us/windows/dev-drive/
  2. the dev drive is set to E:, and path is set to D:\packages
  3. shutdown wsl by wsl --shutdown
  4. open the WSL2 Ubuntu 22.04 distro, input ls /mnt/d/packages
  5. error: ls: cannot access '/mnt/d/packages': Input/output error

This error affects the usage of wsl docker command from windows host directly, like:

wsl docker compose up

if there is volume binding in docker-compose.yml file from the path mount from dev drive, also failed, like: d:\packages\workdir:/opt/workdir, In before, it works and d:\packages\workdir will be converted to /mnt/d/packages/workdir in wsl distro

Besides, in the windows terminal setting, if I set the default startingDirectory to "d:\packages", the wsl terminall will failed also, but in before, wsl terminal can tell the startingDirectory, and convert to '/mnt/d/packages'

Expected Behavior

wsl 2 can use the path mount from dev drive like before.

Actual Behavior

leo@LeoCao-OMEN8Pro:~$ ls /mnt/d/packages/
ls: cannot access '/mnt/d/packages/': Input/output error

Diagnostic Logs

image

WslLogs-2023-11-22_22-03-38.zip

Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@leolcao leolcao changed the title wsl 2 can not use the mount patt from dev drive wsl 2 can not use the mount path from dev drive Nov 19, 2023
@OneBlue
Copy link
Collaborator

OneBlue commented Nov 21, 2023

/logs

@leolcao
Copy link
Author

leolcao commented Nov 22, 2023

/logs

Hi I uploaded the logs~

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 22, 2023

Thank you @leolcao. Looking at the logs I can see that you have a custom kernel. Can you see if you can reproduce the issue with the official kernel ? If so, please collect /logs again

@leolcao
Copy link
Author

leolcao commented Nov 24, 2023

I just updated the wsl to 2.0.9, and remove the custom kernel, unlucky, this issue still there~

> wsl -v
WSL 版本: 2.0.9.0
内核版本: 5.15.133.1-1
WSLg 版本: 1.0.59
MSRDC 版本: 1.2.4677
Direct3D 版本: 1.611.1-81528511
DXCore 版本: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows 版本: 10.0.22621.2715
[wsl2]
processors=10
memory=16GB
swap=0
localhostForwarding=true
kernelCommandLine=systemd.unified_cgroup_hierarchy=1 cgroup_no_v1=all
leo@LeoCao-OMEN8Pro:~$ ls /mnd/d/packages
ls: cannot access '/mnd/d/packages': No such file or directory

btw, the dev-drive is mount to F:, and it is no error if I use command like ls /mnt/e ls /mnt/f in the wsl ubuntu distro. This error is only for the mount path in the ntfs drive from one dev drive.

Actually, I have 2 dev drives:
E:(dev drive) --> D:\LeoCao\Projects
F:(dev drive) --> D:\packages(mount path in ntfs drive)

Both them has same issue.

WslLogs-2023-11-24_08-38-15.zip

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 28, 2023

@craigloewen-msft: Looks like we need to update p9rdr.sys to follow dev-drive mounts.

@GF-Huang
Copy link

Same issue. Dev Drive mount at D:\Dev\

>wsl --version
WSL 版本: 2.0.14.0
内核版本: 5.15.133.1-1
WSLg 版本: 1.0.59
MSRDC 版本: 1.2.4677
Direct3D 版本: 1.611.1-81528511
DXCore 版本: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows 版本: 10.0.22631.3296

image

image

@OneBlue
Copy link
Collaborator

OneBlue commented May 13, 2024

The issue is fixed with Windows 11 24H2 (the root cause of the issue is in the Windows image so the fix cannot be part of the WSL package).

@OneBlue OneBlue closed this as completed May 13, 2024
@pengweiqhca
Copy link

The issue is fixed with Windows 11 24H2 (the root cause of the issue is in the Windows image so the fix cannot be part of the WSL package).

Dev drive must have "Drive Letter".

@codekaizen
Copy link

The issue is fixed with Windows 11 24H2 (the root cause of the issue is in the Windows image so the fix cannot be part of the WSL package).

I tried the 24H2 release candidate Win11 build but the fsync error continues to appear on a Dev Drive.

@GF-Huang
Copy link

This issue is still present with 24H2, could you please reopen it :

Agree. Issue still.

版本	Windows 11 专业版
版本号	24H2
安装日期	‎2024/‎10/‎2
操作系统版本	26100.2033
体验	Windows Feature Experience Pack 1000.26100.23.0

@juchom
Copy link

juchom commented Oct 10, 2024

This issue is still present with 24H2, could you please reopen it :

Windows information

nu> wsl -v
WSL version: 2.3.24.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.2033

Docker information

nu> docker -v
Docker version 27.2.0, build 3ab4256

DevDrive information

nu> fsutil devdrv query d:
This is a trusted developer volume.

Developer volumes are protected by antivirus filter.

Filters currently attached to this developer volume:
    WdFilter

If you run this command :

docker run --rm --name pg-test -e POSTGRES_PASSWORD=Pwd12345! -v d:/dev/pgtest:/var/lib/postgresql/data -p 5432:5432 postgres:15.8

You will have this output

chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted

I also tried this according to this doc : https://learn.microsoft.com/en-us/windows/dev-drive/#filters-for-common-scenarios

Adding filters for Docker: Running containers out of Dev Drive bindFlt, wcifs

fsutil devdrv setfiltersallowed /f /volume D: "bindFlt, wcifs"

Make sure they are present

nu> fsutil devdrv query d:
This is a trusted developer volume.

Developer volumes are protected by antivirus filter.

Filters allowed on this developer volume:
    bindFlt, wcifs

Filters currently attached to this developer volume:
    WdFilter

Full reboot of the system and same issue.

@kirk-marple
Copy link

kirk-marple commented Oct 11, 2024

This may have broken with a recent Win11 update; this had been working perfectly for months, and last night my system installed a Windows Update and now I can't access anything from my Dev Drive using WSL2.

WSL version: 2.3.24.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26100.2152

@PhiliaTheCat
Copy link

Same issue on my system after a recent system update. Seems that update breaks the compatibility. I think this worth a reopening.

@OneBlue
Copy link
Collaborator

OneBlue commented Oct 15, 2024

Reopening due to reports of the issue not being resolved.

@juchom / @kirk-marple, can you capture /logs of the issues you're seeing ?

@theAeon
Copy link

theAeon commented Oct 15, 2024

another +1 on the pile

Edition Windows 11 Education
Version 24H2
Installed on ‎5/‎23/‎2024
OS build 26100.2152
Experience Windows Feature Experience Pack 1000.26100.32.0

@juchom
Copy link

juchom commented Oct 16, 2024

Here are the logs for my case

Reopening due to reports of the issue not being resolved.

@juchom / @kirk-marple, can you capture /logs of the issues you're seeing ?

WslLogs-2024-10-16_10-57-38.zip

@Tony763
Copy link

Tony763 commented Oct 16, 2024

Same issue on linux. (Ubuntu 24.10)

/var/lib/postgresql/14 is mounted volume.

chown -R postgres:postgres /var/lib/postgresql/14/main 
chown: cannot read directory '/var/lib/postgresql/14/main/pg_serial': Permission denied
chown: changing ownership of '/var/lib/postgresql/14/main/postmaster.pid': Operation not permitted
...

@ishpagin
Copy link

ishpagin commented Oct 16, 2024

+1

Image

@kirk-marple
Copy link

Reopening due to reports of the issue not being resolved.

@juchom / @kirk-marple, can you capture /logs of the issues you're seeing ?

My logs are linked to my report of this issue:
#12156

@Nehcknarf
Copy link

I met same problem after update to win11 26100.2161
<3>WSL (1522) ERROR: CreateProcessCommon:551: chdir(/mnt/d/PycharmProjects/) failed 13

@fgroen
Copy link

fgroen commented Oct 25, 2024

Another +1, went from a working setup on win11 insider previer (10.0.26120.2130) to a fresh win11 enterprise install (10.0.26100.2161).
Now WSL cannot access that ReFS drive.

@cloud-yu
Copy link

win11 26100.2033 works well, after install KB5044384 , DevDriver mount failed in wsl2

@kirb
Copy link

kirb commented Oct 28, 2024

Also confirming, doing a System Restore to before KB5044384 (2024-10 Cumulative Update Preview for Windows 11 Version 24H2, build 26100.2161) was installed solved this for me. It will not be listed in the Uninstall Updates page, and trying to do so manually with wusa.exe will say it's "required by your computer and cannot be uninstalled". I also disabled "Get the latest updates as soon as they're available" after the reboot.

The release notes list a new feature for VHDs that I could imagine is related to the issue.

@ocdi
Copy link

ocdi commented Oct 28, 2024

I was able to uninstall the KB using this command, which fixed WSL for me

wusa /uninstall /kb:5044384

@PhiliaTheCat
Copy link

PhiliaTheCat commented Oct 28, 2024

As everything mentioned above, there are ways to bypass the problem. But it doesn't make sense to rollback the system for this, since we have updates based on that KB5044384.
It's impossible to keep unupdated, which will cause serious security issue.

@paule96
Copy link

paule96 commented Oct 29, 2024

@PhiliaTheCat can you describe the bypasses? Would be nice to have workarounds, that doesn't require to leave REFS drivces and copy all to another drive

@ocdi
Copy link

ocdi commented Oct 30, 2024

Yeah I am keen for a permanent solution. I've had to Pause updates to prevent KB5044384 from coming back.

@yevon
Copy link

yevon commented Oct 31, 2024

Exactly same issue here. I had to revert update KB5044384 as being unable to access files stored in a windows dev drive within WSL. After that I completely lost internet connectivity in Ubuntu under latest version of WSL (2.3.24) And I had to downgrade WSL to 2.2.4 and restart the computer. Now everything works. I was going crazy with this, as I thought it was permissions problem.

@alainosorio
Copy link

I was able to uninstall the KB using this command, which fixed WSL for me

wusa /uninstall /kb:5044384

Yeah I am keen for a permanent solution. I've had to Pause updates to prevent KB5044384 from coming back.

I can confirm this works

@matt-gribben
Copy link

I've just run into this error today, Windows 11 Pro 10.0.26.26100.2161, however I'm getting an Error 0x800f0825 when attempting to remove the offending kb:5044384

@vietbn82
Copy link

vietbn82 commented Nov 7, 2024

I was able to uninstall the KB using this command, which fixed WSL for me

wusa /uninstall /kb:5044384

It works for me. You saved my day

@nicholashead
Copy link

The uninstall worked - however now there's a new update - KB5046617 - that seems to fix dev drive issue - however since I did wusa /uninstall /kb:5044384 it appears the new update is failing - Windows Update says error 0x800f0991 - any ideas on how to fix? :)

@HerrLiljegren
Copy link

The uninstall worked - however now there's a new update - KB5046617 - that seems to fix dev drive issue - however since I did wusa /uninstall /kb:5044384 it appears the new update is failing - Windows Update says error 0x800f0991 - any ideas on how to fix? :)

just a random thought, does /install work instead of uninstall?

wusa /install /kb:5044384

@nicholashead
Copy link

The uninstall worked - however now there's a new update - KB5046617 - that seems to fix dev drive issue - however since I did wusa /uninstall /kb:5044384 it appears the new update is failing - Windows Update says error 0x800f0991 - any ideas on how to fix? :)

just a random thought, does /install work instead of uninstall?

wusa /install /kb:5044384

Unfortunately no it doesn't work that way. I also tried downloading the KB5044384 files from Windows catalog and installing them (and then hoping to install latest) - but it fails with same error on trying to install KB5044384.

Has anyone else been able to update with today's update that had uninstalled KB5044384?

@yevon
Copy link

yevon commented Nov 13, 2024

Seems that this is solved in update KB5046617 by its release notes.

@PhiliaTheCat
Copy link

The uninstall worked - however now there's a new update - KB5046617 - that seems to fix dev drive issue - however since I did wusa /uninstall /kb:5044384 it appears the new update is failing - Windows Update says error 0x800f0991 - any ideas on how to fix? :)

just a random thought, does /install work instead of uninstall?
wusa /install /kb:5044384

Unfortunately no it doesn't work that way. I also tried downloading the KB5044384 files from Windows catalog and installing them (and then hoping to install latest) - but it fails with same error on trying to install KB5044384.

Has anyone else been able to update with today's update that had uninstalled KB5044384?

Just a guess, if Windows Update works in a way like git, where deltas between different versions are logged, then perhaps a full rollback will solve the problem.

@yevon
Copy link

yevon commented Nov 13, 2024

I'm unable to install the new update or reinstall the prior one... God... Error - instalación 0x800f081f

@alirezanet
Copy link

alirezanet commented Nov 13, 2024

I can confirm after installing the new update it has been fixed 💐 (KB5046617)

@yevon
Copy link

yevon commented Nov 13, 2024

Just using restore pc right now -> Correct problems with windows update, reinstall windows. Nothing works, I'm unable to install the update. I guess this will work:
Image

@yevon
Copy link

yevon commented Nov 13, 2024

Not even that works, it is unable to reinstall windows. "Unable to install because it's not ready for the device". Windows 11 is a disaster of quality, years suffering issues without solutions. Even the new photos gallery in windows explorer full of memory leaks that makes explorer to explode when scrolling, the new task manager that is laggy and slower than before, the windows store... Image

@yevon
Copy link

yevon commented Nov 13, 2024

Finally I had to create an USB media creation tool with windows 11 and reinstall it from there. Booting directly from the USB didn't allow me to reinstall windows 11 keeping programs and files, I had to run it directly from windows from the usb. Another nonsense, not even the included windows reinstall option works and you have to manually create an usb...

  • Reinstall windows from restore pc is not even working in 24H2
  • Booting from USB doesn't allow you to reinstall windows as you can do by just running the installer within windows.

The usb media creation tool directly installed this update, fixed at least...

@sorbonad
Copy link

Yesterday's windows update fixed the issue. Thanks.

@nicholashead
Copy link

What's funny is retrying the update again today - and now it worked/installed!

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