Skip to content

Spheron MS: mounting shared storage

Attach a persistent block volume to a Spheron MS instance at deployment time, then format and mount it like any other block device.

Overview

A Spheron MS volume attaches only while the instance is being created. It is wired in before the machine boots, so the disk is already present the first time you connect. There is no attach or detach for an instance that is already running.

Protocol: Block device (ext4) Connection: Directly attached block device Maximum size: 16 TB per volume Volumes per instance: One Regions: Selected per volume, and must match the instance region

Volume rules

These constraints come from the provider, and the deployment wizard enforces them before anything is created:

  • A volume is chosen at deployment time, and only then. Terminating the instance releases the volume, and you can then select it for your next deployment.
  • One volume per instance.
  • Size and name are fixed at creation. A Spheron MS volume cannot be resized or renamed afterwards. Create a new volume at the size you need and copy your data across.
  • A volume and its instance must be in the same region. The wizard does not offer a volume from a different region, and the API rejects the mismatch before anything is created.
  • The boot disk comes with the machine type. Each Spheron MS machine type ships a fixed boot disk, so its size is shown on the offer rather than being something you set. Pick a machine type with the disk you need, or attach a volume for the rest.

Prerequisites

Before starting, ensure you have:

  1. Created a volume with provider spheron-ms in the region you intend to deploy into
  2. Selected that volume during step 2 of the deployment wizard
  3. SSH access to the instance (credentials in the instance's Details drawer)

Mounting process

Connect to your instance

ssh ubuntu@<your-instance-ip>

See SSH connection setup for detailed connection instructions.

Identify the new disk

lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT

Expected output:

NAME     SIZE TYPE FSTYPE   MOUNTPOINT
sda      512G disk
├─sda1  511G part ext4     /
sdb      2.0T disk                   # attached volume, no MOUNTPOINT

A disk with no FSTYPE and no MOUNTPOINT is raw and ready to format.

Format the disk

sudo mkfs.ext4 /dev/sdb

Create the mount directory

sudo mkdir -p /mnt/data

Mount the disk

sudo mount /dev/sdb /mnt/data
df -h /mnt/data

Persist the mount in /etc/fstab

Device names can change across reboots, so reference the disk by UUID:

sudo blkid /dev/sdb

Add the entry, replacing the UUID with your own:

echo 'UUID=<your-uuid>  /mnt/data  ext4  defaults,nofail  0  2' | sudo tee -a /etc/fstab
sudo mount -a

nofail lets the instance boot even if the volume is absent, which matters because a Spheron MS volume is attached only at creation.

Set permissions

sudo chown $USER:$USER /mnt/data

Move data between volumes

Resizing is not available, so growing your storage means creating a larger volume and copying data to it. Both volumes cannot be attached to one instance, so copy over the network:

# From the old instance, with the old volume mounted
rsync -avz --progress /mnt/data/ ubuntu@<new-instance-ip>:/mnt/data/

Deploy the new instance with the larger volume first, then copy, then terminate the old instance.

Troubleshooting

Issue: The volume does not appear in the deployment wizard

Symptoms: The volumes step lists no volume, or omits the one you created.

Diagnosis: The volume is in a different region from the offer you selected, or it is still attached to a live instance.

Resolution: Create the volume in the same region as the offer, or terminate the instance currently holding it. A Spheron MS volume is released when its instance is terminated.

Issue: There is no attach button on a running instance

Symptoms: The instance panel offers no way to add a volume.

Diagnosis: This is expected. Spheron MS supports attachment only at instance creation.

Resolution: Terminate the instance and deploy a new one with the volume selected in step 2.

Issue: Resize or rename returns an error

Symptoms: PATCH /api/volumes/{volumeId} fails for a Spheron MS volume.

Diagnosis: Size and name are fixed at creation on this provider.

Resolution: Create a new volume at the size and name you want, then copy the data across.

Issue: The disk is missing after a reboot

Symptoms: /mnt/data is empty and lsblk shows no second disk.

Diagnosis: The volume was released when the previous instance was terminated, and the current instance was deployed without it.

Resolution: Redeploy with the volume selected during the wizard's volumes step.

What's next