9 ms·
Show HN: Google Drive as a file system
- Immortalin 8y agoCongrats on shipping! How does this compare to https://github.com/astrada/google-drive-ocamlfuse https://github.com/astrada/google-drive-ocamlfuse aside from the programming language?
- harababurel 8y agoThank you! I think google-drive-ocamlfuse is an excellent product. It is clearly more mature and has more features than GCSF. I made a comparison between the two projects in sections 4.2 and 4.3 of my thesis [0]. In short, GCSF tends to be faster in several cases (listing files recursively, reading large files from Drive). The caching strategy it uses also leads to very fast reads (x4-7 improvement compared to google-drive-ocamlfuse) for files that have been cached, at the cost of using more RAM. On the other hand, I arrived at the conclusion that google-drive-ocamlfuse provides a better overall experience, as it already has an active community behind it. My goal with GCSF is to more or less close the gap between the two projects and reach the same level of functionality. [0] https://sergiu.ml/~sergiu/thesis.pdf https://sergiu.ml/~sergiu/thesis.pdf
- rb2k_ 8y agoAny comparisons to rclone's gdrive integration? Seems that rclone probably has the biggest userbase of the "google drive fuse mount" tools.
- carewornalien 8y agoDitto. I'm using clone for this same function. I'm using it for casual file access (not lots of intensive access every day all day) but I'd like to know of there is any benefit to this over rclone, since as mentioned rclone has a pretty big user base..
- harababurel 8y agoI haven't personally used rclone so far. I will look into it and see how it compares to GCSF.
- c1yd3i 8y agoWhat about Google Drive File Stream? https://support.google.com/drive/answer/7329379?hl=en https://support.google.com/drive/answer/7329379?hl=en
- scarface74 8y agoWell one limitation of Google File Stream is you can only use it with a work or school account not a personal account.
- Improvotter 8y agoIt also does not support Linux afaik!
- dawnerd 8y agoIt also tends to crash a lot with large directories.
- darkr 8y agoNo support for Linux.
- qrbLPHiKpiux 8y agoI use this at work and it’s very good.
- discreditable 8y agoSame here. I wish they offered it for personal accounts. I would happily start paying for Drive to use it.
- applecrazy 8y agoI’m not sure if it’s what you’re looking for, but Backup and Sync is a similar Drive sync utility made by google for personal accounts. The only feature that it doesn’t have is file-level sync settings (afaik B&S only has folder level sync options)
- Endy 8y agoWhy do you trust Google enough to do this?
- hemancuso 8y agoVery cool! I ship a similar product that has included Google Drive integration (and many other back ends) since 2013 - https://www.expandrive.com https://www.expandrive.com - happy to answer any questions too!
- bklaasen 8y agoWhen is Linux support coming?
- hemancuso 8y agoIn beta!
- dairychris 8y agoI remember testing Expandrive out a few years ago. Great to hear you're still going strong and expanding functionality to cloud storage services too. Haven't revisited the program since we originally tested it and found a major problem for our application, but can Expandrive now handle symlinks over sshfs correctly or does it still silently mangle them into regular files?
- dawnerd 8y agoEver get the random disconnects fixed? Haven’t used it since I sent in those log files.
- nkkollaw 8y agoI don't get it. Isn't this the same as what implemented natively in GNOME, or with Backup and Sync on Windows and MacOS?
- harababurel 8y agoNot sure what you are referring to as implemented natively in GNOME. One crucial difference is the fact that Backup and Sync picks up local files (which exist physically on the user's machine) and uploads them to a special Drive directory in the background. GCSF does not store anything locally unless you tell it to. It simply creates a virtual directory and reports its content and file tree structure so that it matches whatever exists on Drive.
- quiq 8y agoI think GP is referring to the Gnome Virtual File System (GVfs) [1], which has a number of pluggable backends, one of which being Google Drive. I've used it lightly and it seemed to "just work." [1] https://wiki.gnome.org/Projects/gvfs https://wiki.gnome.org/Projects/gvfs
- federicoponzi 8y agoYeah probably he was talking about that. But for my Mate, GVfs is not an option :(
- vasili111 8y agoWhat about Windows support?
- harababurel 8y agoShould be achievable using winfsp[0]. I will look into it for a future release. [0] https://github.com/billziss-gh/winfsp https://github.com/billziss-gh/winfsp
- jaclaz 8y agoJust in case and FYI, a Dokan based driver for Windows: https://github.com/viciousviper/DokanCloudFS https://github.com/viciousviper/DokanCloudFS I guess that using the Dokany to port this new driver to Windows should be relatively easy: https://dokan-dev.github.io/ https://dokan-dev.github.io/
- egeozcan 8y agoPaid but actively developed with responsive developers: https://mountainduck.io/ https://mountainduck.io/
- amelius 8y agoIt's always good to see services of big companies being turned into highly useful but faceless commodities!
- dustingetz 8y agoThe drive app will sync a folder in your home directory if you are a busy person like me and need a one click 90% solution. I once synced my whole home directory but that turned out to be a bad idea because random applications put their junk there.
- _hl_ 8y agoVery cool, I think I will try using this as my standard google drive solution on linux. One thing I haven't found in your paper is how the software handles conflicts. Suppose I have two or more machines hooked up to the same account, all simultaneously modifying the same file in different ways. What's going to happen? I guess this would be mostly up to the server side and out of your control, but maybe you can point me to a specification on how such issues are handled?
- harababurel 8y agoSome unwanted behavior might occur in scenarios like the one you describe. Most probably, the change performed by one client will silently overwrite the other. If there is however a small gap between the operations, the earlier one will have a better chance of being picked up by Drive and detected by the other file system instance. In this lucky case there might be no data loss. I would set the `sync_interval` configuration parameter to a low value to improve the chances of detecting changes as soon as they appear, but I would also try to make sure that only one client works on a certain file/directory at one time. This case looks like a good area for future improvement. Thank you for addressing the issue!
- mandeepj 8y agois this drive same as the drive\directory that you get when you install "OneDrive"?
- harababurel 8y agoI haven't use OneDrive, but I think it is similar to the Backup and Sync app for Google Drive, which targets a different purpose than this project.
- johnboyer 8y agoAlthough this is fairly nice, I would recommend Syncthing over this. It has the benefit of not relying on any third party to store your data, it's all exclusively on your devices, along with some very solid security.
- WhyNotHugo 8y agoSyncthing is pretty much a compeltely different thing. I use Syncthing a bunch, but I don't really see any overlap between it and this tool.
- johnboyer 8y agoFrom my understanding, the primary purpose of this is for backup and syncing your Google Drive files between multiple devices, which is very similar in nature to Syncthing. Is there something else that I am missing?
- partycoder 8y agoBack in ~2005 someone did this with Gmail. https://en.wikipedia.org/wiki/GmailFS https://en.wikipedia.org/wiki/GmailFS It did not turn out very well, though.
- Bromskloss 8y agoCould you please rewrite it in Ru… Oh, it _is_ written in Rust! :-)
- Bromskloss 8y agoI'm getting an error when compiling (`cargo build`), both on stable and nightly Rust: error: failed to run custom build command for `fuse v0.3.1` process didn't exit successfully: `/home/bromskloss/code/gcsf/target/debug/build/fuse-46607682b28e6d4c/build-script-build` (exit code: 101) --- stderr thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failure { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"fuse >= 2.6.0\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package fuse was not found in the pkg-config search path.\nPerhaps you should add the directory containing `fuse.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'fuse\' found\n" } }', libcore/result.rs:945:5 note: Run with `RUST_BACKTRACE=1` for a backtrace. Am I doing it wrong?
- harababurel 8y agoSee this issue[0]. tl;dr: make sure you have the libfuse-dev package installed. [0] https://github.com/harababurel/gcsf/issues/9 https://github.com/harababurel/gcsf/issues/9
- webmaven 8y agoStupid question[0]: What do the initials GCSF stand for? [0] Yes, I know there are no stupid questions, only inquisitive idiots.
- grzm 8y agohttps://github.com/harababurel/gcsf https://github.com/harababurel/gcsf
- harababurel 8y agoThe question is not stupid at all, but the answer is :). GCSF stands for "Google Conduce Sistem de Fișiere" -- a (bad) word-by-word Romanian translation of "Google Drive File System".
- webmaven 8y agoAnd I see that you've now added the explanation to the README: https://github.com/harababurel/gcsf/commit/3d5ba8ffff2a18bf010d329df876e08550e15c57 https://github.com/harababurel/gcsf/commit/3d5ba8ffff2a18bf0...
- mikevm 8y agoDoes this support Team Drives?
- harababurel 8y agoNot at the moment. I would like to add this feature in an upcoming version.
- Tenobrus 8y agoHow does this compare to `rclone`?
- namibj 8y agoSeconded, there are widely deployed alternatives, specifically rclone (mount) and plexdrive. The former is, for backup purposes, better used via it's CLI, mostly due to how it relays IO errors up and the fact that many applications are too dumb to retry filesystem errors, or even not crash completely.
- Pmop 8y agoAin't FUSE a really wonderful thing? Edit: "fuse" to uppercase.
- ranfdev 8y agoHey, thanks for the awesome work! I always wanted something like "one drive on demand"[0] but for linux. Maybe in the future you could add an option to keep some files offline. By doing that, Linux would have a real alternative to one drive [0]https://support.office.com/en-us/article/learn-about-onedrive-files-on-demand-0e6860d3-d9f3-4971-b321-7092438fb38e https://support.office.com/en-us/article/learn-about-onedriv...
- jpatokal 8y agoHow does this differ from Google's own Filestore? https://cloud.google.com/filestore/ https://cloud.google.com/filestore/
- fulafel 8y agoFilestore seems NFS-based and can't access Google Drive, just its own GCP volumes.
- mobitar 8y agoThere's a similar tool someone made for Standard Notes to mount your notes as a filesystem: https://github.com/tannercollin/standardnotes-fs https://github.com/tannercollin/standardnotes-fs
- dddw 8y agonow that is helpfull for me migrating to standard notes!
- FuckOffNeemo 8y agoHow far away are from making the 'Download More RAM' meme redundant I wonder? Excellent work harababurel :) Edit: words
- IloveHN84 8y agoI use it from GnomeShell 3.28, it works pretty solid
- TheNetEffect 8y agoFuse has been around for a while, in fact MacFuse was an implementation that was open sourced by Google, although no longer workable given the advances of the MacOS. There is now OSXFuse which is used by a few commercial applications including Transmit and the Storage Made Easy Cloud Service which uses it to support multiple backends including Google Drive and Google Storage. On Windows there are Fuse implementations but they are not as rock solid as OSXFuse on Mac. The best commercial implementation Windows FUSE I'm aware of is CallbackFS.
- jacksmith21006 8y agoThis would be excellent to use with the new GNU/Linux support with ChromeOS. It is called Crostini. My kids HS use Chromebooks now for AP CS 1 and 2 and this would help with being able to use whatever machine instead of having to use the same. They use Crouton but would guess will switch to Crostini.
- harababurel 8y agoHello everyone! I have built a tool that allows Linux and macOS users to mount their Google Drive account locally as a virtual file system. The file system supports most typical operations (creating/deleting/moving/renaming files and directories, reading/writing to them). It can also export special Drive files as OpenOffice documents and has an in-memory cache which improves the speed of navigation and file access. Changes performed on other clients (e.g. on the web or mobile interface) are usually detected shortly and applied locally as well. I also wrote a paper[0] on it, as I am using the project for my bachelor thesis. It is still rough around the edges and lacks some functionality, but for the moment it is good enough for my personal use. I am looking forward to hearing your comments and feedback on how to improve it. [0] https://sergiu.ml/~sergiu/thesis.pdf https://sergiu.ml/~sergiu/thesis.pdf
- Improvotter 8y agoThis is neat! Can I use this for multiple accounts? I've been looking for a MacOS and Linux solution for this exact problem but I'd like to use it for 3-4 Google accounts. Another question related to implementation. How easy is it to use a language like Rust for some web connection stuff like what is being used here? I've never used the language, but I've always been interested in it.
- harababurel 8y ago> This is neat! Can I use this for multiple accounts? I've been looking for a MacOS and Linux solution for this exact problem but I'd like to use it for 3-4 Google accounts. The current release allows you to mount a single account for each local user. For the moment, you could work around this limitation by creating another user on your machine and running a separate instance of GCSF as the new user. I created an issue [0] and will work on adding support for multiple accounts in a future release. > How easy is it to use a language like Rust for some web connection stuff like what is being used here? I've never used the language, but I've always been interested in it. You can make HTTP requests relatively easily with the help of hyper [1]. In the case of this project, I was lucky to have some useful libraries readily available: yup-oauth2 [2], google-drive3 [3]. I would place Rust somewhere below Python in terms of existing tools and support (for instance, Google doesn't provide any official client libraries for Rust, but it does for Python), but making relatively simple applications is completely achievable (and fun as well) in Rust. [0] https://github.com/harababurel/gcsf/issues/10 https://github.com/harababurel/gcsf/issues/10 [1] https://hyper.rs/ https://hyper.rs/ [2] https://github.com/dermesser/yup-oauth2 https://github.com/dermesser/yup-oauth2 [3] https://crates.io/crates/google-drive3 https://crates.io/crates/google-drive3