Block Storage Volumes

    Expand your storage capacity with persistent block volumes

    Block storage volumes provide additional persistent storage for your cloud instances. They can be attached, detached, and moved between instances as needed.

    What is Block Storage?

    Block storage volumes (also called Cinder volumes in OpenStack) are persistent storage devices that can be attached to cloud instances. Think of them like external hard drives that can be plugged into any instance.

    Use Cases

    Database Storage

    Keep database files on separate volumes for easier backup and migration.

    Additional Capacity

    Add storage to instances without resizing or migrating.

    Data Persistence

    Keep data safe even if the instance is deleted.

    Portable Storage

    Move volumes between instances for flexibility.

    Creating a Volume

    Step 1: Access the Cloud Control Panel

    Log into the Cloud Control Panel and navigate to Volumes → Volumes.

    Step 2: Create New Volume

    Click Create Volume and configure the following settings:

    • Name - Descriptive name for the volume
    • Description - Optional description
    • Size - Size in GB (minimum 1 GB)
    • Volume Type - Select storage type (SSD recommended)
    • Availability Zone - Must match your instance's zone

    Click Create Volume to provision the storage.

    Attaching a Volume

    Step 1: Attach to Instance

    Once created, attach the volume to an instance:

    1. Select the volume from your volumes list
    2. Click Manage Attachments
    3. Select the instance to attach to
    4. Click Attach Volume

    The volume will appear as a new disk device on your instance (typically /dev/vdb, /dev/vdc, etc.).

    Formatting and Mounting

    Step 1: Check Device Name

    After attaching, identify the device:

    # List all block devices
    lsblk
    
    # You should see your new volume (e.g., vdb)

    Step 2: Format the Volume

    Warning

    Formatting will erase all data on the volume. Only format new volumes or volumes you want to wipe clean.

    Format with your preferred filesystem (first time only):

    # Format with ext4 filesystem
    mkfs.ext4 /dev/vdb
    
    # Or with XFS
    mkfs.xfs /dev/vdb

    Step 3: Mount the Volume

    Create a mount point and mount the volume:

    # Create mount point
    mkdir /mnt/data
    
    # Mount the volume
    mount /dev/vdb /mnt/data
    
    # Verify it's mounted
    df -h /mnt/data

    Step 4: Make it Permanent

    To automatically mount the volume on boot, add it to /etc/fstab:

    # Get the UUID
    blkid /dev/vdb
    
    # Add to /etc/fstab (replace UUID with your actual UUID)
    echo "UUID=your-uuid-here /mnt/data ext4 defaults,nofail 0 2" >> /etc/fstab

    Detaching a Volume

    Step 1: Safely Detach

    To detach a volume from an instance:

    1. First, unmount the volume:
      umount /mnt/data
    2. In the Cloud Control Panel, go to the volume
    3. Click Manage Attachments
    4. Click Detach Volume

    Moving Volumes Between Instances

    Volumes can be moved between instances while preserving all data:

    1. Unmount the volume on the current instance
    2. Detach from the current instance
    3. Attach to the new instance
    4. Mount on the new instance

    This is useful for migrating databases or moving data between instances without any data transfer overhead.

    Volume Snapshots

    Create snapshots of volumes for backup:

    1. Select the volume
    2. Click Create Snapshot
    3. Give it a descriptive name
    4. Click Create Volume Snapshot

    Snapshots can be used to create new volumes, providing an easy backup and cloning mechanism.

    Pricing

    Block storage is billed hourly based on the allocated size:

    • Charged per GB per month (prorated hourly)
    • Billing continues even if volume is not attached
    • Snapshots also incur storage charges
    • Delete unused volumes to avoid charges

    Performance Tips

    Right-size volumes

    Over-provisioning wastes money

    Consider instance storage

    For temporary data, use instance disk instead

    Regular snapshots

    Create backups of important volumes

    Limitations

    • Volumes must be in the same region as the instance
    • A volume can only be attached to one instance at a time
    • Volume size can be increased but not decreased
    • Maximum volume size varies by plan and region

    Pro Tip

    Use block storage for data you want to persist beyond the instance lifetime. For temporary or disposable data, use the instance's local storage to save costs.