#770: The Ghost in the Machine: How Rclone Mounts the Cloud

Ever wonder why cloud mounts stutter? We explore the engineering of Rclone, FUSE, and the quest for infinite, fluid remote storage.

0:000:00
Episode Details
Published
Duration
31:03
Audio
Direct link
Pipeline
V4
TTS Engine
LLM

AI-Generated Content: This podcast is created using AI personas. Please verify any important information independently.

The Great Storage Trade-off: Replication vs. Mounting

Most modern cloud storage operates on a replication model. In this setup, a local client monitors your files and ensures a physical copy exists on both your machine and the server. While this provides near-instant access, it is fundamentally limited by your hardware's capacity. If you have a multi-terabyte cloud library but a small laptop drive, you are forced into a constant game of "digital Tetris," manually selecting which folders to keep locally.

The alternative is the volume sync or "mount" model, popularized by tools like Rclone. Instead of downloading files in advance, this method creates a Virtual File System (VFS). To the operating system, the cloud storage appears as just another plugged-in drive, even though the data doesn't actually exist on the disk until the moment it is requested.

How FUSE Tricks the Operating System

The bridge between the remote server and the local computer is built using a mechanism called FUSE (File System in User Space). Normally, the file system is a rigid, high-performance part of the computer's kernel. FUSE allows a regular program to intercept requests. When a user clicks a folder in a mounted drive, the kernel asks the software—rather than the hard drive—for the contents. The software then makes an API call to the cloud provider, fetches the list of files, and translates it back into a format the computer understands.

The Bottlenecks: Latency and Metadata

The primary challenge with the mount model is latency. On a local drive, looking up a file's size or name takes less than a millisecond. Over the internet, that same request triggers a round trip to a server that may be thousands of miles away, taking 100 to 200 milliseconds. This "metadata latency" is the cause of the common "spinning wheel" or hanging windows when browsing large remote directories. Every right-click or folder expansion becomes a bottleneck.

Streaming and Caching Strategies

To handle large files, such as high-definition video, volume sync systems use "range requests." Instead of downloading a ten-gigabyte file to play it, the system requests only the specific chunks of data needed for the current moment of playback. This allows for a streaming experience similar to a video platform but within a standard file browser.

To make the experience feel "fluid," advanced caching is required. The gold standard is a full read/write cache using a Least Recently Used (LRU) algorithm. This creates a "sliding window" of data on the local machine; the most recently accessed files stay on the fast local disk, while older data is purged to make room for new requests.

The Limits of Virtual Storage

Despite these engineering feats, two major hurdles remain: cache invalidation and file locking. If a file is changed on a different device, the local mount may not realize it until the directory cache expires. Furthermore, cloud APIs lack the fine-grained file locking of local systems, making simultaneous collaborative editing risky. For now, while volume sync provides the illusion of infinite storage, it remains a specialized tool best suited for media consumption and single-user workflows.

Downloads

Episode Audio

Download the full episode as an MP3 file

Download MP3
Transcript (TXT)

Plain text transcript file

Transcript (PDF)

Formatted PDF with styling

Read Full Transcript

Episode #770: The Ghost in the Machine: How Rclone Mounts the Cloud

