Skip to Content
Open Beta — managed Kubernetes, DNS & more are live.
🧱

Block storage (volumes)

Updated 2026-11-20
On this page

Block storage (volumes)

A block volume is a durable virtual disk you attach to an instance to add capacity that lives independently of the server, so your data survives a rebuild, a resize or the instance being deleted.

Where an instance's root disk is tied to the instance itself, a volume is a separate resource with its own lifecycle. You create it once, attach it to a running instance, format it and mount it, and it keeps your data even if you later detach it and move it to another instance.

Volumes are replicated in the storage backend for durability. You can grow a volume, capture point-in-time snapshots for backup or cloning, and pick a volume type when more than one is offered.

Screenshot — The Storage > Block storage list showing volumes with their size, type and attachment status
The Storage > Block storage list showing volumes with their size, type and attachment status

Key concepts

Volume — A network block device you attach to one instance at a time and mount like a physical disk.

Volume type — The class of storage a volume is created from; the choices offered depend on your project.

Attachment — The link between a volume and the instance it is currently connected to, exposed as a device such as /dev/vdb.

Snapshot — A point-in-time copy of a volume you can restore from or use to create a new volume.

Extend — Growing a volume's capacity in place; you then grow the filesystem inside the guest.

Before you start

  • A running instance to attach the volume to.
  • Enough block-storage quota in the project for the size you want.
  • Console or SSH access to the instance so you can format and mount the new device.

Step by step

  1. Open the create form

    Go to Storage > Block storage and choose Create volume.

    Screenshot — The Create volume button on the Block storage page
    The Create volume button on the Block storage page
  2. Set name, size and type
    • Give the volume a recognizable name.
    • Choose a size in GB sized for your data plus room to grow.
    • Pick a volume type if more than one is available.
    • Optionally create the volume from an image or clone an existing volume as the source.
    Screenshot — The Create volume form with the name, size and type fields
    The Create volume form with the name, size and type fields
  3. Create and wait

    Submit the form and wait for the volume to reach the Available state before attaching it.

  4. Attach it to an instance

    Open the volume's actions and choose Attach, then select the target instance. The volume moves to In-use once connected.

    Screenshot — The attach-to-instance dialog listing available instances
    The attach-to-instance dialog listing available instances
  5. Format and mount inside the guest
    • Connect to the instance.
    • Find the new device (often /dev/vdb).
    • Create a filesystem and mount it, then add it to /etc/fstab so it remounts on reboot.

Examples

Find, format and mount the new disk (Linux)
lsblk
sudo mkfs.ext4 /dev/vdb
sudo mkdir -p /data
sudo mount /dev/vdb /data
echo '/dev/vdb /data ext4 defaults,nofail 0 2' | sudo tee -a /etc/fstab
Grow the filesystem after extending the volume
# after Extend in the console, from inside the instance:
sudo resize2fs /dev/vdb
Create, attach and extend a volume (Patrii CLI)
patrii volume create --name app-data --size 100
patrii volume attach <volume-id> --server <server-id>
# later, to grow it
patrii volume extend <volume-id> --size 200
Create and attach a volume with Terraform
resource "patrii_volume" "data" {
  name = "app-data"
  size = 100
}

resource "patrii_volume_attachment" "data" {
  volume_id   = patrii_volume.data.id
  instance_id = patrii_instance.web.id
}

Limits & specifications

Actions available on a volume:

ActionWhat it does
AttachConnect the volume to a running instance.
DetachDisconnect it so you can move it to another instance.
ExtendIncrease the volume's capacity; grow the filesystem afterward.
SnapshotCapture a restorable point-in-time copy.
DeletePermanently remove the volume once it is detached.

Best practices

  • Keep application data on a volume, not the root disk, so it survives a rebuild.
  • Unmount cleanly inside the guest before detaching a volume.
  • Snapshot before risky changes so you can roll back.
  • Use nofail in /etc/fstab so a detached volume never blocks the instance from booting.
  • Size for growth, but remember you can always extend later.

FAQ

Can two instances use the same volume at once?
No. A volume attaches to one instance at a time. For shared access from several instances, use an NFS file share instead.
I attached the volume but do not see it in the instance.
The device appears as a new disk (for example /dev/vdb) but has no filesystem until you create one. Run lsblk to find it, then format and mount it.
Does deleting an instance delete its volumes?
Volumes are separate resources. A volume you created and attached remains after the instance is gone, unless you delete it explicitly.
How do I make a volume bigger?
Use Extend from the volume's actions to grow the capacity, then grow the filesystem inside the guest (for example resize2fs).

Learn more

Everything you can do here in the console is also available through the Patrii Cloud API for automation and scripting.

Was this article helpful?
Thank you for your feedback. Still stuck? Contact us