devstack cinder-volume服务状态为down
cinder-manage service list
查看到有一个 xxx状态
Binary Host Zone Status State Updated At RPC Version Object Version Cluster
cinder-scheduler ubsv nova enabled :-) 2019-05-16 09:19:30 3.11 1.37
cinder-volume ubsv@lvmdriver-1 nova enabled XXX 2019-05-16 08:13:18 3.16 1.37
`systemctl restart devstack@c*` #重新启动cinder cinder-volume 过一会就会down状态,所有虚拟机都无法启动.
root@ubsv:~# vgs
VG #PV #LV #SN Attr VSize VFree
stack-volumes-lvmdriver-1 1 5 0 wz--n- <24.00g <1.15g #没有空间了
ubuntu-vg 2 4 0 wz--n- <1.83t <63.54g
那就增加个 vg吧.
修改
vim /etc/cinder/cinder.conf
#修改的
default_volume_type = lvmdriver-2
enabled_backends = lvmdriver-1,lvmdriver-2
#原有的
[lvmdriver-1]
image_volume_cache_enabled = True
volume_clear = zero
lvm_type = auto
target_helper = tgtadm
volume_group = stack-volumes-lvmdriver-1
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_backend_name = lvmdriver-1
#新增
[lvmdriver-2]
volume_group = ubuntu-vg
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_backend_name = lvmdriver-2
重新启动cinder服务
systemctl restart devstack@c*
重新查看下状态,发现已经有了.
root@ubsv:~# cinder-manage service list
DEBUG oslo_db.sqlalchemy.engines [None req-606341f1-d96b-4b01-88bf-4fe7bca206e9 None None] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION {{(pid=6243) _check_effective_sql_mode /usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/engines.py:307}}
Binary Host Zone Status State Updated At RPC Version Object Version Cluster
cinder-scheduler ubsv nova enabled :-) 2019-05-16 09:47:18 3.11 1.37
cinder-volume ubsv@lvmdriver-1 nova enabled :-) 2019-05-16 09:47:22 3.16 1.37
cinder-volume ubsv@lvmdriver-2 nova enabled :-) 2019-05-16 09:47:18 3.16 1.37
在dashboard中 管理员登录, 管理员-卷类型-创建卷类型
,然后找到新创建的卷类型点击下三角箭头->查看扩展规格
创建一个键值对 volume_backend_name lvmdriver-2
刚才我们创建的.
之后可以迁移卷到我们新的卷类型. 以后默认新建卷都存储在我们新建的lvmdriver-2#lvmdriver-2
中,至此 目前解决了这个问题.
关联错误提示: schedule allocate volume:Could not find any available weighted backend. cinder service 状态为 down