Skip to content

Attacher un volume a une instance⚓︎

$> openstack server add <instance> <volume>
  • instance : nom ou ID de l'instance où attacher l'instance
  • volume : nom ou ID du volume à attacher

A noter

Pour récupérer les informations des ressources disponibles sur le projet (flavor, network, image, ...) vous pouvez suivre la documentation ici

Exemple :

$> openstack server add volume test-instance test-volume
+-----------------------+--------------------------------------+
| Field                 | Value                                |
+-----------------------+--------------------------------------+
| ID                    | 5ce88ee5-451a-4450-8552-0fd73d2e7860 |
| Server ID             | 3ce14a47-2089-429a-9285-2ef4ee31b3fd |
| Volume ID             | 5ce88ee5-451a-4450-8552-0fd73d2e7860 |
| Device                | /dev/vdb                             |
| Tag                   | None                                 |
| Delete On Termination | False                                |
+-----------------------+--------------------------------------+
$> openstack volume list --os-cloud jchabert
+--------------------------------------+-------------+--------+------+----------------------------------------+
| ID                                   | Name        | Status | Size | Attached to                            |
+--------------------------------------+-------------+--------+------+----------------------------------------+
| 5ce88ee5-451a-4450-8552-0fd73d2e7860 | test-volume | in-use |   20 | Attached to test-instance on /dev/vdb  |
+--------------------------------------+-------------+--------+------+----------------------------------------+