目录

文章目录

问题

[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. Ubuntu环境变量设置注意点

    设置环境变量时,有一点要注意: /etc/bash.bashrc与/etc/profile是有区别的 什么区别呢? 打开一个新的shell时,会读取/etc/bash.bashrc和~/.bashrc ...

  2. deep_learning_Function_tensorflow_unpack()

    tf.unpack(A, axis)是一个解包函数.A是一个需要被解包的对象,axis是一个解包方式的定义,默认是零,如果是零,返回的结果就是按行解包.如果是1,就是按列解包. 例如: from te ...

  3. double to long

    obj to double obj to long instance of Bigdecimal public static void main(String[] args) throws Parse ...

  4. 【小知识】比较 x^y 和 y^x 的大小

    往前翻几个编号相邻的题目翻到了这么一道题,感觉很好奇就做了一下 (upd:我下午问了下出题人做法,他就把题隐藏了……这不太友好啊……所以我补一下题意:) 题意 给你两个整数 $x$ 和 $y$,求 $ ...

  5. Spring NamespaceHandlerResolver xml的标签加载的扩展 和 ApplicationContext

    NamespaceHandlerResolver public NamespaceHandler resolver(String namespaceUri); DefaultNamespaceHand ...

  6. CAP 与 注册中心

    https://blog.csdn.net/fly910905/article/details/100023415 http://www.ruanyifeng.com/blog/2018/07/cap ...

  7. 【leetcode】1243. Array Transformation

    题目如下: Given an initial array arr, every day you produce a new array using the array of the previous ...

  8. 命令行执行while语句

    while true;do echo hello world;sleep 1;done

  9. Python天天学_01_基础1

    Python_day_01 金角大王:http://www.cnblogs.com/alex3714/articles/5465198.html ------Python是一个优雅的大姐姐 学习方式: ...

  10. 冒泡排序和选择排序(bubble sort and selection sort)

    Bubble sort Basic Method: import random nums = [random.randint(1,20) for _ in range(10)] #制作一个无序数字列表 ...