問題
OpenStackのtraining-labsを使ってクラウドを構築した際,Alpineのような小さなイメージなら起動できるものの,CentOSやUbuntuのような大きなサイズのインスタンスを起動しようとすると次のようなエラーが出て起動できない.
Failed to perform requested operation on instance "centos", the instance has an error status: Please try again later [Error: Build of instance e1dd018a-f490-4628-b51c-e3a7f3ad81d5 aborted: Volume 7567d656-426a-404c-9478-9e5e30ef41fd did not finish being created even after we waited 143 seconds or 47 attempts. And its status is error.].
/var/log/cinder/cinder-volume.log
を見てみる
2020-04-30 06:01:16.883 1085 ERROR oslo_messaging.rpc.server Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf qemu-img convert -O raw -t none -f qcow2 /conversion/tmp7as28z4lcompute1@lvm /dev/mapper/cinder--volumes-volume--7567d656--426a--404c--9478--9e5e30ef41fd 2020-04-30 06:01:16.883 1085 ERROR oslo_messaging.rpc.server Exit code: 1 2020-04-30 06:01:16.883 1085 ERROR oslo_messaging.rpc.server Stdout: '' 2020-04-30 06:01:16.883 1085 ERROR oslo_messaging.rpc.server Stderr: 'qemu-img: error while writing sector 7340032: No space left on device\n' 2020-04-30 06:01:16.883 1085 ERROR oslo_messaging.rpc.server
/dev/mapper
以下にqemu-img convert
出来ていない模様.
よって,LVMの論理ボリュームを拡張する必要がある.LVMに関してはhttps://wiki.archlinux.jp/index.php/LVM が詳しい.さすがはArch Wiki先生.
論理ボリュームの確認
$ sudo lvdisplay -a --- Logical volume --- LV Name cinder-volumes-pool VG Name cinder-volumes LV UUID KxmITJ-eQ46-OVa9-F3lQ-mqgp-u8rW-AuoGEO LV Write Access read/write LV Creation host, time compute1, 2020-04-25 07:41:50 +0000 LV Pool metadata cinder-volumes-pool_tmeta LV Pool data cinder-volumes-pool_tdata LV Status available # open 3 LV Size <1.19 GiB Allocated pool data 79.08% Allocated metadata 73.93% Current LE 1584 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:2
training labsのデフォルトではLV Sizeが1.19GiBになっている.これでは足りない.
論理ボリュームの拡張
20GBくらい足してあげるとエラーが消えた.
$ sudo lvextend -L +20G cinder-volumes/cinder-volumes-pool