Estimated reading time at 200 wpm: 13 minutes
This post is what happened after attempts with OneDriver failed miserably. The landscape for cloud storage integration on Linux desktops often involves a trade-off between simplicity and stability. Many lightweight drivers attempt to provide a “native” feel but stumble when confronted with the aggressive I/O demands of modern desktop environments like KDE Plasma. This analysis examines the transition from a basic FUSE-based driver (OneDriver) to a robust, cached Rclone architecture.
Whether or not you agree our Fat Disclaimer applies
The Problem: The Synchronisation Death Spiral
Basic drivers often lack sophisticated buffering. When a desktop indexer—such as KDE’s Baloo—attempts to scan a cloud-mounted directory for thumbnails or metadata, it generates a high frequency of system calls. In simpler drivers, these calls are passed directly to the cloud API.
If the API latency spikes or the driver fails to interpret specific kernel commands (like STATX), the driver can hang. This results in a “Kernel I/O Stall,” where the entire operating system appears to freeze while waiting for a response from the filesystem. This cycle often ends in a crash loop, effectively choking the system’s input/output queue and causing significant UI lag. AI was bent on fixing OneDriver. I spotted the ‘rabbit hole’ and directed it to find another solution – something else. It was then that I came across Rclone.
The Rclone Mechanism: VFS Caching as a Buffer
Rclone addresses these stability issues through its Virtual File System (VFS) Cache. Instead of acting as a transparent window to the cloud, Rclone functions as a sophisticated middleman.
- The Logic: The VFS cache creates a local representation of the cloud’s file structure. This “representation” is split into two distinct layers:
- Metadata Layer (The Skeleton): Rclone downloads the entire directory tree, filenames, and file sizes into local memory. When browsing a folder, the file manager (Dolphin) is talking to this local “map” rather than the cloud.
- Data Layer (The Bytes): Only when a file is actually opened does Rclone pull the data chunks from the cloud, storing them in a defined local buffer (e.g., 10GB).
- The Result: The system experiences near-instantaneous responses. Even if the internet connection fluctuates or the indexer makes thousands of metadata requests, the desktop environment remains responsive because it is interacting with a local buffer rather than a remote server.
Architectural Contrast: Rclone vs. OneDriver
The fundamental difference lies in Statefulness vs. Statelessness.
| Feature | OneDriver (Stateless) | Rclone VFS (Stateful) |
|---|---|---|
| Request Handling | Acts as a “live translator.” Every mouse click or folder expansion is sent to Microsoft’s API in real-time. | Acts as a “local librarian.” It answers most OS questions using its local cache. |
| Error Tolerance | If the API returns an error or a delay occurs, the driver crashes immediately, locking the kernel queue. | If the cloud is slow, the VFS layer “fakes” the response or tells the OS to wait, preventing a system-wide freeze. |
| Compatibility | Fails when encountering modern kernel calls like STATX (Opcode-52) because it cannot “buffer” or interpret unrecognised commands. | Interprets complex kernel calls locally. Because it has a local representation of the file, it can fulfil STATX requests without needing the cloud’s permission. |
Part 1 – Simpler procedure (on BigLinux laptop).
Install rclone from BigStore.
Then rclone config in Konsole.
See the menue options menu. Follow these specific inputs exactly:
- n) for “New remote”. Type
nand hit Enter. - name: Type
onedriveand hit Enter. - Storage Type: You will see a long list. Look for Microsoft OneDrive. Type the number next to it (it is usually 31, 32 or 41) and hit Enter.
- client_id: Leave this blank. Just hit Enter.
- client_secret: Leave this blank. Just hit Enter.
- region: Type
1(for Microsoft Cloud Global) and hit Enter. - tenant: leave blank – hit enter and move on.
- Edit advanced config? Type
nand hit Enter. - Use auto-config? Type
yand hit Enter. - Option config_token? Hit Enter to leave empty.
Most of the other options are intuitive. This is not a tutorial or hand-holding session.
Setting up Rclone through a GUI or a basic config often leaves out the actual “mounting” part, which is why the drive doesn’t just show up in Dolphin automatically. Here is the path we took to bridge that gap.
1. Identifying the Remote
Before mounting, you had to know exactly what Rclone named the connection during your initial setup.
rclone listremotes
What it did: This queried the rclone.conf file. It confirmed your remote was named onedrive:. The colon at the end is mandatory in rclone commands because it distinguishes a “remote” from a local folder.
2. Preparing the Mount Point
You chose to mount the drive at /mnt/STORAGE/ONEDRIVE. Because the /mnt directory is usually owned by the root user, your standard user account didn’t have the “right” to write to it or mount things there.
sudo chown $USER:$USER /mnt/STORAGE/ONEDRIVE
What it did: This changed the owner of that specific folder from root to your current username (r3dell). This is why the later mount commands stopped complaining about missing permissions.
3. Unlocking System FUSE Permissions
When you mount a cloud drive outside of your “Home” folder, the Linux kernel’s FUSE (Filesystem in Userspace) system blocks other applications (like Dolphin) from seeing the files unless a specific safety flag is toggled.
Instead of wrestling with text editors like Nano or Kate (which sometimes block root-level editing for safety), we used a stream editor command:
sudo sed -i 's/#user_allow_other/user_allow_other/' /etc/fuse.conf
What it did: It searched the system configuration file /etc/fuse.conf for the line #user_allow_other and removed the #. This “uncommenting” tells the system: “It is okay for a normal user to share their mounted drives with the rest of the system.”
4. The Final Mount Command
This is the core instruction that keeps the connection alive.
rclone mount onedrive: /mnt/STORAGE/ONEDRIVE --vfs-cache-mode writes --allow-other &
The Break down:
rclone mount onedrive:: Starts the mounting process for your specific remote./mnt/STORAGE/ONEDRIVE: The local destination where the files appear.--vfs-cache-mode writes: This is vital for KDE/Dolphin. It creates a temporary buffer on your hard drive so that when you save a file in an app, Rclone handles the upload in the background. Without this, many apps will crash when trying to save directly to the cloud.--allow-other: This tells the system to let Dolphin and other users see into the folder.&: This pushes the process into the background. It allows you to close the terminal (or keep using it) without killing the connection.
5. Troubleshooting and Maintenance
During the process, we hit an “Already Mounted” error. This happens if a previous attempt is still hanging around in the system’s memory.
killall rclone
What it did: It force-closed any active Rclone processes. This “cleared the deck” so a fresh, clean mount command could be issued without conflicts.
6. Persistence
To avoid doing this manually after every reboot, the command was added to the KDE Autostart settings. This ensures that as soon as you log into your BigLinux desktop, the mount command runs in the background, making the OneDrive folder behave like a permanent local hard drive.
Technical Implementation: The Configuration Phase
Deploying Rclone requires a multi-step authentication and configuration process, moving away from simple GUI-based logins towards a more resilient token-based system.
- Remote Definition: A new remote (e.g.,
onedrive) is defined within the Rclone configuration utility. - Authentication Handshake: The system utilises an OAuth2 flow. Rclone hosts a temporary local server (usually on
localhost:53682) to capture the redirect from Microsoft’s login portal. - The Token Response: Upon a successful login, the terminal receives a complex JSON object containing the security credentials. This “token” acts as the persistent key for the connection:
{
"access_token": "EwB4BMl6BAAUu4...[TRUNCATED]",
"token_type": "Bearer",
"refresh_token": "M.C551_BAY.0.U...[TRUNCATED]",
"expiry": "2026-02-11T05:48:57.346575163Z"
}
- Drive Selection: The specific drive ID (e.g.,
652CB75404C0C40D) is identified through the Rclone interface, ensuring the mount targets the correct personal or business container.
System Permissions: Overcoming the FUSE Barrier
A common roadblock in Linux cloud mounts is the security restriction on sharing filesystem access between different users or processes. By default, a mount created by a user is invisible to other system components. Enabling seamless integration requires modifying the global FUSE configuration:
- Target File:
/etc/fuse.conf - The Modification: The
user_allow_otherdirective must be uncommented.
This administrative change allows the Rclone process to “hand off” the filesystem view to the desktop environment, ensuring that files are visible across the entire UI.
Verification and Diagnostic Procedures
On this device onedrive will be located at OneDriveLnX. This is a better way to label the Linux Onedrive. But note that this ‘folder’ does not occupy space on the Linux hard drive or anywhere else – it lives in the Cloud.
- Manual Mount Simulation: Executed directly in the terminal to isolate permission issues:
/usr/bin/rclone mount onedrive: /mnt/S990PRO/OneDriveLnX --vfs-cache-mode full --allow-other
- Stale Mount Clearance: If a previous attempt leaves a “ghost” mount, the following command force-detaches the filesystem:
fusermount -uz /mnt/S990PRO/OneDriveLnX
The Engine: Systemd Service Logic
[Unit]
Description=Rclone OneDrive Mount
After=network-online.target
[Service]
Type=notify
ExecStartPre=/usr/bin/mkdir -p /mnt/S990PRO/OneDriveLnX
ExecStart=/usr/bin/rclone mount onedrive: /mnt/S990PRO/OneDriveLnX \
--config=%h/.config/rclone/rclone.conf \
--vfs-cache-mode full \
--vfs-cache-max-size 10G \
--vfs-read-ahead 128M \
--dir-cache-time 5m \
--vfs-cache-max-age 1h \
--allow-other
ExecStop=/usr/bin/fusermount -uz /mnt/S990PRO/OneDriveLnX
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
Key Performance Flags Explained
--vfs-cache-mode full: The most critical setting for desktop users. It ensures that files are cached locally for both read and write operations, preventing UI freezes during high-volume activity.--vfs-cache-max-size 10G: Sets a ceiling on disk usage, ensuring the cache does not expand indefinitely.--dir-cache-time 5m: Keeps the folder structure in memory for five minutes, making navigation between subdirectories feel native.
Operational Monitoring
The health of the mount can be verified through standard systemd monitoring tools. A status of active (running) indicates a stable connection.
systemctl --user status rclone_onedrive.service
Successful deployment results in a significant reduction in system interrupts and a vastly improved user experience on high-performance Linux workstations, as the VFS cache manages the aggressive indexing demands of the desktop environment.
The Emergency Stop & Recovery
Why this happens
After a major BigLinux update, you might find Dolphin becomes “sticky” or entirely unresponsive. This usually occurs because the update has caused a version mismatch between the Rclone binary and the kernel’s FUSE module, or it has corrupted the authentication token (resulting in errors like JWT is not well formed).
When this happens, Dolphin tries to read the mount point, Rclone fails to respond, and the file manager “hangs” indefinitely while waiting for the handshake.
The Recovery Path
While you can attempt to debug individual FUSE handles, the law of diminishing returns suggests that a full reinstall is the most efficient path. It flushes the stuck kernel handles and ensures the binary is perfectly synced with your updated system.
1. Kill the zombie processes:
# Force kill the processes to unfreeze the UI
killall -9 dolphin
killall -9 rclone
# Force the kernel to drop the "ghost" mount (Lazy unmount)
sudo umount -l /mnt/S990PRO/OneDriveLnX
2. Execute the Reinstall: Follow Section 1 (The Clean Slate) at the top of this guide. By removing the old binary and wiping the ~/.config/rclone and ~/.cache/rclone folders, you eliminate the corrupted tokens and start with a fresh, system-compatible environment.
Conclusion
The journey has been a long one but well worth it. Rclone functions like the real deal. This means I can use all my documents normally backed up in OneDrive – and delete old ones if I want – just like if I’m working in Windows 11. Like right now I have Zettlr on Linux hooked into the chapters I’m authoring in OneDrive.
It occurred to me ‘Why did you not do this sooner – it would have save a lot of time?’ True – but at the time I nor AI flagged it as an option.
Technical Glossary: The “Noob” Guide to Linux Internals
Kernel: The “brain” of the operating system. It manages the CPU, memory, and hardware. When a filesystem driver (like OneDriver) crashes, the Kernel often waits for it to respond, which is why your mouse and keyboard “freeze”—the brain is stuck waiting for an answer that isn’t coming.
I/O (Input/Output): The flow of data between your computer and its storage. An “I/O Stall” or “Hang” is a traffic jam where data stops moving, usually causing the entire computer to lag.
Mounting: The process of attaching a storage device (or a cloud drive) to a specific folder on your computer. When you “mount” OneDrive, you are telling Linux: “Treat this folder as if it were a physical hard drive.”
FUSE (Filesystem in Userspace): A software bridge that allows non-system programmes (like Rclone or OneDriver) to act as filesystems. Without FUSE, you would have to write complex code directly into the Kernel to see your cloud files.
VFS (Virtual File System): A layer inside the Linux Kernel that allows apps to talk to different types of storage (SSD, USB, Cloud) using the same language. Rclone’s “VFS Cache” acts as a smart translator that remembers the file list so the Kernel doesn’t have to keep asking the cloud.
STATX: A modern Linux command used by desktop environments (like KDE) to ask for a file’s “metadata” (size, date, name). OneDriver didn’t understand this command, which is why it crashed when KDE’s file indexer started scanning the drive.
Metadata: “Data about data.” This includes the filename, the date it was created, and its size. Metadata is the “Skeleton” of your files.
Daemon: A programme that runs quietly in the background without a window. Your Rclone service is a “daemon”—it starts when you log in and stays running so your files are always there.
Systemd: The system manager that handles all the background “daemons” on Linux. It’s responsible for starting your OneDrive mount and restarting it if it ever fails.
OAuth2 / Token: A security “handshake.” Instead of giving Rclone your Microsoft password, you log in via a browser. Microsoft then gives Rclone a “Token” (a digital key). This is safer because if the key is stolen, the hacker still doesn’t have your actual password.
FUSE.conf: A gatekeeper file on your system. It contains the rules for how FUSE drives are allowed to behave. The user_allow_other setting is the specific rule that lets a background service share its files with your desktop file manager.
Endpoint / Remote: In Rclone, this is the “nickname” for your connection. We named yours onedrive. It tells the software exactly which cloud account and settings to use when mounting the drive.











