命令:nova volume-detach SERVER-NAME-OR-ID VOLNAME
加载权限 [root@controller ~]# . admin-openrc
查看卷列表
[root@controller ~]# openstack volume list | ||||
---|---|---|---|---|
ID | Name | Status | Size | Attached to |
2e01aabf-cf58-4a18-b2dd-d21d786ab8d3 | in-use | 50 | Attached to Ke'Hu-5 on /dev/vda | |
4b03f7dc-a599-4b74-8448-747e7c8ec2b2 | in-use | 50 | Attached to Ke'Hu-4 on /dev/vda | |
2bcc85bb-f7a1-4359-9fa0-5e5fe7e5d5b0 | in-use | 50 | Attached to Ke'Hu-3 on /dev/vda | |
8d0650cf-77c6-409a-94fe-bfd2d4379270 | in-use | 50 | Attached to Ke'Hu-2 on /dev/vda | |
71ced72c-9fb9-411b-b530-4a18215a9e04 | in-use | 50 | Attached to Ke'Hu-1 on /dev/vda | |
ed916812-9629-438a-ae76-7f4353003015 | in-use | 50 | Attached to ROLY-9 on /dev/vda | |
1b7aeb9e-0b97-45a4-88a0-253be421c436 | in-use | 50 | Attached to ROLY-3 on /dev/vdc | |
b16fdf1e-5602-49a2-887c-e3fb5c82d9a9 | available | 50 | ||
7a837265-57f5-445d-98a7-e1591fae94f5 | in-use | 50 | Attached to ROLY-7 on /dev/vda | |
b5aedaf6-058d-4c42-a4f3-5b766e923787 | available | 50 | ||
29defce9-8a72-4fcf-9085-716625b81acf | in-use | 50 | Attached to ROLY-5 on /dev/vda | |
40b7b2e8-6fce-46c3-b953-40f86d833098 | available | 50 | ||
b249368c-1321-4745-8b58-d5308f590a6c | in-use | 50 | Attached to ROLY-3 on /dev/vda | |
56d6865d-332a-4eef-8f6f-75ecca92b23f | available | 50 | ||
fac6c8ac-ea4a-4084-b029-cfb54baba634 | available | 50 | ||
6b586b8d-3461-4d85-bcb4-deb951b8d2ce | available | 50 | ||
db8cb311-d5c7-4300-8542-2caf5038b513 | available | 50 | ||
60eb5cda-fcb3-4913-b530-a90f8b924393 | available | 50 | ||
ad979140-f141-421c-9a1c-b4154600434f | available | 50 | ||
d40e0d65-4e03-4b4e-907d-7100600ba1d1 | available | 50 | ||
8243344e-a32a-482d-b336-2bc86087944a | available | 50 | ||
374e625c-b4dd-40ed-b048-da50651f795d | available | 50 | ||
9c484900-f72e-4ee8-b44a-0889913f4c8e | available | 50 | ||
1661af42-7cd0-4746-988e-6691ffa14d86 | available | 50 |
把卷从虚拟机上分离 [root@controller ~]# nova volume-detach ROLY-3 1b7aeb9e-0b97-45a4-88a0-253be421c436
分离后进行查看已经发现不在了
[root@controller ~]# openstack volume list | ||||
---|---|---|---|---|
ID | Name | Status | Size | Attached to |
2e01aabf-cf58-4a18-b2dd-d21d786ab8d3 | in-use | 50 | Attached to Ke'Hu-5 on /dev/vda | |
4b03f7dc-a599-4b74-8448-747e7c8ec2b2 | in-use | 50 | Attached to Ke'Hu-4 on /dev/vda | |
2bcc85bb-f7a1-4359-9fa0-5e5fe7e5d5b0 | in-use | 50 | Attached to Ke'Hu-3 on /dev/vda | |
8d0650cf-77c6-409a-94fe-bfd2d4379270 | in-use | 50 | Attached to Ke'Hu-2 on /dev/vda | |
71ced72c-9fb9-411b-b530-4a18215a9e04 | in-use | 50 | Attached to Ke'Hu-1 on /dev/vda | |
ed916812-9629-438a-ae76-7f4353003015 | in-use | 50 | Attached to ROLY-9 on /dev/vda | |
1b7aeb9e-0b97-45a4-88a0-253be421c436 | available | 50 | ||
b16fdf1e-5602-49a2-887c-e3fb5c82d9a9 | available | 50 | ||
7a837265-57f5-445d-98a7-e1591fae94f5 | in-use | 50 | Attached to ROLY-7 on /dev/vda | |
b5aedaf6-058d-4c42-a4f3-5b766e923787 | available | 50 | ||
29defce9-8a72-4fcf-9085-716625b81acf | in-use | 50 | Attached to ROLY-5 on /dev/vda | |
40b7b2e8-6fce-46c3-b953-40f86d833098 | available | 50 | ||
b249368c-1321-4745-8b58-d5308f590a6c | in-use | 50 | Attached to ROLY-3 on /dev/vda | |
56d6865d-332a-4eef-8f6f-75ecca92b23f | available | 50 | ||
fac6c8ac-ea4a-4084-b029-cfb54baba634 | available | 50 | ||
6b586b8d-3461-4d85-bcb4-deb951b8d2ce | available | 50 | ||
db8cb311-d5c7-4300-8542-2caf5038b513 | available | 50 | ||
60eb5cda-fcb3-4913-b530-a90f8b924393 | available | 50 | ||
ad979140-f141-421c-9a1c-b4154600434f | available | 50 | ||
d40e0d65-4e03-4b4e-907d-7100600ba1d1 | available | 50 | ||
8243344e-a32a-482d-b336-2bc86087944a | available | 50 | ||
374e625c-b4dd-40ed-b048-da50651f795d | available | 50 | ||
9c484900-f72e-4ee8-b44a-0889913f4c8e | available | 50 | ||
1661af42-7cd0-4746-988e-6691ffa14d86 | available | 50 |