目录

文章目录

问题

[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 | - |
+------------------+-------------------------+------+---------+-------+----------------------------+-----------------+

volume.log

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

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

调查

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'

定位到 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

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

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

Cinder LVM backend cinder-volume service down的更多相关文章

  1. 学习OpenStack之 (2):Cinder LVM 配置

    0.背景 OpenStack 中的实例是不能持久化的,cinder服务重启,实例消失.如果需要挂载 volume,需要在 volume 中实现持久化.Cinder提供持久的块存储,目前仅供给虚拟机挂载 ...

  2. Cinder LVM Oversubscription in thin provisioning

    目录 文章目录 目录 Oversubscription in thin provisioning Oversubscription in thin provisioning Cinder spec: ...

  3. Linux 系统 LVM(Logical Volume Manager)逻辑卷管理

    一.前言 每个Linux使用者在安装Linux时都会遇到这样的困境:在为系统分区时,如何精确评估和分配各个硬盘分区的容量,因为系统管理员不但要考虑到 当前某个分区需要的容量,还要预见该分区以后可能需要 ...

  4. LVM(Logical Volume Manager)逻辑卷管理

    本文实验部分,完全由本人亲自动手实践得来 文章中有部分的内容是我个人通过实验测试出来的,虽以目前本人的能力还没发现不通之处,但错误难免,所以若各位朋友发现什么错误,或有疑惑.更好的建议等,盼请各位能在 ...

  5. 第 6 章 Cinder - 061 - Boot from Volume

    Boot from Volume Volume 除了可以用作 instance 的数据盘,也可以作为启动盘(Bootable Volume). 打开 instance 的 launch 操作界面. 这 ...

  6. 逻辑卷管理LVM(logical volume manager)

    LVM的全名是logical volume manager,中文翻译逻辑卷管理器.之所以称为卷是因为可以将文件系统像卷一样伸长和缩短,LVM的做法是将几个物理的分区(或磁盘)通过软件组合成为一块独立的 ...

  7. 【原理】LVM(Logical Volume Manager)动态卷管理

    一张图让你学会LVM   导读 随着科技的进步,人们不知不觉的就进入了大数据的时代,数据的不断增加我们发现我们的磁盘越来越不够用了,接下来就是令人头疼的事情--加硬盘,数据的备份与还原.LVM就是Li ...

  8. openstack(liberty):部署实验平台(三,简单版本软件安装 之cinder,swift)

    今天这里追加存储相关的部署,主要是Block和Object,为了看到效果,简单的部署在单节点上,即Block一个节点,Object对应一个节点. 读者可能会觉得我这个图和之前的两个post有点点不同, ...

  9. Openstack(十七)部署快存储cinder

    官方部署文档:https://docs.openstack.org/ocata/zh_CN/install-guide-rdo/cinder.html OpenStack的存储组件—Cinder和Sw ...

随机推荐

  1. linux服务器硬件信息查看

    1.linux 查看服务器序列号(S/N) [root@oss20hb106 ~]# dmidecode -t 1 # dmidecode 2.11 # SMBIOS entry point at 0 ...

  2. Nginx实用整理

    1. nginx 简述 1.1Nginx是轻量级高并发HTTP服务器和反向代理服务器:同时也是一个IMAP.POP3.SMTP代理服务器:Nginx可以作为一个HTTP服务器进行网站的发布处理,另外N ...

  3. python之路-笔录2[CSS&JS]

    *** 目录 *** 1. 块级标签与行内标签 2. css常用清除样式 3. 两种清除浮动的方式 4. CSS学习 5. JS 学习 *** END *** 1. 块级标签与行内标签 常见的块级元素 ...

  4. maven生成jar包编码问题

    要做一个jar文件供外部调用,此jar的源代码中注释为中文,用maven打包后在其它工程中导入后总不能正常显示中文,记录解决方法如下: 在pom.xml中设置默认编码类型为UTF-8: <pro ...

  5. qt5---事件过滤器

  6. qt5--树形控件QTreeWidget

    需要       #include <QTreeWidget>               #include <QTreeWidgetItem> #include " ...

  7. dede cms 怎样调用年月日

    一: 首页:([field:pubdate function='strftime("%m-%d",@me)'/])==(5-15)([field:pubdate function= ...

  8. 盒子模型的overflow属性,border属性,padding与margin属性

    今天要写的是CSS布局—盒子模型 首先说一下CSS的整体布局: 它包括容器(container),页眉(header),导航条(navbar),页面主要内容(main),菜单(menu),主要内容(c ...

  9. CF 352 D 罗宾汉发钱 模拟题+贪心

    D. Robin Hood time limit per test 1 second memory limit per test 256 megabytes input standard input ...

  10. 【UTR #3】量子破碎

    一道有趣的题. 看到按位的矩阵运算,如果对FWT比较熟悉的话,会比较容易地想到. 这种形式也就FWT等转移里面有吧--就算有其他的也难构造出来. 然而FWT的矩阵并不是酉矩阵(也就是满足 \(AA^T ...