Prerequisites
If you use the web console, you don’t need to complete any prerequisites.- CLI
- Terraform
- Go SDK
- Python SDK
- JavaScript SDK
Install and configure the Nebius AI Cloud CLI.
How to create a disk
- Web console
- CLI
- Terraform
- Go SDK
- Python SDK
- JavaScript SDK
- In the sidebar, go to Storage → Disks.
- Click Create disk.
- On the creation page, specify a disk name.
-
In Disk source type, select one of the supported sources for the disk:
- Blank disk: Create a regular, blank disk. Suitable for any boot or additional disk.
- Public image: Create a boot disk from one of public images that Nebius AI Cloud provides. An image represents an operating system for the disk.
- Custom image: Create a boot disk based on your custom image that includes custom software.
- Custom image family: Create a boot disk based on your custom image family. When you create custom images, you can add them to an arbitrary custom family. If an image family contains several images, the latest one is used.
- Snapshot: Create a boot or additional disk based on a disk snapshot.
- In Storage configuration, select the disk type.
- (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.
- Set the disk size and block size.
- (Optional) Enable Deletion protection to prevent this disk from being accidentally deleted.
- Click Create disk.
How to create a shared filesystem
- Web console
- CLI
- Terraform
- Go SDK
- Python SDK
- JavaScript SDK
- In the sidebar, go to Storage → Shared filesystems.
- Click Create filesystem.
- On the creation page, specify a filesystem name.
- Set the filesystem size and block size.
- (Optional) Enable Deletion protection to prevent this filesystem from being accidentally deleted.
- Click Create filesystem.
Volume parameters
Disks and shared filesystems share almost all of their parameters, except for boot disk image which can only be set for disks. CLI parameter names are shown in parentheses. Terraform uses the corresponding snake_case attributes, and SDKs use the corresponding parameter names for each language, such as camelCase in JavaScript, as shown in the examples.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 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_managedto enable encryption. -
Size (
size-gibibytes,size-mebibytes,size-kibibytesorsize-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. -
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. 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.
Disk sources
Use one of the supported disk sources:- Public image (
source-image-family-image-family): Create a boot disk from one of the public images that Nebius AI Cloud provides. An image represents an operating system for the disk. - Custom image (
source-image-id): Create a boot disk based on your custom image that includes custom software. - Custom image family (both
source-image-family-image-familyandsource-image-family-parent-id): Create a boot disk based on your custom image family. When you create custom images, you can add them to an arbitrary custom family. If an image family contains several images, the latest one is used. - Snapshot (
source-snapshot-id): Create a boot or additional disk based on a disk snapshot.
Deletion protection
-
Deletion protection (
forbid-deletion): Prevents the volume from being deleted. Use this parameter to protect disks and shared filesystems from accidental deletion, especially in automated environments such as CI/CD pipelines or Terraform configurations. Deletion protection can be enabled at creation time or changed at any time after creation. When enabled, any attempt to delete the volume fails with an error. To delete a protected volume, disable deletion protection first.
How to resize a volume
You can increase the size of an existing disk or shared filesystem. Reducing volume size is not possible.How to resize a disk
Compute supports hot resize: the resize operation itself does not require stopping the VM. However, you need to restart the VM afterward for the operating system to recognize the new disk size.
-
Change the disk size:
- Web console
- CLI
- Terraform
- Go SDK
- Python SDK
- JavaScript SDK
- In the sidebar, go to Storage → Disks. Alternatively, go to the virtual machine where the disk is attached and find it in the Disks tab.
- Click the disk you want to resize and go to the Settings tab.
- In the Parameters section, enter the new Size value or use the slider to set the new size.
- Click Save changes.
-
If you resized a secondary disk and it is currently attached to a running virtual machine, do the following:
- Restart this VM.
- Connect to this VM.
-
Install the
cloud-guest-utilspackage that manages the disk partitions: -
List disks and partitions:
Output example: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
SIZEcolumn: 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. -
Grow the partition to fill the disk:
If you work with a disk that has a device name other than
/dev/vdc, change the device name and the partition index1in 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 thels /dev/disk/by-idcommand to get device IDs for all disks. -
Refresh the kernel partition table for the disk and wait for the device information to be updated:
-
Show information about partitions and check that the size of the partition has increased:
Output example:
-
Grow the
ext4filesystem on the increased partition: -
Check that the filesystem size has increased:
Output example:
How to resize a shared filesystem
To resize a shared filesystem:- Web console
- CLI
- Terraform
- In the sidebar, go to Storage → Shared filesystems. Alternatively, go to the virtual machine where the filesystem is attached and find it in the Shared filesystems tab.
- Click the filesystem you want to resize and go to the Settings tab.
- In the Parameters section, enter the new Size value or use the slider to set the new size.
- Click Save changes.
How to enable or disable deletion protection
You can only change deletion protection of a standalone disk. If you need to update a VM-managed disk, convert it first to standalone. To enable or disable deletion protection:- Web console
- CLI
- Terraform
- Go SDK
- Python SDK
- JavaScript SDK
- In the sidebar, go to Storage → Disks or Storage → Shared filesystems.
- Click the volume you want to update and go to the Settings tab.
- In the Parameters section, enable or disable Deletion protection.
- Click Save changes.
If you try to delete a volume with deletion protection enabled, the operation will fail, and you’ll see the following message:
Error: rpc error: code = FailedPrecondition desc = disk cannot be deleted because forbid_deletion is set. Disable deletion protection first, then delete the volume.How to make a disk VM-managed or standalone
Each disk is either VM-managed or standalone. You can convert a disk from one state to another. To do so:- Web console
- In the sidebar, go to Compute → Virtual machines.
- Open the page of the required VM and then go to the Disks tab.
- In the line of the required disk, click → Convert to VM-managed or → Convert to standalone.
How to delete a volume
- Web console
- CLI
- Terraform
- Go SDK
- Python SDK
- JavaScript SDK
- In the sidebar, go to Storage → Disks or Storage → Shared filesystems.
- Open the page of the volume that you want to delete.
- Go to the Settings tab.
- Click Delete disk or Delete filesystem.
- In the window that opens, confirm the deletion.