Linux mount

Mount every drive as an ordinary folder on a render node, server or CI machine with no desktop, through FUSE, with a token and a systemd service.

這一頁還沒有翻譯,所以先以英文顯示。

On Linux machines without a desktop (render nodes, servers, CI runners), one command mounts all your drives as an ordinary folder that any program can read and write.

Install the command line from your server. The script picks the build for the machine's architecture, checks its SHA-256 and remembers the server:

Shell
curl -fsSL https://side.space/install.sh | sh

Then:

Shell
side login you@example.com        # or use a token, see "Unattended" below
side mount --at ~/SideSpace       # Ctrl-C or umount ~/SideSpace to stop
ls ~/SideSpace                          # one folder per drive

How it works

  • It mounts through FUSE, with the same logic as the Mac's mount.
  • Reading a large file fetches only the part you use: a player that jumps to minute 40 downloads only the chunks around it, not the whole file first.
  • Writes stay on the machine first. Once a file has been quiet for 2 seconds it is saved as a new version; fsync saves at once.
  • Programs that save through a temporary file and a rename keep the file's history: the result is a new version of the original.
  • mv and mkdir reach the drive. rm moves a file to the trash for 30 days. rmdir removes only empty folders.
  • Changes others save show up within about a second: new files appear, and reopening a file reads the new content.
  • When it stops (Ctrl-C, SIGTERM, umount) it saves pending writes first, then unmounts. A mount point left behind by a crash is cleared on the next start.
  • Running as root needs nothing else. Other users need fusermount3 from the fuse3 package: apt install fuse3.
  • Only the user who mounted can see the files. Add --allow-other to let other users on the machine in; without root, also enable user_allow_other in /etc/fuse.conf.

How fast it feels, measured, is on the performance page.

Unattended: a token and a mount at boot

To avoid signing in to an account on the machine, give it a token of its own, limited to the drives and permissions it needs:

Shell
# on your own computer
side token create render-01 --scope files:read --scope files:write

Then, on the machine, one command installs a systemd user service that keeps the drives mounted at ~/SideSpace, restarts it after a crash and saves before it stops. --boot mounts at boot too, with nobody logged in:

Shell
side daemon install --token ssp_… --boot   # or sign in first and leave out --token
side daemon status
journalctl --user -u sidespace-mount             # logs
side daemon uninstall                       # stop and remove it

--at DIR mounts somewhere else and --allow-other lets other users in. The service's settings (the server, and the token when you give one) are in ~/.config/sidespace/mount.env, readable only by you.

The token sees only the drives it was given. Revoke it on the dashboard's API keys page or with side token revoke and the machine loses access at once.

Updates

side update replaces the binary with the newest build your server publishes, after checking its SHA-256. side update --check only says whether there is one. A running mount keeps the old binary until it restarts: systemctl --user restart sidespace-mount.

Packages

scripts/package-linux.sh builds a static side in a rust:alpine container, so it doesn't depend on the glibc version and runs on any distribution. It makes two files:

  • sidespace-<version>-linux-<arch>.tar.gz: the binary, the service file and these instructions.
  • sidespace_<version>_<arch>.deb: installs /usr/bin/side and the user service in /usr/lib/systemd/user/, and recommends fuse3.

A server publishes them for install.sh and side update with SIDESPACE_RELEASE_LINUX_X86_64_* and SIDESPACE_RELEASE_LINUX_AARCH64_* (VERSION, URL of the tarball, SHA256; see the deployment guide). SIDESPACE_RELEASE_LINUX_* is used when there is no build for the machine's architecture.

Or NFS

Where FUSE isn't available (a container without /dev/fuse, for example), side mount --nfs serves the drives over NFS and prints the matching sudo mount -t nfs … line. It needs nfs-common.