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

Mounting your home directory using drvfs on a samba share causes horrible, horrible problems #8121

Closed
1 of 2 tasks
kaysond opened this issue Mar 4, 2022 · 4 comments
Closed
1 of 2 tasks

Comments

@kaysond
Copy link

kaysond commented Mar 4, 2022

Version

Microsoft Windows [Version 10.0.19043.1526]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.60.1

Distro Version

Ubuntu 20.04

Other Software

No response

Repro Steps

  1. Set up a samba share
  2. Map the samba share as a network drive (this may be optional - I did it to save the proper credentials)
  3. Open WSL and mount the samba share as your home directory (e.g. sudo mount -t drvfs //host/share /home/$USER)

Expected Behavior

Terminal works mostly normal

Actual Behavior

If you try to do this in your fstab, launching WSL via Windows Terminal directly gives an Access Denied error. Launching via cmd/powershell gets you a functional terminal, but it's awfully slow. Taking it out of our fstab and mounting it manually after the fact allows you to get in, but again, things are horribly slow.

Also, the whole WSL file system seems to become read-only (or has some weird permissions issue). This happens both from within the terminal and via the \\wsl$\ share

Interestingly, if I mount it elsewhere, performance in that filesystem itself seems to be quite good. I'm guessing it's a massive permissions clusterf##k?

My goal here is to share my home directory between WSL and the rest of my Linux infrastructure (where it's much easier to do so via nfs!)

Diagnostic Logs

Tried to get logs while it's in this state, but the Feedback Hub "recording" wouldn't start. Running it manually as suggested gives me the following:

        Access is denied.

        Profile Id: WSL.Verbose.File

        Error code: 0x80070005

        Access is denied.
@ghost
Copy link

ghost commented Mar 16, 2022

@kaysond just out of curiosity, when you tried mounting it as a network drive via mount -t drvfs did you escape the windows network drive name, either as sudo mount -t drvfs '\\host\share' or sudo mount -t drvfs \\\\host\\share? Just want to clear that out of the way before digging deeper. Lmk if that helps!

@kaysond
Copy link
Author

kaysond commented Mar 19, 2022

@owenschupp I used forward slashes //host/share because the host name starts with 3 and I couldn't figure out how to properly escape \\3 in /etc/fstab (which is how I started trying to do the mount) because it kept turning \3 into some other character.

@kaysond
Copy link
Author

kaysond commented Jul 13, 2022

@owenschupp any ideas how to debug this further? Just set it all up again, and its still a mess! Interestingly, I get slightly different (improved, maybe?) behavior when I map the network drive in Windows, then mount via Z: instead of //host/share.

I also noticed that on occasion, I get a error: Error when renaming history file: No such file or directory message from my shell. This makes me think that for whatever reason, the drvfs mount is intermittently not providing access to the underlying files.

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!

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

No branches or pull requests

1 participant