Skip to main content
In this article, you will learn how to create Compute volumes: disks and shared filesystems. Boot disks are added to virtual machines (VMs) immediately. To use secondary (additional) disks and shared filesystems on VMs after you create the volumes, you need to attach and mount them to the VMs. You can detach these volumes later, if necessary. A VM and its volumes must be located in the same project. For more details about projects and resource hierarchy in Nebius AI Cloud, see How resources, identities and access are managed in Nebius AI Cloud.

How to create a disk

  1. In the sidebar, go to https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/sidebar/storage.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=0a2dad6b48aea10e85f6f3e2343aee26 Storage → Disks.
  2. Click Create disk.
  3. On the creation page, specify a disk name.
  4. If you want to create a boot disk, select an operating system. For secondary disks, no operating system is required.
  5. Select the disk type.
  6. (Optional) Enable data encryption if you’re creating a Network SSD Non-replicated or Network SSD IO M3 disk. Encryption is enabled by default for Network SSD disks.
  7. Set the disk size and block size. Maximum size of a boot disk is 30,720 GiB (30 TiB).
  8. Click Create disk.
If you created a boot disk, add it when you create a VM. For more information about how to start using the created secondary disk, see Attaching and mounting Compute volumes to VMs.

How to create a shared filesystem

  1. In the sidebar, go to https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/sidebar/storage.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=0a2dad6b48aea10e85f6f3e2343aee26 Storage → Shared filesystems.
  2. Click Create filesystem.
  3. On the creation page, specify a filesystem name.
  4. Set the filesystem size and block size.
  5. Click Create filesystem.
For more information about how to start using the created shared filesystem, see Attaching and mounting Compute volumes to VMs.

Volume parameters

Disks and shared filesystems share almost all of their parameters, except for boot disk image which can only be set for disks.

Metadata

Name (name): A Nebius AI Cloud resource name. It must be unique inside your tenant. Required at creation, cannot be changed after it.

Type, encryption and size

  • Type (type): The volume type. See available types of disks and shared filesystems. Required at creation, and cannot be changed later.
  • Enable data encryption (disk-encryption-type): Whether a volume should support data encryption. Encryption allows you to store personal and other sensitive data securely on volumes, and reduce the risk of unauthorized access. Use this parameter only for secondary disks of the Network SSD Non-replicated and Network SSD IO M3 types. Filesystems and Network SSD disks support encryption by default, and you cannot disable it. For more information, see Encryption of disks. In the CLI, use --disk-encryption-type disk_encryption_managed to enable encryption.
  • Size (size-gibibytes, size-mebibytes, size-kibibytes or size-bytes): The volume size. See requirements for sizes of disks and shared filesystems in their comparison tables. Required at creation. After creation, size can only be increased. When using the CLI, you can set the volume size in GiB, MiB, KiB or B using a respective parameter. Maximum size of a boot disk is 30,720 GiB (30 TiB).
  • Block size (block-size-bytes): The data block size for the volume. The data stored on the volume is divided into blocks of this size on the underlying physical drives. Cannot be changed after the volume is created.
    Currently, the block size cannot be set when creating a volume in the web console.
    The block size must be a power of two between 4096 bytes (4 KiB) and 131,072 bytes (128 KiB). The default value is 4096 bytes (4 KiB). For maximum IOPS, reads and writes to a volume should be close to its block size.

Boot disk image

How to resize a volume

You can increase the size of an existing disk or shared filesystem. Reducing volume size is not possible.
Compute supports hot resize: you can resize a volume that is currently attached to a running virtual machine. If you resize an attached secondary disk, refresh its partition after you change the disk size.
To resize a disk or a shared filesystem:
  1. Change the volume size:
    1. In the sidebar, go to https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/sidebar/storage.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=0a2dad6b48aea10e85f6f3e2343aee26 Storage → Disks or https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/sidebar/storage.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=0a2dad6b48aea10e85f6f3e2343aee26 Storage → Shared filesystems. Alternatively, go to the virtual machine where the volume is attached and find it in the Disks or Shared filesystems tab.
    2. Click the volume you want to resize and go to the Settings tab.
    3. In the Parameters section, enter the new Size value or use the slider to set the new size.
    4. Click Save changes.
  2. If you resized a secondary disk and it is currently attached to a running virtual machine, do the following:
    1. Restart this VM.
    2. Connect to this VM.
    3. Install the cloud-guest-utils package that manages the disk partitions:
      sudo apt-get update && sudo apt-get install -y cloud-guest-utils
      
    4. List disks and partitions:
      lsblk --paths
      
      Output example:
      NAME          MAJ:MIN  RM   SIZE  RO  TYPE  MOUNTPOINTS
      /dev/vda      253:0     0    10G   0  disk
      ├─/dev/vda1   253:1     0     9G   0  part  /
      ├─/dev/vda14  253:14    0     4M   0  part
      ├─/dev/vda15  253:15    0   106M   0  part  /boot/efi
      └─/dev/vda16  259:0     0   913M   0  part  /boot
      /dev/vdb      253:16    0     1M   0  disk
      /dev/vdc      253:32    0    20G   0  disk
      └─/dev/vdc1   253:33    0    10G   0  part  /mnt/disk-0
      
      Find the device name of the resized disk and get the name of its last partition. The secondary disk is most likely the last one in the list. Also, check the SIZE column: it shows that the disk size is increased, but the partition size stays the same. In this example, the required device name is /dev/vdc, and the partition is /dev/vdc1.
    5. Grow the partition to fill the disk:
      sudo growpart /dev/vdc 1
      
      If you work with a disk that has a device name other than /dev/vdc, change the device name and the partition index 1 in the current command and commands below. You can get the index of the partition from its name. Only the last partition may be grown.
      In the commands, you can use the device ID of the disk (/dev/disk/by-id/virtio-disk-0) instead of the device name (/dev/vdc). Run the ls /dev/disk/by-id command to get device IDs for all disks.
    6. Refresh the kernel partition table for the disk and wait for the device information to be updated:
      sudo partprobe /dev/vdc && sudo udevadm settle
      
    7. Show information about partitions and check that the size of the partition has increased:
      lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT /dev/vdc
      
      Output example:
      NAME    SIZE  TYPE  FSTYPE  MOUNTPOINT
      vdc      25G  disk
      └─vdc1   25G  part  ext4    /mnt/disk-0
      
    8. Grow the ext4 filesystem on the increased partition:
      sudo resize2fs /dev/vdc1
      
    9. Check that the filesystem size has increased:
      df -hT
      
      Output example:
      Filesystem      Type       Size   Used  Avail  Use%  Mounted on
      tmpfs           tmpfs      795M   1.1M   794M    1%  /run
      /dev/vda1       ext4        38G   3.3G    35G    9%  /
      tmpfs           tmpfs      3.9G      0   3.9G    0%  /dev/shm
      tmpfs           tmpfs      5.0M      0   5.0M    0%  /run/lock
      cloud-metadata  virtiofs   252G    16K   252G    1%  /mnt/cloud-metadata
      /dev/vdc1       ext4        25G    24K    24G    1%  /mnt/disk-0
      /dev/vda16      ext4       881M   174M   645M   22%  /boot
      /dev/vda15      vfat       105M   6.2M    99M    6%  /boot/efi
      tmpfs           tmpfs      795M    12K   795M    1%  /run/user/1001
      

See also