/dev/fuse, root, permission to mount, and outbound TCP 8100 and 32050. See
Requirements for the full list and which environments support mounting. The main difference is that the platform can stop the machine while the disk is still mounted, for example when a sandbox reaches its timeout. In Archil sandboxes, Archil mounts disks for you, and a clean stop or pause flushes them. This page covers what happens then, how to recover, and a few platform-specific details.
A sandbox stopped with the disk mounted
Thearchil client buffers recent writes in memory and sends them to the disk in the background. A plain (exclusive) mount also holds a lock on the disk, called a delegation, so that no other client writes to it at the same time. archil unmount sends every buffered write and then releases the lock.
If the sandbox is killed, stopped, or times out before it unmounts:
- Recent unsynced writes can be lost. Writes the client hadn’t sent yet never reach the disk. Writes that
fsyncreturned for are already durable. - The disk stays locked. The lock still belongs to the client in the old sandbox, so the next exclusive mount fails with:
finally block or a shell trap before you stop the sandbox (on Daytona, run archil sync and archil checkin instead, as described below), and give the sandbox a timeout longer than the work it does.
Release a stale lock
Archil doesn’t release the lock on its own, and a new sandbox that mounts the disk is a new client, so it can’t release the old one’s lock either. Once the old client stops responding, Archil marks its delegations as orphaned, usually within a minute. Revoke them with the SDK from your machine:archil mount --force also takes the disk back, but it revokes every other client’s delegations, including those of sandboxes that are still running. See Forcing ownership.
Platform notes
E2B
- Run
archil mountandarchil unmountwithuser: "root". As the defaultuser, the mount fails withThe mount command requires root privileges. - E2B kills a sandbox when it reaches its timeout, whether or not the disk is unmounted. Set
timeoutMs(timeoutin Python) longer than the session.
Daytona
archil unmountfails inside a Daytona sandbox withUnable to unmount disk: GenericFailure("No such file or directory (os error 2)"), because the container runtime doesn’t let the client detach a FUSE mount (umountandfusermount3 -ufail too). Runsudo archil sync <path> && sudo archil checkin <path>instead:syncsends every buffered write, andcheckinreleases the lock. Then delete the sandbox.- Daytona stops a sandbox after 15 minutes without activity by default. If a session can sit idle longer, raise
autoStopIntervalwhen you create the sandbox. - Pass the mount token as a regular environment variable. With a Daytona secret, the sandbox sees a placeholder instead of the token, and the mount fails with
Authentication failed.
Modal
archil mountonly works in VM Sandboxes (runtime="vm"). In Modal Functions and in Sandboxes on the default gVisor runtime, it fails withOperation not permitted (os error 1). From those, read and write the disk with the Python SDK instead.- Modal terminates a Sandbox at its
timeoutwithout running a shelltrap. Settimeoutlonger than the work.
Vercel Sandbox
- When a sandbox stops or reaches its
timeout, the client usually sends its writes and releases the disk on the way out. Stopping it in the middle of heavy writes, such as annpm install, can still leave the disk locked. Unmount beforestop(), and callsandbox.extendTimeout()for long jobs. - Create the sandbox in the Vercel region next to the disk’s region (
iad1foraws-us-east-1,pdx1foraws-us-west-2,dub1foraws-eu-west-1). In a distant region, every read that misses the cache crosses the country.