Score:1

Is there any way to see tmpfs devices mounted under WSL2/Ubuntu2004 from Windows?

in flag

I'm trying to run some tests against a large number of small-medium (<10KB) files. Everything is going fine, but now I'm at the point where I want to see what I can do with msys2 and github tools against those tmpfs mounts. Unfortunately I don't see any contents when I navigate to those locations over the local network share:

Windows10 screenshot of /mnt on Ubuntu 20.04

Windows10 screenshot of /mnt/ramdisktest 'this folder is empty'

From within WSL2/Ubuntu, however, you can see that the contents of the tmpfs are not empty:

_☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠_
| mattg@MSI:/mnt
|☣> cd ramdisktest/
_☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠_
| mattg@MSI:/mnt/ramdisktest
|☣> ll
total 4.0K
-rw-r--r-- 1 mattg 143 Feb 18 19:13 testfile
_☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠_
| mattg@MSI:/mnt/ramdisktest
|☣> pwd
/mnt/ramdisktest
_☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠_
| mattg@MSI:/mnt/ramdisktest
|☣> cat testfile
/home
/srv
/etc
/opt
/root
/lib
/mnt
/usr
/media
/lib64
/sys
/dev
/sbin
/boot
/bin
/run
/lib32
/libx32
/init
/proc
/snap
/tmp
/var
/lost+found
_☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠__☠_
| mattg@MSI:/mnt/ramdisktest
|☣>
NotTheDr01ds avatar
vn flag
Are you sure it isn't a permissions problem? I just did a tmpfs mount under WSL and I can see the files from Explorer using the `\\wsl$\<distro>` path. What about `/run`? That's a tmpfs that is mounted by the `/init`. Can you see the files in there from Windows? If so, compare the mount options and permissions.
in flag
@NotTheDr01ds I tried using options UID=1000 and GID too but nothing changed. I can't find any combination that changes anything in windows. The other options on the tmpfs files you mentioned aren't allowed for ramdisk mounts. I don't know what else to try.
NotTheDr01ds avatar
vn flag
Still noodling on this (as I'm sure you are as well). What's `grep ramdisktest /etc/mtab` show?
in flag
@NotTheDr01ds `tmpfs /mnt/ramdisktest tmpfs rw,relatime,size=102400k,uid=1000,gid=1000 0 0`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.