Attaching a block volume

Attaching a block volume to an instance

Attach the volume during instance creation or later from instance actions. You can also attach via the API.

Once attached, the volume appears as a block device. Example: /dev/vdb.

Replace:

  • <DEVICE> with the device name (example: vdb or nvme1n1)

  • <MOUNT_DIR> with your mount directory (example: data)

1

Attach the volume

Attach the volume to the instance in the console. Or attach it via the API.

2

Find the device in the OS

lsblk

Pick the new disk. Example: vdb or nvme1n1.

3

(Only for new volumes) Create a filesystem

triangle-exclamation
sudo mkfs.ext4 /dev/<DEVICE>
4

Mount the volume

sudo mkdir -p /mnt/<MOUNT_DIR>
sudo mount /dev/<DEVICE> /mnt/<MOUNT_DIR>
5

Use the filesystem UUID to avoid device-name changes.

sudo blkid /dev/<DEVICE>

Then add an entry to /etc/fstab:

grep -qxF "UUID=<UUID> /mnt/<MOUNT_DIR> ext4 defaults,nofail 0 0" /etc/fstab || echo "UUID=<UUID> /mnt/<MOUNT_DIR> ext4 defaults,nofail 0 0" | sudo tee -a /etc/fstab

Instant clusters

circle-info

Currently instant clusters have fixed storage by default. Contact us via chat in the console or email us at [email protected]envelope if you need to adjust your cluster's storage.

Last updated

Was this helpful?