Skip to content
Odinex Cloud
Concepts

Volumes

Block storage that you attach to servers and grow as you need.

A volume is block storage that exists independently of servers. Attach it to a server to use it like a disk; detach it and attach it to another server to move the data.

  • Size from 10 GB to 10,240 GB (10 TB), billed per GB per month (see Pricing).
  • A volume belongs to a location and can only be attached to servers in that location.
  • A volume is attached to at most one server at a time.
  • Volumes can grow but never shrink. Growing works while the volume is attached and in use.
  • Volumes are not part of server snapshots or backups.
odx volume create --name data --size 50 --server web-1     # create and attach
odx volume resize --size 100 data
odx volume detach data

Using a volume in the server

Volumes are attached as raw block devices; you format and mount them yourself. While a volume is attached, its linux_device field gives a stable device path inside the server, such as /dev/disk/by-id/virtio-1a2b3c4d-… (see odx volume describe data).

DEV=/dev/disk/by-id/virtio-1a2b3c4d-...   # linux_device from the API

# Once, for a new volume: create a file system (this erases the volume)
mkfs.ext4 "$DEV"

mkdir -p /mnt/data
mount "$DEV" /mnt/data

Use the linux_device path rather than names such as /dev/vdb, which can change between boots. Add the volume to /etc/fstab with the nofail option so the server still boots if the volume is detached.

After growing a volume, grow the file system as well, for example resize2fs "$DEV" for ext4 or xfs_growfs /mnt/data for XFS.

On this page