Open gomfy opened 5 years ago
I'm having this exact same issue, down to the letter. Automount via .profile results in a mounted drive I can't access: The UI gives message "input/output error" when trying to open the mounted drive in File Manager.
Checking the curl and gdfuse logs, the process can't resolve www.googleapis.com. Unlike others that have reported similar issues, my errors are showing at the outset and not later on after the drive was already successfully mounted.
I noticed that on occasion my laptop has been slow to connect to wi-fi, so I decided to try a hardwire connection and the process worked as expected! It's not practical for me to maintain a hardwire connection on my laptop in all circumstances, so I still need to work towards a solution, but perhaps this insight will help troubleshoot other issues.
Is it possible any of you are having transient DNS or network/internet connectivity issues?
Also, an interesting detail that I haven't figured out, when the mounting failure takes place upon start-up, the 'Google-Drive' directory I'm mounting to is no longer visible in File Manager, though I can see it's still there using ~$ ls
. Once I unmount the drive with ~$ fusermount -u Google-Drive
and refresh the File Manager, the folder is visible again.
+1
Exactly the same behavior. I always have to unmount googledrive manually before I end my session to make the startup script work. Otherwise, I will run into the problem mentioned above that the file manager cannot access my home directory anymore. After unmounting and mounting it manually everything is fine again. Any ideas how to solve that issue? Thx a lot.
I'm having the same issue when I add it to Xubuntu's Session and Startup application with sh -c "google-drive-ocamlfuse ~/drive"
.
Manually running it in Terminal works fine after Xubuntu has started. The odd thing is it was working fine yesterday but now it throws an input and output error in my home directory. Had me scared for a moment.
I was having this exact same problem and was able to fix it this morning. In sum, I pinged Google to confirm a network connection before mounting the drive. I'm a relative noob to Linux (been using it only for about two weeks), so hopefully you'll understand my instructions:
1) Create this script and put it in /home/username/bin (username changed to your profile name). You'll also need to change the "/home/username/GoogleDrive" in the script below to whatever your mount point is.
#!/bin/bash
while true; do
# check to see if there is a connection by pinging a Google server
if ping -q -c 1 -W 1 8.8.8.8 >/dev/null; then
# if connected, mount the drive and break the loop
google-drive-ocamlfuse /home/username/GoogleDrive; break;
else
# if not connected, wait for one second and then check again
sleep 1
fi
done
2) Make the script executable either through the CLI or a file manager which allows you to change permissions.
3) Used AutoStart in Kubuntu and added the script. I've heard AutoStart is called Startup Applications in other distros.
I've tested this and it is mounting the drive on my system. For confirmation, please let me know if this works for you.
I was having this exact same problem and was able to fix it this morning. In sum, I pinged Google to confirm a network connection before mounting the drive. I'm a relative noob to Linux (been using it only for about two weeks), so hopefully you'll understand my instructions:
1. Create this script and put it in /home/**_username_**/bin (username changed to your profile name). You'll also need to change the "/home/username/GoogleDrive" in the script below to whatever your mount point is.
#!/bin/bash while true; do # check to see if there is a connection by pinging a Google server if ping -q -c 1 -W 1 8.8.8.8 >/dev/null; then # if connected, mount the drive and break the loop google-drive-ocamlfuse /home/username/GoogleDrive; break; else # if not connected, wait for one second and then check again sleep 1 fi done
1. Make the script executable either through the CLI or a file manager which allows you to change permissions. 2. Used AutoStart in Kubuntu and added the script. I've heard AutoStart is called Startup Applications in other distros.
I've tested this and it is mounting the drive on my system. For confirmation, please let me know if this works for you.
Thanks for the tip. I implemented something similar, but instead using ping www.googleapis.com
since that's the address the logs indicated couldn't be resolved and is required for this program to work. This should account for any DNS issues that may prevent resolving the IP, despite an internet connection.
It would be nice (though not essential) if this program could account for this before mounting since it will mount no matter what, it seems. (I LOVE THIS PROGRAM, BY THE WAY!)
Since most of my issues stem from WiFi failing to auto-connect when the SSID I'm connecting to is hidden, I added a start-up service that scans for the hidden SSID once network-online.target is up. Then I have this mounting script running at start-up using Startup Applications (Linux Mint 19.3).
Now my WiFi is connected immediately at startup 98% of the time, and the change you prompted today with your script will ensure that I don't mount GD the remaining 2% of the time until the internet connection is established.
In version 0.7.15 there is a fix that should resolve (I hope :wink:) this issue.
@astrada I tried exactly what @gomfy did in the "~/.profile" running version 0.7.18 and it is working. I think the issue is resolved. Great work!
Problem
Automouting the default drive via command in
~/.profile
gives error:Command that fails
I have the following mount lines in ~/.profile:
Additional weirdness
The first two mount lines in
~/.profile
(politics_google_drive
andsociology_google_drive
) work correctly. These are both Team Drives i.e Shared Drives.Once the system is booted up I can mount the default
google_drive
by simply doing the following:fusermount -u
and then executesource ~/.profile
all three drives mount correctly.Log file
The
gdfuse.log
for the defaultgoogle_drive
has could-not-resolve-host errors like this:after the unsuccessful automount attempt.
System
I'm using Linux 5.0.0-23-generic and Ubuntu 18.04.1