Daniel Daniel's Prompt
Daniel
I’d like to discuss how "volume sync" systems like Rclone work under the hood. Specifically, how do they differ from "sync by replication" clients—like Google Drive—where you have to clone the entire remote file system locally? Is it possible to achieve a truly fluid remote sync experience, or is the design inherently challenging to get working well?
Corn
Hey everyone, welcome back to My Weird Prompts. I am Corn, and I am sitting here in our living room in Jerusalem with my brother. It is a beautiful afternoon here, the light is hitting the stone walls just right, and we have got a fresh pot of coffee ready for what I think is going to be a pretty deep technical dive.
Herman
Herman Poppleberry here. It is good to be back at the microphones. I have been looking forward to this one. My desk is currently a disaster zone of external hard drives and network cables because I have been doing some of my own experimentation with the very topic we are discussing today.
Corn
So, it sounds like Daniel really enjoyed our recent deep dive into standard operating procedures and checklists. He mentioned he is actually going to be dusting off his own documentation for his rocket projects, which is pretty cool. I love the idea of someone using our nerdy ramblings to help build actual rockets. But his prompt today takes us in a slightly different direction, though still very much in the realm of how we organize and access our digital lives.
Herman
Right, Daniel wants to talk about the difference between sync by replication, which is what most of us are used to with things like Google Drive, Dropbox, or OneDrive, and volume sync systems like Rclone. It is a great question because it touches on a fundamental trade off in computing: do you want your data to be local and fast but limited by your hardware, or do you want it to be remote and infinite but potentially sluggish?
Corn
Exactly. And Daniel specifically asked about how these volume sync systems work under the hood and whether we can ever truly achieve a fluid remote experience. I think a lot of people have tried to mount a cloud drive using a tool they found on GitHub, felt that stutter or that lag when they tried to open a folder, and wondered, is this just how it is? Is the internet just too slow, or is there something fundamentally broken in the design?
Herman
It is a classic engineering challenge. To really understand it, we have to look at how a computer thinks about a file. When you use something like the standard Google Drive client on a Mac or a P C, you are usually looking at a replication model. In that world, there is a literal, physical copy of your file on your hard drive. When you change it, the client notices the file system event, calculates the binary difference, and uploads that change to the cloud.
Corn
And the big benefit there is speed, right? Because when I open a document, I am opening it from my own fast solid state drive. The syncing happens in the background. My computer isn't waiting for a server in Virginia to respond before it can show me my own text.
Herman
Exactly. It feels instantaneous because, for the purposes of that interaction, it is a local file. The software is essentially playing a game of "keep up." It is watching your disk and the cloud and trying to make them match. But as Daniel pointed out, the fatal flaw is capacity. If you have a two terabyte cloud account but only a five hundred gigabyte laptop, you are playing a constant game of digital Tetris. You have to use selective sync to choose which folders are actually on your machine. It is a manual, high maintenance way to live. You are constantly checking boxes and waiting for blue bars to fill up.
Corn
And that is where the volume sync or the mount model comes in. This is what Rclone does so well, and it is what power users often gravitate toward. Instead of copying the files and taking up space, it creates what we call a Virtual File System, or V F S. Herman, explain to me how my operating system even knows how to talk to something like that. If there is no file on the disk, what is the computer actually looking at when I open that folder?
Herman
This is where it gets really clever and a little bit "Matrix" like. In Linux and Mac O S, there is a mechanism called F U S E, which stands for File System in User Space. Normally, the file system is a very guarded, very "sacred" part of the operating system kernel. It is low level, high performance, and very rigid because if the file system crashes, the whole computer crashes. But F U S E allows a regular program, like Rclone, to tell the kernel, "Hey, I am a file system. If any application asks to see the contents of the folder at slash mnt slash cloud, don't look at the hard drive. Ask me instead."
Corn
So Rclone is essentially acting as a translator or a middleman. When I open my file browser and click on that mounted cloud folder, my computer sends a request to the kernel saying, "Show me the files in this directory." The kernel then passes that request to Rclone.
Herman
Precisely. And Rclone says, "Hold on one second." It then makes an A P I call over the internet to Google Drive or Amazon S three or whatever service you are using. It asks the service for a list of files in that specific remote directory. Once it gets that list back, it formats it in a way the operating system understands and hands it back. To you, the user, it looks like a normal folder with normal icons. But in reality, nothing was there until the moment you asked to see it. It is "just in time" data delivery.
Corn
I can see why that would be a bit slow. If I have a folder with ten thousand files in it, Rclone has to wait for the cloud A P I to respond with that massive list before I can even see the icons on my screen. That is a lot of metadata to fetch over a wire.
Herman
That is exactly the first bottleneck: metadata latency. Every time you list a directory, do a search, or even just right click a file to see its size, you are triggering a round trip to a server that might be thousands of miles away. Even with a fast fiber connection, you are looking at maybe a hundred or two hundred milliseconds of latency. In computer time, that is an eternity. A local hard drive would respond in less than one millisecond. When you multiply that by hundreds of files, you get that "spinning wheel of death" or the window that just hangs while it populates.
Corn
So that explains the lag when browsing. But what about actually opening a file? If I have a ten gigabyte video file on a mounted Rclone drive and I double click it, surely it doesn't have to download the whole thing before the player starts? If it did, it wouldn't be much better than the replication model.
Herman
That is the magic of the V F S layer in Rclone. It supports something called range requests. If you open a video file in a player like V L C, the player doesn't actually need the whole ten gigabytes at once. It just needs the first few megabytes to read the header and start the stream. Rclone tells the cloud provider, "Hey, give me the data for this file starting at byte zero and ending at byte five million." The cloud provider sends just that tiny chunk. Rclone hands it to V L C, and the video starts playing almost immediately.
Corn
That is fascinating. So it is essentially streaming the file on demand, much like YouTube does with video. But I imagine this gets complicated if the application wants to write data or if it keeps jumping around to different parts of the file. A video player is linear, but a database or a code editor isn't.
Herman
Oh, it gets incredibly complicated. This is why Daniel mentioned that these systems can feel buggy. Think about how a complex application like Photoshop or a video editor like Premiere works. They expect the file system to be perfectly reliable and incredibly fast. They are constantly writing temporary scratch files and updating headers. If Photoshop tries to write a small change to a header in a large file and the network connection blips for half a second, the application might just crash or report a corrupted file. It doesn't know it is talking to a cloud server; it thinks it is talking to a local disk that has suddenly gone insane.
Corn
So, to make this fluid, Rclone must have some kind of caching strategy, right? It can't just be a raw pass through for every single byte, or it would be unusable for anything other than simple file copies.
Herman
You hit the nail on the head. Caching is the secret sauce, and it is also where most of the configuration complexity lies. Rclone has several V F S cache modes. The most basic mode is "off," which does almost no caching. It is very safe because you know exactly what is on the remote, but it is painfully slow. Then you have modes like "writes," where it caches files locally only while they are being written to, and then uploads them once they are closed. This helps with the Photoshop problem I mentioned.
Corn
But for a truly fluid experience, like Daniel is asking about, you'd want a full read and write cache, wouldn't you? Something that makes the cloud drive feel like it has a local "brain."
Herman
Exactly. Rclone's "V F S cache mode full" is the gold standard for a smooth experience. In this mode, Rclone keeps a local cache of the chunks of files you have recently accessed. If you watch the first five minutes of a movie, those five minutes stay on your hard drive. If you go back and re watch a scene, it loads instantly from the cache. It also handles writes by saving the changes locally first and then uploading them in the background. It bridges that gap between the replication model and the mount model. It is essentially a hybrid.
Corn
So if I have a fifty gigabyte cache set up on my laptop, I can have an eight terabyte cloud drive mounted, and Rclone will just keep the most relevant fifty gigabytes of data on my machine at any given time. It is like a sliding window into my entire cloud library.
Herman
That is the dream. It is essentially an L R U cache, which stands for Least Recently Used. When the cache gets full, it starts deleting the oldest, least accessed chunks to make room for new ones. When it works, it is beautiful. You get the feeling of infinite storage with near local performance for your active files. But, as Daniel asked, is it truly fluid? Why does it still feel less than perfect sometimes? I have noticed that even with a good cache, sometimes my file explorer will just hang for a few seconds.
Corn
Yeah, why is that? If the data is cached, why the hang?
Herman
There are a few inherent "ghosts in the machine" with this architecture. The first is what I call the "directory traversal tax." Even if you have the file data cached, the structure of the folders often isn't. If you have a deeply nested folder structure, just navigating into a subfolder can trigger an A P I call to check if anything has changed on the remote side. You can tune this with something called the "directory cache time," telling Rclone to trust its local map of the folders for, say, an hour instead of checking every time. But then you run into the sync problem: if you added a file via your phone, it won't show up on your computer for an hour.
Corn
Ah, the classic cache invalidation problem. One of the two hardest things in computer science, right alongside naming things and off by one errors.
Herman
Exactly. And the second issue is file locking. Local file systems are very good at making sure two programs don't try to write to the same file at the exact same time. Cloud A P I's are generally not designed for that kind of fine grained locking. If you have an Rclone mount on two different computers and you try to edit the same Word document at the same time, you are going to have a bad day. The cloud provider will usually just accept whoever finished the upload last, and the other person's changes are gone. There is no "file in use" warning like you get on a local network.
Corn
That sounds like a nightmare for collaborative work. So this volume sync model is really better for single user access or for media consumption where you aren't doing a lot of simultaneous writes from different locations.
Herman
Precisely. It is why you see Rclone used so heavily in the media server community. If you have a massive library of movies on an Amazon S three bucket or Backblaze B two, using Rclone to mount that bucket to a Plex or Jellyfin server is a match made in heaven. The media server sees a normal local folder, it can scan the files, and when a user hits play, Rclone just streams the bits on demand. It is much more efficient than trying to sync fifty terabytes of movies to a local server.
Corn
I want to go back to something Daniel mentioned about Linux specifically. He said it can be particularly buggy there. Is that a F U S E issue, or is it something else? I always thought Linux was the king of file systems.
Herman
It is often a combination of F U S E overhead and how the Linux kernel handles what we call "wait states." When a program asks for data and that data is coming from a remote mount, the program enters a "disk wait" state. In Linux, this is often shown as the "D" state in a process monitor. If that wait takes too long because of a network hiccup or a slow A P I, the process can become "uninterruptible." You might have seen this where you try to kill a process with the "kill minus nine" command and nothing happens. The process is just stuck waiting for a response from the file system that might never come.
Corn
I have definitely seen that. It is incredibly frustrating. You end up having to unmount the drive forcefully using "umount minus l" or even reboot the whole machine just to get control back. It feels like the whole O S is held hostage by a single slow packet.
Herman
Exactly. And because Rclone is a user space program, if the Rclone process itself crashes or gets hung, the mount point it created becomes a sort of zombie. Any other program that even tries to look at that folder—even just a background service—will also hang. This is the inherent fragility of the mount model. You are introducing a massive, unpredictable dependency—the internet—into the very core of how your computer operates. A local disk might fail, but it fails in a predictable way. The internet fails in a thousand creative ways every day.
Corn
So, is there a way to make it better? Are there alternative designs that don't rely on F U S E? It seems like F U S E is the bottleneck because it requires the CPU to constantly switch between the kernel and the user space program.
Herman
There are kernel level implementations for some cloud protocols. For example, there is a kernel driver for C I F S and N F S, which are traditional network file system protocols. Because they live in the kernel, they are much more performant and stable. But the problem is that cloud providers like Google and Dropbox don't speak N F S. They speak H T T P and R E S T A P I's. They were built for web browsers, not for operating system kernels.
Corn
So we are stuck with a translation layer. We are trying to fit a square peg in a round hole.
Herman
For now, yes. However, there is a newer technology called Microsoft Project Reunion, or now known as the Windows App S D K, and similar initiatives in the Linux world like G V F S or K I O, that are trying to create "Cloud Sync Providers" at the O S level. The idea is to give the operating system a native way to understand that a file is "online only" without needing a fake virtual disk. This is how the modern OneDrive and iCloud clients work. They aren't mounting a drive in the traditional sense; they are integrated into the file manager itself.
Corn
That seems like a much more robust approach. The file manager knows the file is remote, so it can show a little cloud icon and handle the download gracefully without freezing the entire interface. It can say "Downloading..." instead of just hanging.
Herman
Exactly. It is "asynchronous" by design. The problem is that these A P I's are often proprietary and locked down. Rclone is wonderful because it is open source and supports over forty different providers. It gives you that power for any service, from a high end S three bucket to a cheap Mega account. But the trade off is that it has to use the older, more "brute force" method of F U S E mounting to stay compatible with everything. It is the price of freedom, I suppose.
Corn
I wonder if we will ever see a standardized "Cloud File System" protocol that everyone adopts. Something that has the performance of N F S but the flexibility of a web A P I. It feels like we are still in the Wild West of cloud storage.
Herman
People have been trying to make that happen for decades. Web D A V was supposed to be that, but it is notoriously slow and limited. There are newer efforts like the InterPlanetary File System, or I P F S, which uses a peer to peer model, but that is a whole different rabbit hole involving content addressing and distributed hash tables. For the average person today, the best "fluid" experience is actually a hybrid.
Corn
What does that hybrid look like in practice? If Daniel wants to set this up for his rocket docs, what should he actually do?
Herman
It looks like using a high quality mount client like Rclone with a very well tuned V F S cache. If you give Rclone enough local disk space for a cache—say, a hundred gigabytes—and you tune your buffer sizes and look ahead settings, you can get very close to a local feel. You also have to be smart about your "checkers" and "transfers" settings. If you tell Rclone to check for changes too frequently, you will hit A P I rate limits and everything will grind to a halt.
Corn
That is a good point. I have heard stories of people getting their accounts temporarily banned because they had a script scanning their mounted drive every ten seconds, and the cloud provider saw that as a distributed denial of service attack. Google Drive is particularly sensitive to that.
Herman
It happens more often than you'd think. Especially with providers like Google Drive that have very strict "queries per second" limits. To get a fluid experience, you actually want to be less aggressive. You want to tell Rclone, "Hey, don't check the remote for changes unless I specifically ask, or only do it every thirty minutes." You rely on the cache to provide the speed, and you accept a little bit of "staleness" in exchange for stability. You can also use things like "Rclone rc" to manually trigger a refresh when you know you've added a file.
Corn
So for Daniel, who is dealing with rocket documentation and potentially large data sets, the takeaway might be that there is no "magic button" for a perfect remote sync. It is all about how much local disk space you are willing to sacrifice for a cache. The more you give it, the more fluid it feels.
Herman
Exactly. If you want it to be fluid, you have to give it a "landing pad" on your local drive. Think of it like a buffer in a streaming video. If the buffer is too small, the video stutters every time the network fluctuates. If the buffer is large, you don't even notice the network blips. A volume sync mount is just a giant, persistent buffer for your entire file system.
Corn
I want to go back to something Daniel mentioned about S three buckets. Is there a difference in how a mount performs if it is talking to an object store like S three versus a "drive" service like Dropbox? I know they feel the same in the file explorer, but they must be different under the hood.
Herman
Oh, absolutely. That is a huge distinction that many people miss. Object storage like S three or Backblaze B two is not a file system. It has no concept of folders, really. It is just a flat list of "keys" and "values." When you see a folder in an S three bucket, it is actually just a naming convention. The file isn't "in" a folder; the file is just named "folder slash subfolder slash file dot txt."
Corn
So when Rclone mounts an S three bucket, it has to do a lot of heavy lifting to pretend that those keys are a directory tree. It has to parse all those slashes and build a virtual map.
Herman
Yes, and that makes operations like "moving" a folder incredibly expensive. In a real file system, moving a folder is just a metadata change—you're just changing a pointer. It takes a fraction of a second. In S three, moving a folder means renaming every single object inside that folder. If you have ten thousand files, Rclone has to send ten thousand "copy" commands and then ten thousand "delete" commands. If you do that on a mounted drive, your computer will look like it has completely frozen while Rclone chugs through those twenty thousand A P I calls.
Corn
Wow. So the "lie" that the mount is telling becomes very transparent when you do something that a real file system is good at but an object store is bad at. You're trying to do a metadata operation, but the backend is doing a massive data operation.
Herman
That is the perfect way to put it. It is a useful lie, but it has limits. If you are using Rclone with S three, you have to train yourself not to do massive organization changes through the mount. It is much better to do those through a dedicated tool like the Rclone command line or the provider's web interface. Use the mount for reading, writing, and small edits. Don't try to reorganize your entire archive by dragging and dropping in Finder or Windows Explorer.
Corn
This brings us back to the question of whether a "truly fluid" experience is possible. It seems like the bottleneck isn't just the network; it is the fundamental mismatch between how we want to use data—as a hierarchy of files—and how that data is actually stored in the cloud—as a massive, flat sea of objects.
Herman
I think that is the core of it. We are trying to force a twentieth century model of "files and folders" onto twenty first century "distributed object storage." To get a truly fluid experience, we might need to move away from the idea of a "mounted drive" altogether and move toward applications that are "cloud native"—meaning they know how to talk to the cloud directly and handle their own caching and latency.
Corn
Like how Spotify doesn't "mount" a music folder on your computer; it just knows how to stream music and cache it locally. It handles the "buffer" itself because it knows exactly what kind of data it is dealing with.
Herman
Exactly. Or how Google Docs doesn't need a local file; it is just a direct interface to the data. But for general purpose computing, where we want to use our favorite local tools like V S Code, Photoshop, or Daniel's rocket design software, we are stuck with these bridge technologies like Rclone. And honestly, considering the complexity of what it is doing, I think Rclone is a bit of a miracle. The fact that I can mount a bucket in Amsterdam from my desk in Jerusalem and it works at all is pretty incredible.
Corn
It really is. I think for anyone listening who wants to try this, the key is to start with the Rclone V F S cache settings. Don't just do a basic "rclone mount." Take the time to read the documentation on "v f s cache mode full" and "v f s cache max size." It makes a night and day difference. Also, look into the "attr timeout" flag, which tells the O S how long to remember file attributes like size and modification time. Setting that to a few minutes can drastically speed up browsing.
Herman
And maybe don't put your entire operating system on it! Keep your core apps and configuration local on your N V M e drive, and use the mount for your "cold" or "warm" data—the stuff you need to access but don't need to be editing every second. Use it for your archives, your media library, or your historical documentation.
Corn
Good advice. So, to wrap up the technical side, the "mount" model via F U S E is a translator that turns cloud A P I calls into file system operations. It is inherently prone to latency because of the network, but clever caching can mask a lot of that. The "bugginess" usually comes from applications expecting a local disk's speed and reliability and getting frustrated when the cloud doesn't deliver.
Herman
Spot on. And for Daniel, I'd say: yes, it is challenging to get it working "well," but with enough local disk space for a cache and some patience for the initial directory indexing, you can get a very usable, almost fluid experience. Just don't expect it to behave like an internal drive. Treat it with a bit of respect for the thousands of miles the data has to travel.
Corn
Well, this has been a great dive into the plumbing of the internet. I feel like I understand why my computer sometimes gets "the spins" when I am trying to access my cloud archives. It's not just a slow connection; it's a complex dance of kernel requests and A P I calls.
Herman
It is just the ghost of the internet trying to catch up with your mouse clicks!
Corn
Before we sign off, I want to say a huge thank you to everyone who has been listening. We have been doing this for seven hundred and fifty eight episodes now, and the community of "weird prompters" out there is just fantastic. We've gone from talking about standard operating procedures to the intricacies of F U S E file systems, and you're all still here with us.
Herman
It really is. We love getting these questions that push us to look under the hood of things we often take for granted. If you are enjoying the show, we would really appreciate it if you could leave us a review on your podcast app or on Spotify. It genuinely helps other people find the show and keeps us motivated to keep digging into these topics. It's the best way to support what we do.
Corn
Absolutely. And remember, you can find all our past episodes, show notes, and a contact form at myweirdprompts dot com. We also have an R S S feed there if you want to subscribe directly and avoid the algorithms.
Herman
If you have a question or a topic you want us to tackle—whether it's about rockets, file systems, or anything in between—you can reach us at show at myweirdprompts dot com. We would love to hear from you.
Corn
This has been My Weird Prompts. We are available on Spotify, Apple Podcasts, and wherever you get your podcasts.
Herman
Thanks for listening, and we will catch you in the next one.
Corn
Goodbye, everyone!

This episode was generated with AI assistance. Hosts Herman and Corn are AI personalities.