Skip to main content
A disk fits state that expects a local filesystem: git repositories, node_modules, databases, package caches. It is ext4 on the machine running the pod, so file locks, hard links, and fsync behave as they do on any Linux host. A volume fits files shared between workloads.

Declare a disk

The first deploy creates the disk, and every later deploy that names it gets the same files. A disk name means the same disk anywhere in the workspace. size takes the units memory does, from 1Gi to 1Ti. Deploying a larger size restarts the pod with the disk grown to it. A deploy with a smaller size fails, because a disk never shrinks. mount_path defaults to /, which makes the disk hold the container’s whole writable filesystem: packages installed with apt-get, files in /root, and anything else written outside a volume. The image still comes from the deployment, so a redeploy with a new image keeps what was written on top of it. Disk("cache", size="20Gi", mount_path="/cache") mounts at one directory instead.

How it persists

While the pod runs, LazyCloud copies what changed to your workspace’s storage every two minutes, and once more when the container stops. The next start restores that copy on whichever machine it lands on, so a disk is never tied to one machine. A restart within 30 minutes in the same zone skips the download. A machine failure can lose up to the last two minutes of writes. One container writes a disk at a time. A pod with a disk runs one container, and a redeploy’s new container waits for the old one to hand the disk over.

List and delete

Deleting a pod or its deployment never deletes the disk, and deleting the disk removes everything written to it. A disk in use can’t be deleted. The storage page lists disks as well.

Pricing

Each disk is one line on the Usage page, priced from two rates on the pricing page. What the disk stores bills per GiB-month for as long as it exists, and that can be less than its size. Its declared size bills per GiB-month for the time a container holds it. Disks need a paid plan. The plan caps the total declared size of a workspace’s disks, and a deploy past the cap fails with a message naming the cap.