cinder-volume 启动失败
错误日志如下
[root@block ~]# tail /var/log/cinder/volume.log
2020-04-25 18:28:43.517 34731 ERROR cinder.cmd.volume from cinder.volume.flows.manager import create_volume
2020-04-25 18:28:43.517 34731 ERROR cinder.cmd.volume File "/usr/lib/python2.7/site-packages/cinder/volume/flows/manager/create_volume.py", line 30, in <module>
2020-04-25 18:28:43.517 34731 ERROR cinder.cmd.volume File "/usr/lib/python2.7/site-packages/cinder/image/image_utils.py", line 45, in <module>
2020-04-25 18:28:43.517 34731 ERROR cinder.cmd.volume from cinder.volume import utils as volume_utils
2020-04-25 18:28:43.517 34731 ERROR cinder.cmd.volume File "/usr/lib/python2.7/site-packages/cinder/volume/utils.py", line 24, in <module>
2020-04-25 18:28:43.517 34731 ERROR cinder.cmd.volume from Crypto.Random import random
2020-04-25 18:28:43.517 34731 ERROR cinder.cmd.volume ImportError: No module named Crypto.Random
2020-04-25 18:28:43.517 34731 ERROR cinder.cmd.volume
2020-04-25 18:28:43.521 34731 ERROR cinder.cmd.volume [-] No volume service(s) started successfully, terminating.
from cinder.volume.flows.manager import create_volume 卷创建失败
重新创建pv vg卷
[root@block ~]# vgremove cinder-volumes
[root@block ~]# pvremove /dev/sdb1
fdisk /dev/sdb 重新分区
[root@block ~]# mkfs.ext4 /dev/sdb1
[root@block ~]# pvcreate /dev/sdb1
[root@block ~]# vgcreate cinder-volumes /dev/sdb2
重启服务
[root@block ~]# systemctl restart openstack-cinder-volume.service target.service
控制端(安装scheduler端)
[root@controller ~]# cinder service-list
+------------------+------------+------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+------------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler | controller | nova | enabled | up | 2020-04-26T12:30:55.000000 | - |
| cinder-volume | block@lvm | nova | enabled | up | 2020-04-26T12:30:57.000000 | - |
+------------------+------------+------+---------+-------+----------------------------+-----------------+
[root@controller ~]#