S Simplewala

Storage & volumes

Block storage volumes provide durable, persistent storage that outlives server restarts and can be reattached to new servers. Databases use volumes automatically.

How volumes work

A volume is a network-attached block device provisioned from your cloud provider (DigitalOcean Volumes or provider volumes). It mounts at a fixed path on your server and Docker containers can bind-mount it for data persistence.

Unlike the server’s root disk, volumes are independent resources. If you terminate a server, volumes can be detached first and reattached to a new server, preserving all data.

Automatic volumes for databases

When you install a database, Simplewala automatically creates a dedicated volume and mounts it to the container’s data directory. You do not need to manage this manually. The volume appears in the Storage section and is labelled with the database name.

Creating a volume manually

  1. Navigate to Storage in the server sidebar.
  2. Click Add Volume.
  3. Choose a size (GB) and give the volume a name.
  4. Click Create.

The volume is provisioned at the cloud provider and mounted to /mnt/<volume-name> on the server. This typically takes 30–60 seconds.

Mount paths

Volumes mount at /mnt/<volume-name> by default. To use the volume in a Docker container, add a bind mount:

docker run -v /mnt/myvolume:/data myimage

Or in a Compose file:

volumes:
- /mnt/myvolume:/app/data

Resizing a volume

From the Storage page, click the volume and select Resize. Enter the new size (must be larger than current size). The volume is resized at the provider level. After resizing, the filesystem is expanded automatically — no manual resize2fs required.

Detaching and reattaching

Stop any processes that have open files on the volume before detaching. From the portal, click Detach on the volume card. The volume can then be reattached to a different server from its detail page.

Note: Detaching a database volume while the database container is running will cause data loss. Always stop the container first.

Data after server termination

When a server is terminated through the portal, attached volumes are automatically detached and preserved. Your data is not deleted. You can reattach the volume to a new server from the Storage section.

Moving data — disks, volumes and servers

Data migration moves a resource’s data somewhere better: off a server’s own disk onto block storage, from one volume to another, or onto a different server entirely. It works the same way for a database, a WordPress site, a Git app, a mail store, a container registry, an observability store and a repository store. In the portal it is Data migration in the left-hand navigation.

When it is worth doing

  • Server disk is not durable. Anything on a server’s own disk disappears if the machine is rebuilt or resized, and it cannot be detached and carried elsewhere. Block storage can. If the migration page lists a resource as “Server disk”, that is the first thing worth fixing.
  • Volumes fill up and workloads change shape. Moving a busy database onto its own volume, or off one that is running out of room, is routine rather than an emergency.
  • Servers are not permanent. A bigger machine, a different region, or simply a different machine — same operation, different destination.

How much downtime

Much less than people assume, and it does not scale with how much data there is. The long part — the copy — happens while the resource is still running and serving traffic. The interruptions come at the end and are seconds each: a short stop so the last changes can be copied consistently, and a restart at cutover. If you booked a maintenance window you will not need most of it.

What happens, in order

  1. Precheck. Before anything moves you see four things: how much data there is and whether it fits; which secrets, environment variables and certificates are involved and how each survives (vault-managed secrets travel with the resource, TLS certificates are re-issued on the destination rather than copied, because private keys should not be moved between machines); what connects to this resource; and what it connects out to. Anything red blocks the migration — most often a destination server with no block storage attached.
  2. Copy. The resource keeps running. Permissions, ownership, hard links and extended attributes are preserved.
  3. Verify. The resource stops briefly, late writes are synced, and it restarts — before checking begins, so a slow check does not become a slow outage. Total size, file count and a SHA-256 fingerprint must all agree, and then the copy is started under a throwaway container to prove it actually runs.
  4. Cut over. Only now does anything change. The original container is stopped and kept under a _premigrate name — not deleted. The replacement takes the same name, port, network and limits, so anything addressing it by name or port keeps working. Routes, load balancer backends and connection strings are repointed.
  5. Retain for 7 days. The previous data is moved aside, not removed.

If verification fails, nothing is switched over. The resource carries on exactly where it was and the copy is left in place to be examined.

Rolling back

Roll back to the original on the migration’s page restores the previous container. It takes seconds, because there is no data to restore — the original was never deleted. It is offered for the whole retention window and disappears once the retained data is removed.

That window defaults to 7 days and can be extended to 30, or ended early with Remove now and reclaim the space — which asks for confirmation, because it is what makes the migration permanent. Retained data counts toward volume usage until removed, so clearing an old migration you are happy with is the quickest way to free a tight volume.

Moving to a different server

A same-server move changes nothing about how the resource is addressed, which is what makes it the safest kind. Crossing servers changes the address, so four things need attention:

  • DNS. Records managed here are updated at cutover; records held elsewhere you change yourself.
  • Certificates. Re-issued on the destination, which only succeeds once DNS has propagated — expect a short window of serving without HTTPS.
  • Hand-written configuration. A database address hard-coded inside an application’s own config file is invisible to the platform and will not be rewritten. The precheck says so.
  • Your secrets vault. If OpenBao runs on the source and the destination has none, the migration is refused rather than producing a resource that boots without its secrets.

Common questions

Several at once? Yes, but each migrates independently. If an app and its database both need moving, move the database first and let it finish, so the app’s connection string is rewritten to the final address.

What if the server goes offline mid-migration? It is marked failed within a few hours. Nothing was cut over and nothing was deleted; start again when the server is back.

Can verification be skipped to go faster? No. Verification is what makes the cutover safe, and there is no bypass.

What happens to backups? Nothing. A migration changes where live data sits, not backup history.

Troubleshooting

Volume not appearing after creation

Refresh the Storage page. If it still does not appear, check the command log for the volume provisioning command. Common causes: cloud provider quota exceeded, or the volume creation API call timed out.

Disk full errors despite volume attached

Confirm the volume is mounted (df -h | grep /mnt). If the root disk (/) is full rather than the volume, data is being written to the wrong path. Check your Docker container’s bind-mount configuration.