Jump to content
  • 3

WSL2 Support for drive mounting


malse

Question

Hi im using Windows 10 2004 with WSL2. 

I have 3x drives: C:\ (SSD), E:\ (NVME), D:\ (Drivepool of 2x 4TB HDD)

When the drives are mounted on Ubuntu, I can run ls -al and it shows all the files and folders on C and E drives. This is not possible on D

When I run ls -al on D, it returns 0 results. But I can cd into the directories in D stragely enough.

Is this an issue with drivepool being mounted? Seems like it is the only logical difference (aside from it being mechanical) between the other drives. They are all NTFS.

 

Edited by malse
Add tags
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

So as a follow up, it appears there are no plans to support WSL2 on drivepool at this point in time: https://community.covecube.com/index.php?/topic/5303-wsl-2-support/&do=findComment&comment=31779

I decided take a plunge to find out if WSL2 worked with Windows Storage Spaces. I came across this error 0x00000057, while doing anything within the GUI, so unfortunatley had to quickly get up to speed with creating the Storage Pool and Storage Spaces through PowerShell.

Long story short, it did not work with Storage Spaces. Maybe WSL2 does not like virtual drives???

I have temporarily resorted to a pooled storage using Dynamic Disks, set up with a Spanned Volume through Windows' Disk Management utility. I suppose this is sort of a virtual drive, but it works with WSL2. Spanned Volumes are basically DrivePool without arms and legs. You can't balance or choose where the data is stored on the drives, therefore if one disk is near EOL, the whole volume will need to be re-created.

 

While typing this up, I just realised I should have done a reset of docker to factory defaults first... <_< I might revisit storage spaces at a later date 

Link to comment
Share on other sites

  • 0

I ran WSL2 + Storage Space from August 2019 to March 2020. It works well. I ended up switching from Storage Space to DrivePool because it's really hard to diagnose Storage Space when it misbehaves. And when it does fail (and it will), it does so in spectacular fashion. I was bummed out about losing parity functionality but DrivePool + Snapraid is fine for my use case.

Anyway, I was able to use DrivePool with WSL2 (Docker) by mounting cifs volumes (windows shares). Here's an example:

version: '3.7'
services:
  sonarr:
    build: .
    container_name: sonarr
    volumes:
      - type: bind
        source: C:\AppData\sonarr\config
        target: /config
      - downloads:/downloads
    cap_add:
      - SYS_ADMIN
      - DAC_READ_SEARCH
volumes:
  downloads:
    driver_opts:
      type: cifs
      o: username=user,password=somethingsecure,iocharset=utf8,rw,nounix,file_mode=0777,dir_mode=0777
      device: \\IP\H$$\Downloads

Note that I'm building the image. This is because I need to inject cifs-utils into it. Here's the dockerfile:

FROM linuxserver/sonarr

RUN \
 apt update && \
 apt install -y cifs-utils && \
 apt-get clean

There are security considerations with this solution:

1. Adding SYS_ADMIN capability to the docker container is dangerous
2. You need to expose your drive/folders on the network. Depending on how your windows shares are configured, this may be less than ideal.

Hope this helps!

Link to comment
Share on other sites

  • 0
On 6/12/2020 at 10:54 AM, SPACEBAR said:

I ran WSL2 + Storage Space from August 2019 to March 2020. It works well. I ended up switching from Storage Space to DrivePool because it's really hard to diagnose Storage Space when it misbehaves. And when it does fail (and it will), it does so in spectacular fashion. I was bummed out about losing parity functionality but DrivePool + Snapraid is fine for my use case.

Anyway, I was able to use DrivePool with WSL2 (Docker) by mounting cifs volumes (windows shares). Here's an example:


version: '3.7'
services:
  sonarr:
    build: .
    container_name: sonarr
    volumes:
      - type: bind
        source: C:\AppData\sonarr\config
        target: /config
      - downloads:/downloads
    cap_add:
      - SYS_ADMIN
      - DAC_READ_SEARCH
volumes:
  downloads:
    driver_opts:
      type: cifs
      o: username=user,password=somethingsecure,iocharset=utf8,rw,nounix,file_mode=0777,dir_mode=0777
      device: \\IP\H$$\Downloads

Note that I'm building the image. This is because I need to inject cifs-utils into it. Here's the dockerfile:


FROM linuxserver/sonarr

RUN \
 apt update && \
 apt install -y cifs-utils && \
 apt-get clean

There are security considerations with this solution:

1. Adding SYS_ADMIN capability to the docker container is dangerous
2. You need to expose your drive/folders on the network. Depending on how your windows shares are configured, this may be less than ideal.

Hope this helps!

I know this is an older post - but I am starting to play around with WSL2 in my setup - and am having these same mounting issue's.  

What config file are you showing that configuration in?  Apologize for a potential basic question - but I am new to this.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...