[Ms-nfs41-client-devel] WSL: Use ms-nfs41-client on WSL Linux?

Cedric Blancher cedric.blancher@gmail.com
Wed Oct 30 06:16:00 GMT 2024


On Tue, 29 Oct 2024 at 14:13, Martin Wege <martin.l.wege@gmail.com> wrote:
>
> Hello,
>
> How can I use ms-nfs41-client from a WSL Linux?

WSL does not mount anything except C: at boot time.

So you need to do a manual mount inside WSL.

Example 1, using drive letter N:
First mount NFS share in Windows's Cygwin terminal:
/sbin/nfs_mount  -o rw "N" nfs://31.48.17.20//lab/lab14/rundata/

Within WSL then mount Windows drive 'N':
mkdir /mnt/n
mount -t drvfs N: /mnt/n


Example 2, using UNC path:
/sbin/nfs_mount -o rw nfs://31.48.17.20//lab/lab14/rundata/

Within WSL then mount Windows drive
mkdir /mnt/rundata
mount -t drvfs '\\31.48.17.20@2049\nfs4\lab\lab14\rundata' /mnt/rundata

Just calling /sbin/nfs_mount without arguments will print you the UNC
path for each mount.

> Is this supported?

Yes, this is supported in the upcoming release of ms-nfs41-client,
with some limitations:
- Win32 QueryInformation types FileStatInformation (68) and
FileStatLxInformation (70) are not yet implemented, so uid/gid/mode
available in Cygwin are not available in WSL yet
- softlinks do not work (EPERM), likely because WSL probes
FileStatInformation&FileStatLxInformation at start, gets
STATUS_NOT_SUPPORTED and then treats it like a FAT drive.

Ced
-- 
Cedric Blancher <cedric.blancher@gmail.com>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur


More information about the Cygwin mailing list