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

Doesn't automount drive letter mounted shares #285

Open
zyrain opened this issue Sep 6, 2023 · 4 comments
Open

Doesn't automount drive letter mounted shares #285

zyrain opened this issue Sep 6, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@zyrain
Copy link

zyrain commented Sep 6, 2023

Bug description

In windows I have SMB shared mapped to drive letters. On the WSL side, I only have physical drive letters (like C) and special driver ones (like google drive), normal SMB shares don't exist.

To Reproduce

Steps to reproduce the behavior: Create a windows share and map it to a drive letter.

Expected behavior
I expect the mapped drive letters to show up under /mnt/ just like the others.

This can be manually fixed with mounting with type drvfs in the filesystems config, but getting the filesystem options (like metadata and uid/gid) correct is error-prone.

@zyrain zyrain added the bug Something isn't working label Sep 6, 2023
@zyrain
Copy link
Author

zyrain commented Sep 6, 2023

Additionally, when I do add the mount options to the filesystems configuration, it doesn't automount on boot (fails), yet, after boot, a sudo mount -a will mount it correctly.

fileSystems."/mnt/z" = {
device = "Z:\";
fsType = "drvfs";
options = [ "metadata" "uid=1000" "gid=100" "noatime" ];
};

@nzbr
Copy link
Member

nzbr commented Sep 9, 2023

I'm not aware that this works on any WSL distro, so I'd say this is a bug on Microsofts side and not introduced by us. At least I just tested it on Ubuntu and the network drives aren't present there either

I didn't even know that it's possible network drives through WSL at all, to be honest - so thanks for enlightening me

@terlar
Copy link
Contributor

terlar commented Nov 14, 2023

I have auto-mounting working like this:

fileSystems."/mnt/j" = {
  device = "J:";
  fsType = "drvfs";
};

Perhaps it doesn't like the \?

Or was the issue specifically with the options? Never tried mounting with options.

@nzbr
Copy link
Member

nzbr commented Nov 20, 2023

I had guessed that it's because the network drives aren't available yet when NixOS tries to mount then. But the backslash might be a problem as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants