Cinder LVM backend cinder-volume service down

举报
云物互联 发表于 2021/08/06 00:25:20 2021/08/06
【摘要】 目录 文章目录 目录问题调查解决 问题 [stack@manager ~]$ cinder service-list +------------------+-------------------------+------+---------+-------+----------------------------+-----------------+...

目录

文章目录

问题

[stack@manager ~]$ cinder service-list
+------------------+-------------------------+------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status  | State | Updated_at | Disabled Reason |
+------------------+-------------------------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler | hostgroup | nova | enabled | up | 2018-12-26T13:32:26.000000 | - |
| cinder-volume | hostgroup@tripleo_iscsi | nova | enabled | down  | 2018-12-23T04:23:33.000000 | - |
+------------------+-------------------------+------+---------+-------+----------------------------+-----------------+

  
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

volume.log

ERROR cinder.service [-] Manager for service cinder-volume hostgroup@tripleo_iscsi is reporting problems, not sending heartbeat. Service will appear "down".

  
 
  • 1

cinder.conf

[tripleo_iscsi]
volume_driver=cinder.volume.drivers.lvm.LVMVolumeDriver
volumes_dir=/var/lib/cinder/volumes
volume_group = cinder-volumes
iscsi_protocol=iscsi
iscsi_ip_address=172.18.22.74
volume_backend_name=tripleo_iscsi
iscsi_helper=lioadm

  
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

调查

2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager [req-d703742c-2989-47af-9b15-3e927c0e09d6 - - - - -] Failed to initialize driver.
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager Traceback (most recent call last):
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 423, in init_host
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager self.driver.check_for_setup_error()
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/lvm.py", line 301, in check_for_setup_error
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager self.configuration.lvm_suppress_fd_warnings))
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/brick/local_dev/lvm.py", line 105, in __init__
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager if self._vg_exists() is False:
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/brick/local_dev/lvm.py", line 138, in _vg_exists
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager run_as_root=True)
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/os_brick/executor.py", line 52, in _execute
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager result = self.__execute(*args, **kwargs)
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/utils.py", line 123, in execute
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager return processutils.execute(*cmd, **kwargs)
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager   File "/usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py", line 394, in execute
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager cmd=sanitized_cmd)
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager ProcessExecutionError: Unexpected error while running command.
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C vgs --noheadings -o name cinder-volumes
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager Exit code: 5
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager Stdout: u''
2018-12-26 13:33:03.104 163092 ERROR cinder.volume.manager Stderr: u'File descriptor 10 (/dev/urandom) leaked on vgs invocation. Parent PID 163094: /usr/bin/python2\n  Volume group "cinder-volumes" not found\n  Cannot process volume group cinder-volumes\n'

  
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21

定位到 Cannot process volume group cinder-volumes

解决

[root@overcloud-controller-0 ~]# df -Th
Filesystem Type Size  Used Avail Use% Mounted on
/dev/sda2 xfs 447G   47G  400G  11% /
devtmpfs devtmpfs   63G 0   63G   0% /dev
tmpfs tmpfs 63G  103M   63G   1% /dev/shm
tmpfs tmpfs 63G  2.1M   63G   1% /run
tmpfs tmpfs 63G 0   63G   0% /sys/fs/cgroup
tmpfs tmpfs 13G 0   13G   0% /run/user/979
tmpfs tmpfs 13G 0   13G   0% /run/user/977
tmpfs tmpfs 13G 0   13G   0% /run/user/0
tmpfs tmpfs 13G 0   13G   0% /run/user/1000

[root@overcloud-controller-0 ~]# dd if=/dev/zero of=/cinder/volumegroup/disk.img count=102400 bs=1MB
102400+0 records in
102400+0 records out
102400000000 bytes (102 GB) copied, 362.07 s, 283 MB/s

[root@overcloud-controller-0 ~]# ll -h /cinder/volumegroup/disk.img
-rw-r--r--. 1 root root 96G Dec 26 13:42 /cinder/volumegroup/disk.img

[root@overcloud-controller-0 ~]# losetup /dev/loop0 /cinder/volumegroup/disk.img
[root@overcloud-controller-0 ~]# pvcreate /dev/loop0
  Physical volume "/dev/loop0" successfully created.
[root@overcloud-controller-0 ~]# vgcreate cinder-volumes /dev/loop0
  Volume group "cinder-volumes" successfully created
[root@overcloud-controller-0 ~]# vgs
  VG #PV #LV #SN Attr   VSize  VFree
  cinder-volumes   1   0   0 wz--n- 95.36g 95.36g

[root@overcloud-controller-0 ~]# systemctl restart openstack-cinder-volume

  
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

需要注意的是,当服务器重启后依旧会出现同样的问题,这是因为使用文件模拟 VG,服务器重启后需要重新 Mount,可以通过下述方式来解决:

$ cat /etc/rc.local 
losetup /dev/loop0 /cinder/volumegroup/disk.img

  
 
  • 1
  • 2

文章来源: is-cloud.blog.csdn.net,作者:范桂飓,版权归原作者所有,如需转载,请联系作者。

原文链接:is-cloud.blog.csdn.net/article/details/85269525

【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。