Skip to content

DriveInfo.DriveType reports "unknown" in Windows Subsystem for Linux #18487

Description

@ericeil

Running on Ubuntu in Windows Subsystem for Linux, on rs_prerelease build 14915, DriveInfo.DriveType reports "Unknown" for both the Linux file system (/, /usr, etc.) and mounted Windows drives (/mnt/c, etc). I would expect it to report "fixed" for at least the Linux file system, and preferably the mounted Windows drives as well.

The df -T command reports file system names for these, so apparently there is some info available:

Filesystem     Type  1K-blocks      Used Available Use% Mounted on
rootfs         lxfs  498859004 167549372 331309632  34% /
data           lxfs  498859004 167549372 331309632  34% /data
cache          lxfs  498859004 167549372 331309632  34% /cache
mnt            lxfs  498859004 167549372 331309632  34% /mnt
none           tmpfs 498859004 167549372 331309632  34% /dev
none           tmpfs 498859004 167549372 331309632  34% /run
none           tmpfs 498859004 167549372 331309632  34% /run/lock
none           tmpfs 498859004 167549372 331309632  34% /run/shm
none           tmpfs 498859004 167549372 331309632  34% /run/user
none           drvfs 498859004 167549372 331309632  34% /mnt/c

(note that / is "lxfs" and /mnt/c is "drvfs."

This causes a failure in the DriveInfo tests (in DriveInfoUnixTests.PropertiesOfValidDrive). I'll be conditionally disabling that test for now.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-System.IObugdisabled-testThe test is disabled in source code against the issuehelp wanted[up-for-grabs] Good issue for external contributorsos-windows-wslWSL (Windows Subsystem for Linux) OS - Linux binaries running on Windows

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions