cinder的操作
Last login: Sat Feb 24 22:03:18 2018
[root@cinder ~]# . admin-openrc
[root@cinder ~]# cinder snapshot-list
+--------------------------------------+--------------------------------------+-----------+------------------------+------+
| ID | Volume ID | Status | Name | Size |
+--------------------------------------+--------------------------------------+-----------+------------------------+------+
| d8a7a711-5aae-4a51-867c-771f3d538e13 | 7484e420-fd97-47ba-ba50-02bfd5e7ae50 | available | snapshot for snapshot1 | 1 |
+--------------------------------------+--------------------------------------+-----------+------------------------+------+
[root@cinder ~]# cinder-show 49dc7fa6-2964-4c7a-aba8-7f9ce3d371f3
-bash: cinder-show: command not found
[root@cinder ~]# cinder show 49dc7fa6-2964-4c7a-aba8-7f9ce3d371f3
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| attachments | [{'server_id': '67122944-209d-42c4-9d3d-9c2b1afdb8d8', 'attachment_id': 'f04bcc5b-64b3-45c2-b6b2-d4fefdb10446', 'attached_at': '2018-02-24T15:04:51.000000', 'host_name': None, 'volume_id': '49dc7fa6-2964-4c7a-aba8-7f9ce3d371f3', 'device': '/dev/vda', 'id': '49dc7fa6-2964-4c7a-aba8-7f9ce3d371f3'}] |
| availability_zone | nova |
| bootable | true |
| consistencygroup_id | None |
| created_at | 2018-02-24T02:10:00.000000 |
| description | |
| encrypted | False |
| id | 49dc7fa6-2964-4c7a-aba8-7f9ce3d371f3 |
| metadata | {'attached_mode': 'rw'} |
| migration_status | None |
| multiattach | False |
| name | |
| os-vol-host-attr:host | cinder@lvm#LVM |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 4ffc35534ae342629b9068d43ab715b8 |
| replication_status | None |
| size | 1 |
| snapshot_id | d8a7a711-5aae-4a51-867c-771f3d538e13 |
| source_volid | None |
| status | in-use |
| updated_at | 2018-02-24T15:04:51.000000 |
| user_id | 82d8883b243a4d44a101179ab6b1176b |
| volume_image_metadata | {'container_format': 'bare', 'min_ram': '0', 'disk_format': 'qcow2', 'image_name': 'cirros-0.3.4-x86_64', 'image_id': 'd67d268d-1206-4f57-abfc-01060ed6b178', 'checksum': 'ee1eca47dc88f4879d8a229cc70a07c6', 'min_disk': '0', 'size': '13287936'} |
| volume_type | None |
+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
[root@cinder ~]# cd /dev/vda
-bash: cd: /dev/vda: No such file or directory
[root@cinder ~]# lsdev /dev/vda
-bash: lsdev: command not found
[root@cinder ~]# cinder metadata-show 49dc7fa6-2964-4c7a-aba8-7f9ce3d371f3
+-------------------+-------+
| Metadata-property | Value |
+-------------------+-------+
| attached_mode | rw |
+-------------------+-------+
[root@cinder ~]# cinder type-create lvm
+--------------------------------------+------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+------+-------------+-----------+
| d3aec36c-5bcd-4be4-946a-bf5885e7a641 | lvm | - | True |
+--------------------------------------+------+-------------+-----------+
[root@cinder ~]# cinder create 13287936 --display-name newdisk1G --volume-type lvm
ERROR: VolumeSizeExceedsAvailableQuota: Requested volume or snapshot exceeds allowed gigabytes quota. Requested 13287936G, quota is 1000G and 3G has been consumed. (HTTP 413) (Request-ID: req-6dcfdf68-2d4d-412d-b231-18a7f8a750b1)
[root@cinder ~]# cinder list
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
| 49dc7fa6-2964-4c7a-aba8-7f9ce3d371f3 | in-use | | 1 | - | true | 67122944-209d-42c4-9d3d-9c2b1afdb8d8 |
| 7484e420-fd97-47ba-ba50-02bfd5e7ae50 | in-use | | 1 | - | true | c14d48ee-8816-493e-ad79-05e86b339b5b |
+--------------------------------------+--------+------+------+-------------+----------+--------------------------------------+
[root@cinder ~]# cinder create 287936 --display-name newdisk1G --volume-type lvm
ERROR: VolumeSizeExceedsAvailableQuota: Requested volume or snapshot exceeds allowed gigabytes quota. Requested 287936G, quota is 1000G and 3G has been consumed. (HTTP 413) (Request-ID: req-f41e0112-5b83-462c-8298-8ef1944d73a4)
[root@cinder ~]# cinder create 2879 --display-name newdisk1G --volume-type lvm
ERROR: VolumeSizeExceedsAvailableQuota: Requested volume or snapshot exceeds allowed gigabytes quota. Requested 2879G, quota is 1000G and 3G has been consumed. (HTTP 413) (Request-ID: req-771e9b6a-ff36-44da-8ab6-df6442036ea0)
[root@cinder ~]# cinder create 1 --display-name newdisk1G --volume-type lvm
+--------------------------------+--------------------------------------+
| Property | Value |
+--------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2018-02-24T03:19:24.000000 |
| description | None |
| encrypted | False |
| id | c315ab82-813b-4362-94b3-b689fdd837ed |
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | newdisk1G |
| os-vol-host-attr:host | cinder@lvm#LVM |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 4ffc35534ae342629b9068d43ab715b8 |
| replication_status | None |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| updated_at | 2018-02-24T03:19:24.000000 |
| user_id | 82d8883b243a4d44a101179ab6b1176b |
| volume_type | lvm |
+--------------------------------+--------------------------------------+
[root@cinder ~]# cinder list
+--------------------------------------+-----------+-----------+------+-------------+----------+--------------------------------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+-----------+------+-------------+----------+--------------------------------------+
| 49dc7fa6-2964-4c7a-aba8-7f9ce3d371f3 | in-use | | 1 | - | true | 67122944-209d-42c4-9d3d-9c2b1afdb8d8 |
| 7484e420-fd97-47ba-ba50-02bfd5e7ae50 | in-use | | 1 | - | true | c14d48ee-8816-493e-ad79-05e86b339b5b |
| c315ab82-813b-4362-94b3-b689fdd837ed | available | newdisk1G | 1 | lvm | false | |
+--------------------------------------+-----------+-----------+------+-------------+----------+--------------------------------------+
- 点赞
- 收藏
- 关注作者
评论(0)