cinder-volume服務狀態爲down 解決方法

[root@controller ~]# cinder service-list
+------------------+-------------+------+---------+-------+----------------------------+-----------------+
|      Binary      |     Host    | Zone |  Status | State |         Updated_at         | Disabled Reason |
+------------------+-------------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler |  controller | nova | enabled |   up  | 2019-04-17T18:15:24.000000 |        -        |
|  cinder-volume   | compute@lvm | nova | enabled |   down  | 2019-04-17T18:15:20.000000 |        -        |
+------------------+-------------+------+---------+-------+----------------------------+-----------------+

cinder-volume服務沒起來 已經重啓服務也還是down狀態,啓動日誌看看有沒有報錯

[root@controller ~]# systemctl restart openstack-cinder-volume.service
[root@controller log]# tail -f messages
Apr 17 18:17:33 controller cinder-volume: 2019-04-17 18:17:33.112 3085 ERROR cinder.volume.manager Stderr: u'  Volume group "cinder-volumes" not found\n  Cannot process volume group cinder-volumes\n'
Apr 17 18:17:33 controller cinder-volume: 2019-04-17 18:17:33.112 3085 ERROR cinder.volume.manager
Apr 17 18:17:33 controllern cinder-volume: 2019-04-17 18:17:33.337 3085 INFO cinder.volume.manager [req-1c834e71-3c13-474e-8f96-8391d7d471f7 - - - - -] Initializing RPC dependent components of volume driver LVMVolumeDriver (3.0.0)
Apr 17 18:17:33 controller cinder-volume: 2019-04-17 18:17:33.339 3085 WARNING cinder.volume.drivers.lvm [req-1c834e71-3c13-474e-8f96-8391d7d471f7 - - - - -] Unable to update stats on non-initialized Volume Group: cinder-volumes
Apr 17 18:17:33 controller cinder-volume: 2019-04-17 18:17:33.355 3085 INFO cinder.volume.manager [req-1c834e71-3c13-474e-8f96-8391d7d471f7 - - - - -] Driver post RPC initialization completed successfully.

大致報錯信息是指找不到cinder-volumes這個卷組

[root@controller~]# vgs 沒有卷組
[root@controlle ~]# pvcreate /dev/vda7  創建一個物理卷
[root@controlle ~]# vgcreate cinder-volumes /dev/vda7  創建卷組
[root@controller ~]# vgs
  VG            #PV #LV #SN Attr   VSize VFree
  cinder-volume   1   0   0 wz--n- 4.75g 4.75g 現在有了
    #再去看一下配置文件 確保萬一
    [lvm]
    volume_group = cinder-volumes
    #重啓服務
    [root@controller ~]# systemctl restart openstack-cinder-volume.service target.service
    [root@controller ~]# cinder service-list
+------------------+--------------+------+---------+-------+----------------------------+-----------------+
|      Binary      |     Host     | Zone |  Status | State |         Updated_at         | Disabled Reason |
+------------------+--------------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler |   controller   | nova | enabled |   up  | 2019-04-17T18:36:09.000000 |        -        |
|  cinder-volume   | compute@lvm | nova | enabled |   up  | 2019-04-17T18:36:04.000000 |        -        |
+------------------+--------------+------+---------+-------+----------------------------+-----------------+

這樣就解決了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章