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¶
- Log in to ScienceCloud Web Interface: https://cloud.science-it.uzh.ch
- Go to Volumes > Volumes.
- Click Create Volume.
- Enter: Volume Name and Size (GB).
- Click Create Volume.
Manage volumes on instances¶
Attach a volume to an instance¶
- On Volumes tab, select your volume.
- From drop-down Edit Volume list, select Manage Attachments.
- From Attach to Instance list, choose the instance you wish to attach the volume to.
- 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.
- 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 likea
,b
, etc. Alternatively, use the following commands inside your instance to list all block devices attached to the instance:orlsblk
sudo parted -l
- Format the volume (if new/empty). Format your new disk into ext4 (recommended file system). or
sudo mkfs.ext4 /dev/vd{x}
Replacesudo mkfs.ext4 /dev/sd{x}
{x}
with the correct device name. - Mount the volume. Once the volume has a file system, mount it using:
sudo mount /dev/vd{x} /mnt
- Verify the mount You should see a line starting with
df -h
/dev/vd{x}
or/dev/sd{x}
. - 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:
- the user guide section Using volumes / Other uses
- the article How to automatically mount a volume at instance startup
- the FAQ on troubleshooting an issue related to enabling auto-mount Not able to find my files on attached volume after instance resize
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
- On Volumes tab, select your volume.
- From drop-down Edit Volume list, select Manage Attachments.
- Select your volume
- 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.