-
Notifications
You must be signed in to change notification settings - Fork 830
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
Enable complete mounting of RAID devices #5999
Comments
Samba would work well for the moment if either:
Really, really frustrating, as the performance is very good, and I avoid third party drivers which do not even exist afaik for my use case, but the inconvenience with this 'hack' is major... Edit: for the moment, I do it using Samba and a set of scripts, I do not like it, but I wanted it now, I specifically installed 20221 just for this. |
Do Samba over in discussions; you'll bury your own ask here. |
I just ran into the same issue. Building a docker container to run a custom software that requires RAID. |
The reason why you don't see the files is the Windows explorer is because wsl distros use two mount namespaces: One for admin (elevated) shells, and one for non-admin shells. When accessing The simplest solution around that is to create the mountpoint under I also acknowledge the ask for enabling DM_RAID in the kernel. |
Wow, did not know about that and the reason behind it. Excellent, that’s a pretty good workaround, thanks for letting me know, it will serve good in the mean time. I also hope the team will notice and address the broader issue. |
I'm in a very similar situation as the original issuer. I mounted a 3 disk btrfs RAID5 inside a WSL2 linux instance, but in windows, it wasn't visible. (Empty directory) So, after reading what @OneBlue said, I mounted it at I tried changing the default login user to root, and changing the permission settings on the mount path, to no avail. Also, the |
@botiapa: Interesting, there might be another issue here. Can you collect logs so we can have a look ? |
@OneBlue I'm sorry but I'd rather not collect logs due to privacy reasons. Is there anything else I could provide you with that could help in investigating the issue? |
That's no problem! I do want to let you know that logs submitted via Feedback Hub adhere to Microsoft's Privacy Policy, and are not publicly available for other users to see, they can only be viewed by Microsoft employees if that helps with your decision to submit logs. Unfortunately, I can't think of a way to diagnose the error you're seeing without looking at the logs, but if something does come up I'll be sure to ping this thread. Thank you @botiapa ! |
@OneBlue After hesitating for a few days, I finally decided, that I'll submit feedback via the Feedback Hub. Here's the link to it: https://aka.ms/AAajdyv Tell me if you need me to include anything else. |
Thank you @botiapa. Unfortunately I can't see the repro logs in the feedback link you posted. Can you confirm you did 'Recreate the problem' when creating the feedback item ? If not, please publish another one with a problem recording so the logs are attached. |
FWIW, I just did the |
Could you please elaborate? I have one of two mirrored (RAID-1) linux disks, connected (via USB-SATA connector) to Windows-11 laptop with WSL2/Ubuntu enabled. I've succeed to mount the disk to WSL with |
This isn't free technical support. |
What’s the point of this comment? There’re sites like speedtest.net where you can test your Internet connection, no need to spam here with mean remarks. |
Is your feature request related to a problem? Please describe.
Recently, WSL2 got support for mounting physical disks, which is great. I have 2 disks from a previous Ubuntu server that were set up in software RAID1 in Linux (partition type "linux_drive_member"), and decided to leverage the recently added support and have them show up in Windows, instead of switching their file system to something like NTFS, which Windows supports natively (risk of losing files etc). I could mount the disks using:
Then, in Linux, I tried assembling the array using mdadm:
sudo mdadm --assemble /dev/md0 /dev/sdc1 /dev/sdd1
, but the following error is returned:That's because the wsl2 kernel is compiled without RAID support. To fix this, one has to clone the kernel from WSL2-Linux-kernel, run
make KCONFIG_CONFIG=Microsoft/config-wsl menuconfig
, choose "Device Drivers - Multiple devices driver support (RAID and LVM)", and from there, press y on "RAID support", and, in my case, "RAID-1 (mirroring) mode". Then,make KCONFIG_CONFIG=Microsoft/config-wsl
to compile the kernel, and set it as the loaded kernel as described here: https://docs.microsoft.com/en-us/windows/wsl/wsl-config.Now, when running mdadm, it succeeds. What remains is to mount /dev/md0 (for me, it is an ext4 partition) to some directory, in my case:
sudo mount /dev/md0 /mnt
. All works well, files can be accessed from wsl2. The problem is that when using File Explorer to go to "\\wsl\Ubuntu\mnt", the directory is empty. This is kind of expected, but how to go about it? How to mount things in Linux so that they get mounted in the wsl$ network share as well, and be available from Windows? I tought about specifing it in /etc/fstab and specifying themountFsTab
option in .wslconfig, but the array is not ready at boot (I have to execute those 2 "wsl.exe --mount ..." commands to mount the physical disks inside WSL).Describe the solution you'd like
Most importantly, a way to properly mount things in WSL and have them show up in Windows, using the network share, as well. Also, you could enable RAID support for the kernel by default, although it was not that hard to compile it (took 4 minutes), and maybe that's not required for most users and you aim for a lightweight kernel after all.
Describe alternatives you've considered
For now, I'll install samba and temporarily have the folder available though that in Windows, although I do not like it as I have to spend time configuring it.
Additional context
Thanks for the great work you are doing.
The text was updated successfully, but these errors were encountered: