For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quickstart

Create, attach and mount your first block storage volume.


You create, manage, and delete block storage volumes independently of your virtual machines under Storage → Block storage. From here, you can also attach and detach the block storage volumes to and from your VMs. While a block storage volume is attached, it's also possible to resize it. You can only increase a block storage volume, not decrease it.

Create a block storage volume

  1. Click Block Storage under Storage in the left-hand menu.

  2. Click Create.

  3. Choose a name, data center location, tier, and size for the volume.

  4. Click Create volume.

  5. Once the volume is ready, note down the WWN identification string. You'll need it later when creating a filesystem and mounting it.

Attach the volume to a KVM virtual machine

From the overview page of the newly created volume, click Attach and select the correct virtual machine. Then, click Attach.

Create a filesystem on the volume

Start by verifying that the volume is in fact attached to the virtual machine. List the files in /dev/disk/by-id/ and look for the WWN that matches the WWN from the control panel. For example, if the WWN in the control panel is 3fa0d41402141ef7, then the file in /dev/disk/by-id/ will be wwn-0x3fa0d41402141ef7.

Command and output. Command is highlighted.
ls /dev/disk/by-id/
ata-QEMU_DVD-ROM_QM00001       scsi-33fa0d41402141ef7
ata-QEMU_DVD-ROM_QM00003       wwn-0x305b0264d59532e7
scsi-3305b0264d59532e7         wwn-0x305b0264d59532e7-part1
scsi-3305b0264d59532e7-part1   wwn-0x305b0264d59532e7-part14
scsi-3305b0264d59532e7-part14  wwn-0x305b0264d59532e7-part15
scsi-3305b0264d59532e7-part15  wwn-0x3fa0d41402141ef7

First, create a partition table and a partition on the new volume. Double-check the WWN to avoid wiping the wrong disk or volume! When using the print command in parted below, also make sure that the model says GLESYS REMOTE DISK.

Commands and output. Commands are highlighted. (parted) is the prompt inside the parted program.
sudo parted /dev/disk/by-id/wwn-0x3fa0d41402141ef7
GNU Parted 3.6
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Error: /dev/sdb: unrecognised disk label
Model: GLESYS REMOTE DISK (scsi)
Disk /dev/sdb: 10.7GB
Sector size (logical/physical): 4096B/4096B
Partition Table: unknown
Disk Flags:
(parted) mklabel gpt
(parted) mkpart primary 1MiB 100%
(parted) quit
Information: You may need to update /etc/fstab.

You should now have a partition on the volume; verify it by listing all files related to the WWN.

Now, let's create a filesystem on the partition, part1. To not reserve any space on the partition for root, include the -m 0 option as shown here.

Start by verifying which disk corresponds to the WWN in the virtual machine with the WWN in the control panel. This prevents you from operating on the wrong disk.

Start a PowerShell terminal and run the following command. Look for the WWN from the control panel and match it to a disk.

In this case, disk number 1 matches the WWN from the control panel.

Open Computer Management by searching for it in the Start menu.

Once inside Computer Management, select Disk Management under Storage. Right-click on the disk number that corresponds to the WWN from the previous step (in this case, Disk 1). Select Online.

Right-click the same disk again, but this time select Initialize Disk.

Leave the defaults as-is in the dialog box (Disk 1 and GPT). Click OK.

Right-click on the unallocated disk space and select New Simple Volume...

Click Next to start the guide. Leave the default value for the volume size to use the entire volume. Click Next.

Select a desired drive letter for the new volume, or leave it at the default. Click Next.

Leave all the default settings as-is (Filesystem: NTFS, Allocation unit size: Default), but give the volume a label so you can identify it later. Here, we've given it the name Block Storage 1.

Make sure Perform a quick format is checked.

Click Next.

If everything looks okay in the summary, click Finish.

Mount the volume

Start by creating a mount point for the volume, for example, under /mnt.

Mount the volume in the newly created directory.

To automatically mount the volume on server boot, add it to /etc/fstab. For more information about the nofail option (whether to include it or not), see Format and mount a volume.

Remember to change the WWN and the mount point to match your system and volume.

Reload the systemd daemon so it recognizes the new mount.

To make sure you typed everything correctly, unmount the volume and mount it again by using only the mount point.

If no error messages are shown, the line is correct.

Remember to remove the line from /etc/fstab if you detach the block storage volume from the VM.

Windows automatically mounts the volume once it's formatted using the above steps. You should be able to see the new block storage volume in This PC.

Last updated

Was this helpful?