[Yandex Cloud documentation](../../index.md) > [Yandex Container Solution](../index.md) > [Concepts](index.md) > Working with disks

# How to work with disks

## Working with a boot disk {#boot-disk}

When [creating](../tutorials/vm-create.md) a Container Optimized Image VM, keep in mind that:
* You cannot create a boot disk from a [disk snapshot](../../compute/concepts/snapshot.md).
* By default, you create a disk the same size as the image. Therefore, a Container Optimized Image VM may not have enough free space to deploy a Docker container. To avoid this, specify the required boot disk size using this parameter: `--create-boot-disk size=<disk_size_in_GB>`.

   To get the minimum boot disk size required for installing an image, run this command:
   * `yc compute image get-latest-from-family container-optimized-image --folder-id standard-images` if you are installing a Container Optimized Image.
   * `yc compute image get-latest-from-family container-optimized-image-gpu --folder-id standard-images` if you are installing a GPU Container Optimized Image.
   
   You can find the minimum boot disk size in the `min_disk_size` property.

### Use cases {#examples-boot-disk}

* [Creating a VM from a Container Optimized Image with multiple Docker containers](../tutorials/docker-compose.md)
* [Running a containerized app in Yandex Serverless Containers](../tutorials/deploy-app-container.md)

## Working with secondary disks {#second-disk}

You can [mount](../tutorials/vm-create-with-second-disk.md) a secondary disk into the container by using the `x-yc-disks` section of the [Docker Compose specification](coi-specifications.md#compose-spec):
* To mount a disk into a Container Optimized Image VM and search in the `/dev/disk/by-id/virtio-...` tree, use the disk `device-name`. If you do not specify this parameter when connecting the disk to the VM, you may get a [mount error](../error/index.md#disk-mount).
* When using a partitioned secondary disk, provide the `partition: x` parameter in the [Docker Compose specification](coi-specifications.md#compose-spec-example), where `x` is the number of the partition to mount.

### Use cases {#examples-second-disk}

* [Creating a VM from a Container Optimized Image and an additional volume for a Docker container](../tutorials/vm-create-with-second-disk.md)