Disks are virtual versions of physical storage devices, such as SSDs and HDDs.
Disks are designed for storing data and attach to VMs. Detaching a disk doesn't delete its data.
Each disk is located in an availability zone, where it's replicated (excluding non-replicated disks) to provide data protection. Disks are not replicated to other zones.
Disks as a Yandex.Cloud resource
Disks are created in folders and inherit their access rights.
Disks take up storage space, which incurs additional fees. For more information, see Pricing for Compute Cloud. The size of a disk is specified during creation. This is the storage capacity that you're charged for.
If a disk is created from a snapshot or image, the disk information contains the ID of the source resource. In addition, the license IDs (
product_ids) are inherited from the source resource and used to calculate the disk use cost.
VMs in Yandex.Cloud can use the following types of disks:
- Network SSD (
network-ssd): A fast network drive. Network block storage on an SSD.
- Network HDD (
network-hdd): A standard network drive. Network block storage on an HDD.
- Non-replicated SSD (
network-ssd-nonreplicated): A network drive with enhanced performance that is implemented by imposing several limitations.
Standard network SSDs and HDDs provide sufficient redundancy for reliable data storage and allow for continuous read and write operations even when multiple physical disks fail at the same time. Non-replicated disks do not provide redundancy.
If a physical disk hosting a network SSD or HDD fails, a VM will continue to run and quickly regain full access to data.
Network drives are slower than local drives in terms of performance and throughput, but they assure greater VM reliability and uptime.
Non-replicated disk limitations
Non-replicated disks outperform regular network drives and can be useful when redundancy is already provided at the application level or you need to provide quick access to temporary data.
Non-replicated disks have a number of limitations:
A non-replicated disk's size must be a multiple of 93 GB.
In all calculations, 1 GB = 230 bytes.
Non-replicated disks can't be used as boot disks.
The information they store may be temporarily unavailable or lost in the event of failure since non-replicated disks don't provide redundancy.
We do not recommend making a non-replicated disk the boot drive. If it fails, a virtual machine may become unavailable.
Multiple non-replicated disks can be combined into a placement group to ensure data storage redundancy at the application level. In this case, individual disks are physically placed in different racks in a data center to reduce the probability of simultaneous failure of all disks in the group.
Maximum disk size
Disks consist of blocks. By default, the block size of all created disks is 4 KB, but that's not enough for disks larger than 8 TB. You can set the block size when creating an empty disk. You can't change the block size after the disk is created.
The maximum disk size depends on the chosen block size. The size of a newly created disk must be a multiple of 4 MB.
|Block size||Maximum disk size|
|4 KB||8 TB|
|8 KB||16 TB|
|16 KB||32 TB|
|32 KB||64 TB|
|64 KB||128 TB|
|128 KB||256 TB|
Attaching and detaching disks
You can only attach each disk to a single VM. A disk and a VM must be in the same availability zone.
A VM requires a boot drive. Additional disks can also be attached.
Empty disks do not have a file system. If you attach an empty disk, partition and mount it manually. Alternatively, instead of attaching an empty disk, you can create a snapshot of the boot disk and create a VM based on the snapshot.
When selecting a disk to attach to a VM, you can specify whether the disk should be deleted along with the VM. You can choose this option when creating a VM, reconfiguring it, or attaching a new disk.
If a VM had previously created disks attached, they will be detached when you delete the VM. Data on the disk is saved, and you can attach the disk to a different VM later.
If you would like to delete a disk with a VM, specify this option when creating the VM, reconfiguring it, or attaching the disk. Such disks will be deleted along with the VM.
Each disk is accessible and replicated within a specific availability zone.
You can back up disks as snapshots. Snapshots are replicated across every availability zone, which lets you transfer disks between zones.
Restoring a disk to a specific state can become a routine operation: for instance, if you wish to attach the same boot drive to every new VM. You can upload an image of the disk to Compute Cloud. Disk are created faster from images than from snapshots. Images are also automatically replicated to multiple availability zones.
For general recommendations on backing up and restoring VMs, see Backups.