Create extra disk#

This guide shows how to add an extra disk to your virtual machine (VM) in myDelska, make it usable inside the operating system, and upgrade its size later.

How can I add additional storage space (extra disk) to my VM?#

To add additional storage to your VM, follow the steps below:

  1. Open the virtual machine located under the Dashboard.
  2. Select the Storage section.
  3. Select an extra disk size from the template (100GB, 500GB, or 1000GB) or enter the exact disk space you need.
  4. Click Create.

Open the Storage section in myDelska to add a disk.

How much disk space can I add to my VM?#

You can add between 10GB and 10TB of disk space to your VM. Extra disk storage is billed hourly — see Billing Methods.

How to make the extra disk available in the OS#

The extra disk is not automatically added to the OS. Follow the instructions below for your OS type — Linux or Windows.

  1. List information about all available block devices.
lsblk

Output:

NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0      11:0    1  364K  0 rom  
vda     252:0    0   60G  0 disk 
├─vda1  252:1    0 59.9G  0 part /
├─vda14 252:14   0    4M  0 part 
└─vda15 252:15   0  106M  0 part /boot/efi
vdb     252:16   0  100G  0 disk 

The vdb block device is the extra disk — it has no partition yet.

  1. Create a partition on the vdb block device.
parted -s -a optimal /dev/vdb mklabel gpt -- mkpart primary ext4 0% 100%
  1. Check the created partition on vdb.
lsblk

Output:

NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0      11:0    1  364K  0 rom  
vda     252:0    0   60G  0 disk 
├─vda1  252:1    0 59.9G  0 part /
├─vda14 252:14   0    4M  0 part 
└─vda15 252:15   0  106M  0 part /boot/efi
vdb     252:16   0  100G  0 disk 
└─vdb1  252:17   0  100G  0 part 

The vdb block device now has a vdb1 partition with 100GB of storage space.

  1. Create a filesystem on partition vdb1 (ext4, for example).
mkfs.ext4 /dev/vdb1

Output:

mke2fs 1.45.5 (07-Jan-2020)
Discarding device blocks: done                            
Creating filesystem with 26213888 4k blocks and 6553600 inodes
Filesystem UUID: 01b6aa01-424d-4e68-86cd-88f028b04252
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (131072 blocks): done
Writing superblocks and filesystem accounting information: done   
  1. Mount the created ext4 partition — to /mnt, for example.
mount /dev/vdb1 /mnt
  1. Verify the partition was successfully mounted on /mnt.
df -h

Output

Filesystem     1K-blocks    Used Available Use% Mounted on
udev              997880       0    997880   0% /dev
tmpfs             203072     760    202312   1% /run
/dev/vda1       60782776 3852632  56913760   7% /
tmpfs            1015340       0   1015340   0% /dev/shm
tmpfs               5120       0      5120   0% /run/lock
tmpfs            1015340       0   1015340   0% /sys/fs/cgroup
/dev/vda15        106858    5313    101545   5% /boot/efi
tmpfs             203068       0    203068   0% /run/user/0
/dev/vdb1      102624184      24  97365000   1% /mnt

The vdb1 ext4 partition is mounted on /mnt — you can start using it!

  1. Please don’t forget to add this partition to /etc/fstab — it is a very important step, otherwise the disk will not be mounted after a server reboot!
echo "/dev/vdb1       /mnt ext4    defaults        0       0" >> /etc/fstab

The /etc/fstab file is a system configuration file that contains all available disks, disk partitions and their options. Each file system is described on a separate line.

  1. Connect to your Windows Server VM (via Remote Desktop or the Console).
  2. Open Disk Management: press Windows + R, type diskmgmt.msc, and press Enter.
  3. If prompted to initialize the new disk, select the GPT partition style and click OK. If not prompted, right-click the disk marked Offline and select Online, then right-click it again and select Initialize Disk.
  4. Right-click the Unallocated space on the new disk and select New Simple Volume.
  5. Follow the wizard: keep the default volume size, assign a drive letter, and format the volume with NTFS.
  6. Click Finish. The new drive appears in File Explorer and is ready to use.

Alternatively, you can prepare the disk with PowerShell:

Get-Disk | Where-Object PartitionStyle -eq 'RAW' |
  Initialize-Disk -PartitionStyle GPT -PassThru |
  New-Partition -AssignDriveLetter -UseMaximumSize |
  Format-Volume -FileSystem NTFS -Confirm:$false

Upgrade existing extra disk#

VM action in Dashboard#

  1. Open the instance located under the Dashboard.
  2. Select the Storage section.
  3. Select an extra disk size from template (100GB, 500GB or 1000GB) or add the exact disk space you need for the upgrade.
  4. Click Upgrade.

In this case, we need to upgrade the 100 GB of storage to 200 GB; add 100GB more.

Check the partition size for vdb#

lsblk

Output:

NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0      11:0    1  364K  0 rom  
vda     252:0    0   60G  0 disk 
├─vda1  252:1    0 59.9G  0 part /
├─vda14 252:14   0    4M  0 part 
└─vda15 252:15   0  106M  0 part /boot/efi
vdb     252:16   0  200G  0 disk 
└─vdb1  252:17   0  100G  0 part 

Block device now has a 200GB size, but vdb1 partition only has a 100GB size. Now, we can continue to the next steps.

Resize the existing vdb partition and filesystem#

  1. Grow partition 1 of the vdb block device.
growpart /dev/vdb 1
  1. Resize the filesystem on the vdb1 partition.
resize2fs /dev/vdb1

resize2fs works for ext4 filesystems. If the partition uses XFS (default on AlmaLinux/Rocky), resize it by mountpoint instead: xfs_growfs /mnt. Check the filesystem type with lsblk -f or df -T.

Check the partition size for vdb again#

lsblk

Output:

NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0      11:0    1  364K  0 rom  
vda     252:0    0   60G  0 disk 
├─vda1  252:1    0 59.9G  0 part /
├─vda14 252:14   0    4M  0 part 
└─vda15 252:15   0  106M  0 part /boot/efi
vdb     252:16   0  200G  0 disk 
└─vdb1  252:17   0  200G  0 part 

Now your Virtual Machine’s additional drive has been upgraded from 100GB to 200GB!

VM action in Dashboard#

  1. Open the instance located under the Dashboard.
  2. Select the Storage section.
  3. Select an extra disk size from the template (100GB, 500GB or 1000GB) or add the exact disk space you need for the upgrade.
  4. Click Upgrade.

Extend the volume in Windows#

  1. Open Disk Management: press Windows + R, type diskmgmt.msc, and press Enter.
  2. If the added space is not visible yet, select Action » Rescan Disks.
  3. Right-click the existing volume on the extra disk and select Extend Volume.
  4. Follow the wizard and accept the default (maximum) size, then click Finish.

The volume now uses the full upgraded disk size.

Next steps#

Open in myDelska Platform#

Open a VM's Storage tab in myDelska directly.

Accessibility Menu (CTRL+U)

Content

TT Bigger Text
Text Spacing
Line Height

Navigation