You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I would like to compress the backup in a tar.gz archive per these instructions, and I would like to store that archive in my Google Drive File System (GDFS). My GDFS is located in my windows file system in the G: drive. However, when I try to view this drive, I am met with the following:
rjh336@LAPTOP-ETTS75F8:/mnt/g$ ls /mnt
c d g
rjh336@LAPTOP-ETTS75F8:/mnt/g$ cd /mnt/g
rjh336@LAPTOP-ETTS75F8:/mnt/g$ ls -la
ls: reading directory '.': Function not implemented
total 0
Upon trying to save an archive in that location, I see a similar error message:
rjh336@LAPTOP-ETTS75F8:~$ tar -cvpzf /mnt/g/backup.tar.gz --exclude=./test_src/exclude_folder ./test_src/
tar (child): /mnt/g/backup.tar.gz: Cannot open: Function not implemented
tar (child): Error is not recoverable: exiting now
./test_src/
./test_src/.folder_hidden/
./test_src/.folder_hidden/.hid_file
./test_src/.hidden
./test_src/file.txt
./test_src/folder_visible/
Is there a proper way to mount the Google File System from windows? Or perhaps a way to mount this drive directly on WSL? I checked the File system on G: and it says it is "FAT32". Any advice is greatly appreciated!
Reacted by Taylor Paul, Rod Galvao, YenForYang, Andy Johnson, Christian Fosli, Bas van den Wollenberg, Chester, Phillip Wei, Gabriel Fair, Jayen Ashar and 34 more
Reacted by Brian Boatright, pseudo, fred271828, Gabriel Lencioni Lovate, Zsombor Foldesi, Ranvir Singh, Wes Mason, C2N14, FlorianS, Benyamin Limanto and 3 more
Variation on #2896 (VirtualBox additions shared folder) #2163 (WebDAV) #1962 (Windows NFS and/or Dokany) #579 (EXT2FSD). WSL DrvFS can only grok certain Windows filesystems presently.
I currently have Windows 10 build 16299. I installed Google Drive File Stream, and my Google Drive is visible as I: under Windows. When I launch a WSL bash shell, this is getting automatically mounted as "/mnt/i". While I also get the "Function not implemented" error, I have found that I can nevertheless change into subdirectories and read/write files via DrvFS to Google Drive, I can even do "ls -l" on a specific file without getting any errors.
I just can't read directory entries, which obviously makes the filesystem a little difficult to use!
Running strace shows that getdents() is the system call which is failing:
richard@Richard-Works:/mnt$ ls
ls: cannot access 'g': Invalid argument
c d g z
--------------------------
richard@Richard-Works:/mnt$ cd /mnt/g
--------------------------
richard@Richard-Works:/mnt/g$ ls
ls: cannot open directory '.': Invalid argument
--------------------------
richard@Richard-Works:/mnt/g$ cd ..
--------------------------
richard@Richard-Works:/mnt$ sudo mount -t drvfs G: /mnt/g
--------------------------
richard@Richard-Works:/mnt$ cd g
--------------------------
richard@Richard-Works:/mnt/g$ ls
ls: reading directory '.': Function not implemented
All of these issues are caused by file systems that either do not support some of the functionality DrvFs is trying to use, or behave in unexpected ways. Officially, DrvFs currently support NTFS, ReFS, FAT, CDFS, and SMB.
Which is unfortunate, as the list doesn't include FAT32, though this was in June last year.
Any update on this? This would be killer if I could work with the files on my G Drive via WSL.
Reacted by Thomas SIHAPANYA, Kenneth Heal, Red Huq, Sean Murphy, YenForYang, Michael Robertson, Timur Yigit, MAHDTech, Taylor Paul, Gustavo (Keener) DeLaFuerza and 52 more
I found that if you share the drive over the network, you can mount the share from different computer and run commands within drive folders without problems. But I was unable to mount it using localhost, it knows that you're trying to mount the local drive and just mounts it as regular drive.
Edit:
I believe it's not working on localhost due to named pipes, and I don't think it's something you're normally able to disable without breaking all bunch of other things
Reacted by Jikkelsen, Osaze Shears, Benyamin Limanto and inteledyne
Install OpenSSH Server under Win10
Win10 Settings -> Apps -> Manage optional features -> Add feature -> OpenSSH Server
restart if necessary
open Services -> OpenSSH -> Properties -> Startup Type -> Automatic (delayed)
Install and run SFTPNetDrive, right click on icon in hidden icons -> Main window (or maybe already open) -> Profile -> new profile ( server: localhost, user: *** pwd:*** Drive Letter: F (or another)
Advanced -> ( Protocol -> uncheck compression; Specified folder: G:\ ) )
in Bash (wsl): sudo mkdir /mnt/f; sudo mount -t drvfs F: /mnt/f
I'm not sure how stable it is, but I was able to open files in WSL.
Just fixed the same exact thing on my own Win10/WSL Ubuntu with chris2crawford 's solution. I would prefer to access GFS directly because of its ability to cache files. Has anyone feature requested this to GFS?
Hi guys, I have a simple way to do this, even this way is not actually to mount the drive. But basically, you can read or write on it.
I just wanted to copy a file from WSL into the Google Drive file stream. (For example, G: \ My drive \ hobby)
So, I wrote a copy-to-drive.sh which contains just one line code below.
Another (similar in spirit) way to go would be set up ssh.exeon Windows and use scp.exe, or even go the other direction and set a sshd server on Windows. Whatever it takes so long as the file is being read/written on the Windows side and not going through WSL drvfs.
It is also possible to use some nested IFS ideas as suggested earlier. Nothing wrong with that in principle, but going that way is stacking one (at least potential) path to failure upon another. If it "works" so much the better, but just be aware there are a lot of unknown/untested/unsupported moving parts involved going that route. Going through interop is at least in theory a solution that should work by design.
$ sudo mount -t drvfs '\\localhost\G' /mnt/g
mount: /mnt/g: special device \\localhost\G does not exist.
$ sudo mount -t drvfs '\\192.168.1.123\G' /mnt/g
mount: /mnt/g: special device \\192.168.1.123\G does not exist.
$ sudo mount -t drvfs '\\192.168.1.123\G$' /mnt/g
mount: /mnt/g: special device \\192.168.1.123\G$ does not exist.
C drive is OK:
sudo mount -t drvfs '\\192.168.1.123\c' /mnt/g
That was the only command I saw in the thread that is based on Google Drive and not other third party tools. Did you want me to try anything else? Thanks!
Reacted by tomred-net, w. ian douglas, Jason Lin, José M. Giménez-García, George Politis, Sam Lee, Sean Johnsen, Tabita Catalán, Iñigo Tellaetxe Elorriaga, Natithan and 5 more
Reacted by George Politis, Sean Johnsen and Tabita Catalán
I've no idea when this started working (it wasn't the last time I checked - perhaps 6 months ago) but today it's working fine. Within my WSL Ubuntu I navigated to /mnt/ and there was my G drive (mapped as G:), and from there I went to /mnt/g/My Drive/ and all my files were there as expected. Happy Customer 😄 👍
This only works for your personal documents. If you want to use a Shared Drive, it is completely inaccessible. In fact, it is unusable from anything other than explorer. I tried several different tools in addition to WSL, and they all either displayed nothing, or just a .lnk to some inaccessible location.
I use WSL plus shared drives using Google Drive for Desktop. But it only works for shared drives in my own organization, not shared from other companies. Not sure why.
Just want to signal: I updated WSL from v1 to v2. Before, when I fired up the Google Drive app, I found G: automatically mounted at /mnt/g (this allowed me for example to right click > open windows terminal with wsl in any folder within G:).
Now, with WSL2, it doesn't work anymore.
Mounting manually with sudo mount -t drvfs G: /mnt/g works, but downgrading from "it works out of the box" to having to having to do things manually is a bit annoying.
Hello,
I always start Windows Explorer from WSL2/bash using the mounted Google
Drive file system.
Since the last WSL Update this week I started to get this error message
after running
WSL for a few hours when I run explorer from bash:
$ explorer.exe G:
<3>WSL (2209) ERROR: UtilBindVsockAnyPort:295: bind failed 38
Rebooting will fix the issue, but it will reappear after a few hours.
Any ideas how to fix this?
Is there a way to downgrade WSL to the previous version?
I have used Debian to search files on G drive successfully but suddenly it stopped working. Tried Google drive restart without luck:
literakl@DESKTOP-590U5T0:/$ ls -l /mnt/
ls: cannot access '/mnt/g': Invalid argument
ls: cannot access '/mnt/l': Invalid argument
total 0
drwxrwxrwx 1 literakl literakl 512 Jan 14 09:11 c
d????????? ? ? ? ? ? g
Edice Windows 10 Home
Verze 22H2
Datum instalace 30.11.2022
Build operačního systému 19045.2486
Výkon Windows Feature Experience Pack 120.2212.4190.0
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Activity
therealkenc commentedon Mar 6, 2018
Variation on #2896 (VirtualBox additions shared folder) #2163 (WebDAV) #1962 (Windows NFS and/or Dokany) #579 (EXT2FSD). WSL DrvFS can only grok certain Windows filesystems presently.
deven commentedon Apr 16, 2018
I currently have Windows 10 build 16299. I installed Google Drive File Stream, and my Google Drive is visible as I: under Windows. When I launch a WSL bash shell, this is getting automatically mounted as "/mnt/i". While I also get the "Function not implemented" error, I have found that I can nevertheless change into subdirectories and read/write files via DrvFS to Google Drive, I can even do "ls -l" on a specific file without getting any errors.
I just can't read directory entries, which obviously makes the filesystem a little difficult to use!
Running strace shows that getdents() is the system call which is failing:
If just this syscall could be fixed for the Google Drive File Stream filesystem, it might work perfectly.
taylorpaul commentedon Apr 24, 2018
I am encountering the same issue!
YenForYang commentedon May 3, 2018
This issue is probably also similar to "ls: reading directory '.': Invalid argument (share mounted via drvfs) #1954"
For me:
Quoting Sven Groot (@SvenGroot) from that issue,
Which is unfortunate, as the list doesn't include FAT32, though this was in June last year.
SvenGroot commentedon May 3, 2018
YenForYang By FAT I meant the FAT driver in Windows. WSL definitely works with FAT32, and all the FAT variations Windows supports.
I do expect this is another case where the Google Drive file system driver is missing some support or behaving in an unexpected way.
jvallery commentedon Jul 18, 2018
Any update on this? This would be killer if I could work with the files on my G Drive via WSL.
bastiao commentedon Oct 18, 2018
This will be really nice to have!
h3xcat commentedon Nov 20, 2018
I found that if you share the drive over the network, you can mount the share from different computer and run commands within drive folders without problems. But I was unable to mount it using localhost, it knows that you're trying to mount the local drive and just mounts it as regular drive.
Edit:
I believe it's not working on localhost due to named pipes, and I don't think it's something you're normally able to disable without breaking all bunch of other things
chris2crawford commentedon Jan 20, 2019
Here is a way to mount GFS in WSL based on https://superuser.com/questions/1353169/getting-sshfs-working-on-wsl-or-finding-an-alternative The trick is to use https://www.nsoftware.com/sftp/netdrive/ to ssh to GFS from Windows and convert it to a filesystem that can be mounted under WSL.
Win10 Settings -> Apps -> Manage optional features -> Add feature -> OpenSSH Server
restart if necessary
open Services -> OpenSSH -> Properties -> Startup Type -> Automatic (delayed)
Advanced -> ( Protocol -> uncheck compression; Specified folder: G:\ ) )
I'm not sure how stable it is, but I was able to open files in WSL.
h3xcat commentedon Feb 11, 2019
I switched to RaiDrive, haven't gotten any problems yet. And upload speeds are way better than using Google File Stream.
chris2crawford commentedon Feb 23, 2019
from: Riyad Muradov
$ sudo mkdir /mnt/mydrive
$ sudo mount -t drvfs '\RaiDrive-username' /mnt/mydrive
I agree the performance is much better than SFTPNetDrive. I got the following error on the last command:
However, just using the windows drive worked fine:
$ sudo mount -t drvfs Z: /mnt/mydrive
katherinelauck commentedon May 12, 2019
Just fixed the same exact thing on my own Win10/WSL Ubuntu with chris2crawford 's solution. I would prefer to access GFS directly because of its ability to cache files. Has anyone feature requested this to GFS?
dos-gruut commentedon Jun 6, 2019
Hi guys, I have a simple way to do this, even this way is not actually to mount the drive. But basically, you can read or write on it.
I just wanted to copy a file from WSL into the Google Drive file stream. (For example, G: \ My drive \ hobby)
So, I wrote a
copy-to-drive.shwhich contains just one line code below.Yes, you can invoke the windows cmd on the WSL.
I hope this can help you guys.
therealkenc commentedon Jun 6, 2019
With recent WSL you should be able to go the other direction too under powershell with something like:
Another (similar in spirit) way to go would be set up
ssh.exeon Windows and usescp.exe, or even go the other direction and set asshdserver on Windows. Whatever it takes so long as the file is being read/written on the Windows side and not going through WSLdrvfs.It is also possible to use some nested IFS ideas as suggested earlier. Nothing wrong with that in principle, but going that way is stacking one (at least potential) path to failure upon another. If it "works" so much the better, but just be aware there are a lot of unknown/untested/unsupported moving parts involved going that route. Going through interop is at least in theory a solution that should work by design.
Masterxilo commentedon Jul 13, 2019
I came here because of this very disappointing answer: https://askubuntu.com/questions/1094020/how-can-i-access-my-google-drive-or-external-hard-from-windows-bash
75 remaining items
Liryna commentedon Sep 8, 2021
Vinh Nguyen (@vinhdizzo) could you share the exact command line you used to mount the drive ?
vinhdizzo commentedon Sep 8, 2021
Liryna when I launch bash, the G drive is already mounted as
/mnt/g, so I didn't need to mount. I could unmount and remount, and I get the following:Liryna commentedon Sep 8, 2021
Vinh Nguyen (@vinhdizzo) what happens if you try to mount by using the same commande line in other answers?
vinhdizzo commentedon Sep 8, 2021
Liryna Here's what I get:
C drive is OK:
That was the only command I saw in the thread that is based on Google Drive and not other third party tools. Did you want me to try anything else? Thanks!
Liryna commentedon Sep 8, 2021
Vinh Nguyen (@vinhdizzo) please give a try to:
sudo mount -t drvfs G: /mnt/g
vinhdizzo commentedon Sep 8, 2021
Liryna sorry I did try that first but forgot to paste it. This is what I get:
sudeshjethoe commentedon Sep 29, 2022
this works for me, but sometimes it helps to unmount first, e.g. umount /mnt/g (as root ofcourse)
pgwilliams commentedon Oct 31, 2022
I've no idea when this started working (it wasn't the last time I checked - perhaps 6 months ago) but today it's working fine. Within my WSL Ubuntu I navigated to /mnt/ and there was my G drive (mapped as G:), and from there I went to /mnt/g/My Drive/ and all my files were there as expected. Happy Customer 😄 👍
ilsaloving commentedon Dec 6, 2022
This only works for your personal documents. If you want to use a Shared Drive, it is completely inaccessible. In fact, it is unusable from anything other than explorer. I tried several different tools in addition to WSL, and they all either displayed nothing, or just a .lnk to some inaccessible location.
chris2crawford commentedon Dec 6, 2022
mujina93 commentedon Jan 10, 2023
Just want to signal: I updated WSL from v1 to v2. Before, when I fired up the Google Drive app, I found G: automatically mounted at /mnt/g (this allowed me for example to right click > open windows terminal with wsl in any folder within G:).
Now, with WSL2, it doesn't work anymore.
Mounting manually with
sudo mount -t drvfs G: /mnt/gworks, but downgrading from "it works out of the box" to having to having to do things manually is a bit annoying.steinbergnet commentedon Jan 21, 2023
literakl commentedon Jan 21, 2023
I have used Debian to search files on G drive successfully but suddenly it stopped working. Tried Google drive restart without luck:
literakl@DESKTOP-590U5T0:/$ ls -l /mnt/
ls: cannot access '/mnt/g': Invalid argument
ls: cannot access '/mnt/l': Invalid argument
total 0
drwxrwxrwx 1 literakl literakl 512 Jan 14 09:11 c
d????????? ? ? ? ? ? g
Edice Windows 10 Home
Verze 22H2
Datum instalace 30.11.2022
Build operačního systému 19045.2486
Výkon Windows Feature Experience Pack 120.2212.4190.0
microsoft-github-policy-service commentedon Feb 1, 2024
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Thank you!