Openstack:无法从图像创建音量(空间问题)

时间:2018-02-27 08:26:16

标签: openstack openstack-cinder openstack-glance

我试图将CentOS7图像转换为音量,音量是创建的,但它是空的,我收到此错误

==> /var/log/cinder/volume.log <==
2018-02-26 21:37:10.359 4488 ERROR cinder.volume.flows.manager.create_volume [req-32a018ce-8b9f-4823-b22f-d2d7909ec001 3829056496a04d929af44e29efc7568b f2b81bf3d8ec40c191ae06bc2682e606 - default default] Failed to copy image 9c469b08-3ed2-4252-b9ac-4cf1f8553675 to volume: ce370d4e-0e1e-4a20-b0e3-3025c4552ddc: ImageTooBig: Image 9c469b08-3ed2-4252-b9ac-4cf1f8553675 size exceeded available disk space: There is no space to convert image. Requested: 8589934592, available: 8312008704
2018-02-26 21:37:10.359 4488 ERROR cinder.volume.flows.manager.create_volume Traceback (most recent call last):
2018-02-26 21:37:10.359 4488 ERROR cinder.volume.flows.manager.create_volume   File "/usr/lib/python2.7/site-packages/cinder/volume/flows/manager/create_volume.py", line 555, in _copy_image_to_volume
2018-02-26 21:37:10.359 4488 ERROR cinder.volume.flows.manager.create_volume     context, volume, image_service, image_id)
2018-02-26 21:37:10.359 4488 ERROR cinder.volume.flows.manager.create_volume   File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/lvm.py", line 510, in copy_image_to_volume
2018-02-26 21:37:10.359 4488 ERROR cinder.volume.flows.manager.create_volume     size=volume['size'])
2018-02-26 21:37:10.359 4488 ERROR cinder.volume.flows.manager.create_volume   File "/usr/lib/python2.7/site-packages/cinder/image/image_utils.py", line 339, in fetch_to_raw
2018-02-26 21:37:10.359 4488 ERROR cinder.volume.flows.manager.create_volume     run_as_root=run_as_root)
2018-02-26 21:37:10.359 4488 ERROR cinder.volume.flows.manager.create_volume   File "/usr/lib/python2.7/site-packages/cinder/image/image_utils.py", line 412, in fetch_to_volume_format
2018-02-26 21:37:10.359 4488 ERROR cinder.volume.flows.manager.create_volume     check_available_space(dest, data.virtual_size, image_id)
2018-02-26 21:37:10.359 4488 ERROR cinder.volume.flows.manager.create_volume   File "/usr/lib/python2.7/site-packages/cinder/image/image_utils.py", line 517, in check_available_space
2018-02-26 21:37:10.359 4488 ERROR cinder.volume.flows.manager.create_volume     raise exception.ImageTooBig(image_id=image_id, reason=msg)
2018-02-26 21:37:10.359 4488 ERROR cinder.volume.flows.manager.create_volume ImageTooBig: Image 9c469b08-3ed2-4252-b9ac-4cf1f8553675 size exceeded available disk space: There is no space to convert image. Requested: 8589934592, available: 8312008704
2018-02-26 21:37:10.359 4488 ERROR cinder.volume.flows.manager.create_volume 
2018-02-26 21:37:10.623 4488 INFO cinder.volume.flows.manager.create_volume [req-32a018ce-8b9f-4823-b22f-d2d7909ec001 3829056496a04d929af44e29efc7568b f2b81bf3d8ec40c191ae06bc2682e606 - default default] Volume volume-ce370d4e-0e1e-4a20-b0e3-3025c4552ddc (ce370d4e-0e1e-4a20-b0e3-3025c4552ddc): created successfully
2018-02-26 21:37:10.629 4488 INFO cinder.volume.manager [req-32a018ce-8b9f-4823-b22f-d2d7909ec001 3829056496a04d929af44e29efc7568b f2b81bf3d8ec40c191ae06bc2682e606 - default default] Created volume successfully.

[root@cinder ~]# grep -E ^image_conversion /etc/cinder/cinder.conf 
image_conversion_dir = /var/lib/cinder/conversion
[root@cinder ~]# ll /var/lib/cinder/conversion
total 0
[root@cinder ~]# df -h /var/lib/cinder/conversion
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg00-var   30G  1.7G   29G   6% /var

如您所见,我有临时图像转换的空间,图像是~8go

最新的群集。

有什么想法吗?

由于

1 个答案:

答案 0 :(得分:0)

调用函数check_available_space()并将dest设置为LVM设备,例如/dev/mapper/xxx

在Ubuntu上,/devudev挂载,默认大小为1/2大小的RAM

有一项修复,请参阅here