Skip to main content
A disk is storage that lives on its own. Create it once, attach it to a machine, and later move it to a different machine without losing what is on it. A machine’s own 100 GB disk goes away with the machine. A standalone disk does not. Disks are managed from the console’s Disks page, with boxd disks on the CLI, and from the SDKs.

Create and attach

A disk is always created writable. Read-only is chosen per attachment. Names are unique within an org, and a disk is creating until its storage is allocated, so attach waits for ready. One attachment at a time. A disk’s storage is opened read-write by the machine that holds it, so a second attachment would be a second writer to the same bytes. Detach before attaching elsewhere.

Attaching at creation

A disk lives on one host, and a machine can only mount a disk on the host it runs on. Attaching to a machine that already exists therefore works only when the two happen to share a host. To pair a disk with a new machine, attach it at creation, and the machine is placed on the disk’s host:
The form is <disk>[:<mount-path>][:ro], with the disk by name or id. The SDKs take the same thing as volumes on create. A machine restored from a snapshot cannot take a disk at creation, since a restore rebuilds exactly what was captured. Create it first, then attach.
The console’s Attach picker lists only the machines on the disk’s host. When the machine you want is not there, create a new one with the disk attached from the start, with boxd new --disk or the SDK’s volumes.

Inside the machine

The disk shows up as a block device mounted at the path you chose, formatted and ready. An attached disk’s size and mount path appear on the machine’s Overview page in the console.

From the SDKs

See the Python SDK and TypeScript SDK references.