Skip to content

Volumes

🔧 Under Development

This page is under active development. Content is being updated as we prepare the new version of ScienceCloud for production. Some sections may be incomplete or subject to change.

Create volume

  1. Log in to ScienceCloud Web Interface: https://cloud.science-it.uzh.ch
  2. Go to Volumes > Volumes.
  3. Click Create Volume.
  4. Enter: Volume Name and Size (GB).
  5. Click Create Volume.

Manage volumes on instances

Attach a volume to an instance

  1. On Volumes tab, select your volume.
  2. From drop-down Edit Volume list, select Manage Attachments.
  3. From Attach to Instance list, choose the instance you wish to attach the volume to.
  4. Press Attach Volume.

First-time use: mount and format

Once a volume is attached to an instance, it becomes visible to the operating system but may be in a blank state (without a filesystem). To use it, you need to identify the device, format it only once, and then mount it.

Danger

⚠️ Formatting will erase all data on the volume.

Perform the formatting step only the first time you attach a new or empty volume.

  1. Identify the volume device name. In the ScienceCloud Web Interface, go to Volumes > Volumes and check the Attached To field for device names like /dev/vd{x} or /dev/sd{x}, where {x} is a lowercase latin letter like a, b, etc. Alternatively, use the following commands inside your instance to list all block devices attached to the instance:
    lsblk
    
    or
    sudo parted -l
    
  2. Format the volume (if new/empty). Format your new disk into ext4 (recommended file system).
    sudo mkfs.ext4 /dev/vd{x}
    
    or
    sudo mkfs.ext4 /dev/sd{x}
    
    Replace {x} with the correct device name.
  3. Mount the volume. Once the volume has a file system, mount it using:
    sudo mount /dev/vd{x} /mnt
    
  4. Verify the mount
    df -h
    
    You should see a line starting with /dev/vd{x} or /dev/sd{x}.
  5. Set permissions for the default user (Ubuntu example: ubuntu). To get non-root access to the file system, you may need to set the ownership of mounted volume to allow ubuntu user for read/write:
    sudo chown -R ubuntu:ubuntu /mnt
    

Subsequent use: mount

Once a volume has a file system and user permissions are set, you only need to mount it again each time the instance starts:

sudo mount /dev/vd{x} /mnt

Auto-mount volume

For detailed instructions, please refer to the following articles in ScienceCloud (Legacy) documentation:

Safely detach a volume

Warning

Volumes must be unmounted from within the instance before being detached.

If you detach a mounted volume, the instance may freeze when it tries to access it.

To unmount a volume from the instance, run:

sudo umount /mnt
Once unmounted, you can safely detach the volume from the ScienceCloud Web Interface:
  1. On Volumes tab, select your volume.
  2. From drop-down Edit Volume list, select Manage Attachments.
  3. Select your volume
  4. Press Detach Volume.

Mismatch between Attached To and /dev/sd{x} or /dev/vd{x} inside the image

A mismatch between what is reported in the Attached To field on the ScienceCloud Web Interface and how the disk is seen inside the instance may occur. This may happen if the following sequence of operations have been performed:

  • a volume has been created
  • it has been then attached to an instance followed by a file system creation and mount
  • the volume has been detached without being unmounted
  • another volume has been attached.

In order to have the consistency back between the Attached To field and the disk inside the instance a reboot has to be performed.

Volume operations

Extend or resize a volume

For detailed instructions, please refer to the article How to resize a volume.

Delete volumes

For issues related to volume deletion, please refer to the article How to delete a volume that returns error: "Volume still has 1 dependent snapshots. (HTTP 400)".

Volume transfer

For detailed instructions, please refer to the article How to transfer volumes between projects.

Volume backup and recovery

Create snapshot

Note

Information for this section will be added as the new version of ScienceCloud evolves.

Create backup

Note

Information for this section will be added as the new version of ScienceCloud evolves.