-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* COS: added information about some disk mount errors and x-yc-disks …
…usage. * Fixes and improvements.
- Loading branch information
Showing
12 changed files
with
101 additions
and
43 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
title: Specifics of working with disks in {{ cos-full-name }} | ||
description: Please note that, when creating a VM from a {{ coi }}, it's necessary to consider some specific aspects of working with disks. | ||
--- | ||
|
||
# Specifics of working with disks | ||
|
||
## Specifics of working with a boot disk | ||
|
||
When [creating a VM from a {{ coi }}](../tutorials/vm-create.md), take into account the following specifics: | ||
* You cannot create a boot disk from a [disk snapshot](../../compute/concepts/snapshot.md). | ||
* By default, you create a disk that is the same size as the image. However, since the purpose of a VM created from a {{ coi }} is to run a Docker container, there may not be enough free space to deploy the Docker container. To avoid this, explicitly specify the required size of the boot disk using the `--create-boot-disk size=<disk_size_in_GB>` flag. The disk size must be at least 30 GB. | ||
|
||
## Specifics of working with additional disks {#second-disk} | ||
|
||
Using the `x-yc-disks` extension section in the [Docker Compose specification](./coi-specifications.md#compose-spec), you can [mount an additional volume inside the container](../tutorials/vm-create-with-second-disk.md): | ||
* To mount a disk inside a virtual machine with {{ coi }}, the disk's `device-name` is used to search through the `/dev/disk/by-id/virtio-...` tree. If this parameter is not specified when attaching a disk to a VM, a [mounting error](../error/index.md#disk-mount) may occur. | ||
* When using an additional disk that's partitioned, it's important to use the `partition: X` parameter with the partition number for mounting in the [Docker Compose specification](./coi-specifications.md#compose-spec-example). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
title: Особенности работы с дисками в {{ cos-full-name }} | ||
description: При создании виртуальной машины с {{ coi }} необходимо учитывать, некоторые особенности работы с дисками. | ||
--- | ||
|
||
# Особенности работы с дисками | ||
|
||
## Особенности работы с загрузочным диском {#boot-disk} | ||
|
||
При [создании виртуальной машины с {{ coi }}](../tutorials/vm-create.md) необходимо учитывать следующие особенности: | ||
* Невозможно создать загрузочный диск из [снимка диска](../../compute/concepts/snapshot.md). | ||
* По умолчанию создается диск, размер которого равен размеру образа. Но так как назначение ВМ с {{ coi }} — запуск на ней [Docker-контейнера](/blog/posts/2022/03/docker-containers), может возникнуть проблема недостаточного свободного места при развертывании Docker-контейнера. Чтобы этого избежать, явно укажите необходимый размер загрузочного диска с помощью флага `--create-boot-disk size=<размер_диска_ГБ>`. Размер диска должен быть не менее 30 ГБ. | ||
|
||
## Особенности работы с дополнительными дисками {#second-disk} | ||
|
||
Используя раздел-расширение `x-yc-disks` в [спецификации Docker Compose](./coi-specifications.md#compose-spec), можно [примонтировать дополнительный том внутрь контейнера](../tutorials/vm-create-with-second-disk.md): | ||
* Для монтирования диска внутрь виртуальной машины с {{ coi }} используется `device-name` диска для поиска по дереву `/dev/disk/by-id/virtio-...`. Если при подключении диска к ВМ не указать этот параметр, может возникать [ошибка монтирования](../error/index.md#disk-mount). | ||
* При использовании дополнительного диска, разбитого на разделы, важно в [спецификации Docker Compose](./coi-specifications.md#compose-spec-example) использовать параметр `partition: X` с номером раздела для монтирования. |
Oops, something went wrong.