@Ligh7C would you mind sharing how you got the modify/access times to work properly? I tried installing node-gdrive-fuse both with and without the modifications to the .js files and my files still show the wrong times:
@anthony
Maybe I can help, I’ve been using node-gdrive-fuse for a couple months now and it’s been working great for me. What command are you running to see the modification times, I’m fairly new to the linux side of things.
Edit: I just read Ligh7C’s response, I personally didn’t make any modifciations to the mod time or created time. If you provide more details about your OS version and details on how/when you installed node-gdrive-fus i might be able to assist.
All I did was add garbage collection and mount with: node fs.es6.js --memory_reducer --optimize_for_size --zero_fill_buffers --max_old_space_size=4096 --expose-gc
I mount with node fs.es6.js & and everything seems to work fine. My files are accessible and playable through Plex. It’s just the mod times that are borked (I’m running stat on the file to see mod times). The same files show correct times in the Google Drive web gui. Also, my root node-gdrive-fuse folder (named gdrive in the snippet below) shows a crazy date itself. Does that happen for you too?
➜ ls -la
drwxrwxr-x 4 user user 4096 Mar 7 21:43 .
drwxrwxr-x 4 root media 4096 Mar 7 20:52 ..
drwxrwxrwx 2 root root 4096 -9223372036854775808 gdrive
(Also of note, my Google Drive is encrypted so I decrypt locally with rclone.)
Any ideas?
P.S. thanks for the tip regarding extra mount params! I’ll give those a shot too.
@anthony
If you add the --expose-gc you need to add garbage collection to the delete_files() function. I can send a screenshot of what that would look like once I get home.
I also use 16.04, and just out of curiosity why does the mod time need to be correct if everything is working properly? Just curious if perhaps it preventing you from doing something useful I'm just not aware of currently.
Edit: Just checked a random series with stat. Everything looks OK as far as I can tell.
@Seigele ahh ok, good to know about --expose-gc. I’ll drop that param for now.
I’ve read that incorrect mod times can make Plex scan libraries more frequently than it should. To be honest I’m not sure what other repercussions there are I tend to stress over things until they’re perfect, maybe sometimes unnecessarily
You’re using vanilla node-gdrive-fuse? No changes to any files (other than config.json) in ~/node-gdrive-fuse/src? If you run git rev-parse HEAD in the repo does it output ba99b5ac254cf3afeac15a3427fd58289f38ac95?
So weird that your mod times are correct and mine aren’t, when we seem to be running things in a very similar manner and environment
Edit: Also getting a lot of these rclone errors now, even though rclone is only decrypting a local directory
2017/03/08 01:41:46 ERROR : TV/Seinfeld/S08/Seinfeld.S08E13.The.Comeback.WEBDL-720p_NTb.mkv: ReadFileHandle.Read error: low level retry 3/10: failed to authenticate decrypted block - bad password?
2017/03/08 01:41:46 ERROR : TV/Seinfeld/S08/Seinfeld.S08E13.The.Comeback.WEBDL-720p_NTb.mkv: ReadFileHandle.Read error: low level retry 4/10: failed to authenticate decrypted block - bad password?
2017/03/08 01:41:46 ERROR : TV/Seinfeld/S08/Seinfeld.S08E13.The.Comeback.WEBDL-720p_NTb.mkv: ReadFileHandle.Read error: low level retry 5/10: failed to authenticate decrypted block - bad password?
2017/03/08 01:41:46 ERROR : TV/Seinfeld/S08/Seinfeld.S08E13.The.Comeback.WEBDL-720p_NTb.mkv: ReadFileHandle.Read error: low level retry 6/10: failed to authenticate decrypted block - bad password?
2017/03/08 01:41:46 ERROR : TV/Seinfeld/S08/Seinfeld.S08E13.The.Comeback.WEBDL-720p_NTb.mkv: ReadFileHandle.Read error: low level retry 7/10: failed to authenticate decrypted block - bad password?
2017/03/08 01:41:46 ERROR : TV/Seinfeld/S08/Seinfeld.S08E13.The.Comeback.WEBDL-720p_NTb.mkv: ReadFileHandle.Read error: low level retry 8/10: failed to authenticate decrypted block - bad password?
2017/03/08 01:41:46 ERROR : TV/Seinfeld/S08/Seinfeld.S08E13.The.Comeback.WEBDL-720p_NTb.mkv: ReadFileHandle.Read error: low level retry 9/10: failed to authenticate decrypted block - bad password?
2017/03/08 01:41:46 ERROR : TV/Seinfeld/S08/Seinfeld.S08E13.The.Comeback.WEBDL-720p_NTb.mkv: ReadFileHandle.Read error: low level retry 10/10: failed to authenticate decrypted block - bad password?
2017/03/08 01:41:46 ERROR : TV/Seinfeld/S08/Seinfeld.S08E13.The.Comeback.WEBDL-720p_NTb.mkv: ReadFileHandle.Read error: failed to authenticate decrypted block - bad password?
Can you explain what all these parameters are for? there isn't and documentation for that on the wiki. Thanks! I know that those are general node params, but do they help in any way? I've just been using node-gdrive-fuse without any params and its worked fine.
I don't believe that's the case - the same exact files on my ACD crypt mount have correct mod times, and my Google Drive is just a mirror image of my ACD. However due to acd: Transfers stalling when copying from ACD to crypted ACD · Issue #902 · rclone/rclone · GitHub I've decided to re-sync all my media from ACD to G-Drive, so I'll monitor things this time around to see how the mod times are affected during the transfer.
Does anyone can help me with the process of making mount automatic if it fails ?
my mount point is “mtng” and I’m using GDrive.
If I use this line of code, it will tell me that the drive is mounted, but sometimes it’s still not doing a correct job, like even if the drive freeze and don’t do anything else, it will say it’s mounted.
LOCALMOUNTPOINT="/Users/danial/mtng"
if mount | grep "on $LOCALMOUNTPOINT" > /dev/null; then
echo "mounted"
else
echo "not mounted"
fi
Also I have this code too, which I’m not sure if it’s work or not.
n=1 ;
while true ; do
if [ `find /Users/danial/mtng -prune -empty` ] ; then
echo "=============================================="
echo "System were down $(date)"
echo "=============================================="
else
echo "=============================================="
echo "System were ok at $(date)"
echo "=============================================="
fi ;
n=$((n+1)) ;
done
So I appreciate if someone can share their code or help me out with this.
node-gdrive-fuse is pretty much stable than anything else I seen, but my problem with it that I encounter recently is sometimes doesn’t show all the files and some of my recent files that I add to folders are missing, unless I delete the whole thing and rerun it again.
Do you have any way to fix that ?
PS. for example folder x, if I get the info (get info for finder), it will show that there is 213 files in there, but when I go into the folder, I only have 208 files, which at least I know some of them is new files that I added and they haven’t show up yet (even after 60 second of delay time).
I think the issues you're having might be related to rclone's crypt. I checked the output of 'git rev-parse HEAD' and I can confirm that my output is identical to yours.
I would also say that if your mods times are flat out wrong it shouldn't be a big deal so long as they don't change. I don't see how it would really affect Plex any differently so long as those mod times aren't being changed, right?
Honestly those recommendations come from the various places I've seen node-gdrive-fuse suggested around the internet, and while I haven't noticed a big difference in mount stability/performance when using those flags, I did notice a significant improvement in stability when I added garbage collection to the file.es6,js.
The other flags are just for efficiency sake. If I can coerce the mount into hogging less system memory and optimizing various file sizes then I figure I might as well keep it and hope for the best since it hasn't negatively impacted performance in any way.
Here's some archaic documentation on what those flags do too btw: link
As for node version, my main Plex server is using v7.5.0 while my backup/dl server is using 7.7.1, I can't say I've noticed much of a difference between the two honestly.
As @MartinBowling said, just add if (global.gc) { global.gc(); } to line 679, it’ll be in the delete_files() function. If you’re using nano you can ctrl-w and search delete_files and it should be your second result.
Edit: @Berzerk90er Which script are you referring to?
So like this, not sure if I should add it within the if block or outside:
function delete_files(){
if( !delete_once){
delete_once = true;
logger.info( "deleting files to make space in the cache" );
logger.info( `current size of cache is: ${totalDownloadSize/1024/1024/1024} GB` );
db.all("SELECT * from files ORDER BY atime, size ASC", function delete_files_callback(err, rows){
_delete_files_(0,0,rows);
});
} if (global.gc) { global.gc(); }
}
@Seigele
Isn’t there an issue with “delete” while using node-gdrive-fuse ? Heard it doesn’t actually delete the file and/or throws errors even with the gc code.