Cinder环境

Cinder配置

重新创建卷组cinder-volumes

[root@openstack centos]# vgremove cinder-volumes
Configuration setting "snapshot_autoextend_percent" invalid. It's not part of any section.
Configuration setting "snapshot_autoextend_threshold" invalid. It's not part of any section.
Volume group "cinder-volumes" successfully removed
[root@openstack centos]# pvremove /dev/loop1
Configuration setting "snapshot_autoextend_percent" invalid. It's not part of any section.
Configuration setting "snapshot_autoextend_threshold" invalid. It's not part of any section.
Labels on physical volume "/dev/loop1" successfully wiped
[root@openstack centos]# pvdisplay
Configuration setting "snapshot_autoextend_percent" invalid. It's not part of any section.
Configuration setting "snapshot_autoextend_threshold" invalid. It's not part of any section.
--- Physical volume ---
PV Name /dev/sda2
VG Name centos
PV Size 286.91 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 73447
Free PE 1
Allocated PE 73446
PV UUID wWjJHc-i4A0-JuRb-OCrb-5aFn-YPli-cKOo9W [root@openstack cinder]# fdisk /dev/sda The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.
Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them.
Be careful before using the write command. Command (m for help): p Disk /dev/sda: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x0009d821 Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 602710015 300841984 8e Linux LVM
/dev/sda3 602710016 798031871 97660928 8e Linux LVM Command (m for help): q [root@openstack cinder]# pvcreate /dev/sda3
Configuration setting "snapshot_autoextend_percent" invalid. It's not part of any section.
Configuration setting "snapshot_autoextend_threshold" invalid. It's not part of any section.
Physical volume "/dev/sda3" successfully created
[root@openstack cinder]# pvdisplay
Configuration setting "snapshot_autoextend_percent" invalid. It's not part of any section.
Configuration setting "snapshot_autoextend_threshold" invalid. It's not part of any section.
--- Physical volume ---
PV Name /dev/sda2
VG Name centos
PV Size 286.91 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 73447
Free PE 1
Allocated PE 73446
PV UUID wWjJHc-i4A0-JuRb-OCrb-5aFn-YPli-cKOo9W "/dev/sda3" is a new physical volume of "93.14 GiB"
--- NEW Physical volume ---
PV Name /dev/sda3
VG Name
PV Size 93.14 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID sfF8Ys-NkAr-XZmT-Hkaa-xVCO-g2BY-mC7mHK
[root@openstack cinder]# vgcreate cinder-volumes /dev/sda3
Configuration setting "snapshot_autoextend_percent" invalid. It's not part of any section.
Configuration setting "snapshot_autoextend_threshold" invalid. It's not part of any section.
Volume group "cinder-volumes" successfully created
[root@openstack cinder]# systemctl restart openstack-cinder-volume.service target.service
[root@openstack cinder]# cinder-manage service list
No handlers could be found for logger "oslo_config.cfg"
/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:241: NotSupportedWarning: Configuration option(s) ['use_tpool'] not supported
exception.NotSupportedWarning
Binary Host Zone Status State Updated At
cinder-backup openstack nova enabled :-) 2016-04-14 08:15:25
cinder-scheduler openstack nova enabled :-) 2016-04-14 08:15:25
cinder-volume openstack nova enabled :-) 2016-04-14 08:15:16

Openstack 问题处理

cinder-volume服务启动失败

[root@openstack openstack]# cinder-manage service list
No handlers could be found for logger "oslo_config.cfg"
/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:241: NotSupportedWarning: Configuration option(s) ['use_tpool'] not supported
exception.NotSupportedWarning
Binary Host Zone Status State Updated At
cinder-backup openstack nova enabled :-) 2016-04-14 08:44:31
cinder-scheduler openstack nova enabled :-) 2016-04-14 08:44:31
cinder-volume openstack nova enabled XXX 2016-04-14 08:29:44
[root@openstack openstack]# systemctl start openstack-cinder-volume.service
A dependency job for openstack-cinder-volume.service failed. See 'journalctl -xe' for details.
[root@openstack openstack]# journalctl -xe
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit openstack-losetup.service has failed.
--
-- The result is failed.
Apr 14 16:44:43 openstack.rdo systemd[1]: Dependency failed for OpenStack Cinder Volume Server.
-- Subject: Unit openstack-cinder-volume.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit openstack-cinder-volume.service has failed.
--
-- The result is dependency.
Apr 14 16:44:43 openstack.rdo systemd[1]: Job openstack-cinder-volume.service/start failed with result 'dependency'.
Apr 14 16:44:43 openstack.rdo systemd[1]: Unit openstack-losetup.service entered failed state.
Apr 14 16:44:43 openstack.rdo systemd[1]: openstack-losetup.service failed.
Apr 14 16:44:43 openstack.rdo polkitd[916]: Unregistered Authentication Agent for unix-process:9686:87206 (system bus name :1.105, object path /org/fr
Apr 14 16:44:51 openstack.rdo account-server[1309]: Beginning replication run
Apr 14 16:44:51 openstack.rdo account-server[1309]: Replication run OVER
Apr 14 16:44:51 openstack.rdo account-server[1309]: Attempted to replicate 0 dbs in 0.00175 seconds (0.00000/s)
Apr 14 16:44:51 openstack.rdo account-server[1309]: Removed 0 dbs
Apr 14 16:44:51 openstack.rdo account-server[1309]: 0 successes, 0 failures
Apr 14 16:44:51 openstack.rdo account-server[1309]: no_change:0 ts_repl:0 diff:0 rsync:0 diff_capped:0 hashmatch:0 empty:0
Apr 14 16:44:52 openstack.rdo object-server[1279]: Begin object update sweep
Apr 14 16:44:52 openstack.rdo object-server[9755]: Object update sweep of swiftloopback completed: 0.00s, 0 successes, 0 failures
Apr 14 16:44:52 openstack.rdo object-server[1279]: Object update sweep completed: 0.02s
Apr 14 16:44:57 openstack.rdo container-server[1333]: Beginning replication run
Apr 14 16:44:57 openstack.rdo container-server[1333]: Replication run OVER
Apr 14 16:44:57 openstack.rdo container-server[1333]: Attempted to replicate 0 dbs in 0.00048 seconds (0.00000/s)
Apr 14 16:44:57 openstack.rdo container-server[1333]: Removed 0 dbs
Apr 14 16:44:57 openstack.rdo container-server[1333]: 0 successes, 0 failures
Apr 14 16:44:57 openstack.rdo container-server[1333]: no_change:0 ts_repl:0 diff:0 rsync:0 diff_capped:0 hashmatch:0 empty:0

根据日志可以看出是openstack-cinder-volume.service服务没起来,因为我前面删掉了原本的loop设备,所以导致这个问题,我们先看下这两个service文件,正确的阅读方式请参见 systemd.unit 中文手册

[root@openstack ~]# cd /usr/lib/systemd/system/
[root@openstack system]# cat openstack-cinder-volume.service
[Unit]
Description=OpenStack Cinder Volume Server
After=syslog.target network.target [Service]
Type=simple
User=cinder
ExecStart=/usr/bin/cinder-volume --config-file /usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf --logfile /var/log/cinder/volume.log [Install]
WantedBy=multi-user.target [root@openstack system]# cat openstack-losetup.service
[Unit]
Description=Setup cinder-volume loop device
DefaultDependencies=false
Before=openstack-cinder-volume.service
After=local-fs.target [Service]
Type=oneshot
ExecStart=/usr/bin/sh -c '/usr/sbin/losetup -j /var/lib/cinder/cinder-volumes | /usr/bin/grep /var/lib/cinder/cinder-volumes || /usr/sbin/losetup -f /var/lib/cinder/cinder-volumes'
ExecStop=/usr/bin/sh -c '/usr/sbin/losetup -j /var/lib/cinder/cinder-volumes | /usr/bin/cut -d : -f 1 | /usr/bin/xargs /usr/sbin/losetup -d'
TimeoutSec=60
RemainAfterExit=yes [Install]
RequiredBy=openstack-cinder-volume.service

既然我们已经自己手动创建了cinder-volumes,那么我们就不需要openstack-losetup.service这个脚本了,所以我们把Before+RequiredBy去掉即可

[root@openstack system]# cat openstack-losetup.service
[Unit]
Description=Setup cinder-volume loop device
DefaultDependencies=false
#Before=openstack-cinder-volume.service
After=local-fs.target [Service]
Type=oneshot
ExecStart=/usr/bin/sh -c '/usr/sbin/losetup -j /var/lib/cinder/cinder-volumes | /usr/bin/grep /var/lib/cinder/cinder-volumes || /usr/sbin/losetup -f /var/lib/cinder/cinder-volumes'
ExecStop=/usr/bin/sh -c '/usr/sbin/losetup -j /var/lib/cinder/cinder-volumes | /usr/bin/cut -d : -f 1 | /usr/bin/xargs /usr/sbin/losetup -d'
TimeoutSec=60
RemainAfterExit=yes [Install]
#RequiredBy=openstack-cinder-volume.service

重启系统

[root@openstack Init]# cinder-manage service list
No handlers could be found for logger "oslo_config.cfg"
/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:241: NotSupportedWarning: Configuration option(s) ['use_tpool'] not supported
exception.NotSupportedWarning
Binary Host Zone Status State Updated At
cinder-backup openstack nova enabled :-) 2016-04-14 10:06:47
cinder-scheduler openstack nova enabled :-) 2016-04-14 10:06:48
cinder-volume openstack nova enabled :-) 2016-04-14 10:06:48

Cinder服务使用的更多相关文章

  1. Openstack入门篇(十八)之Cinder服务-->使用NFS作为后端存储

    1.安装cinder-volume组件以及nfs [root@linux-node2 ~]# yum install -y openstack-cinder python-keystone [root ...

  2. cinder服务端的keystone认证机制

    keystone在openstack中的地位 Keystone作为OpenStack中的身份管理与授权模块,主要实现系统用户的身份认证.基于角色的授权管理.其他OpenStack服务的地址发现和安全策 ...

  3. cinder服务状态up/down的源码梳理

    基于ocata版本的,源码梳理 1)用户输入cinder service-list命令行,查看cinder服务的状态时,cinder的入口函数为cinder/api/contrib/services. ...

  4. cinder 服务启动与请求流程源码分析

    文章以ocata版本进行分析 cinder   api 的创建和启动,和 nova   api 类似,都是通过在 api-paste.ini 中定义 app ,然后将 app 加载之后,启动 wsgi ...

  5. openstack——cinder服务篇

    一.cinder 介绍:     理解 Block Storage 操作系统获得存储空间的方式一般有两种: 通过某种协议(SAS,SCSI,SAN,iSCSI 等)挂接裸硬盘,然后分区.格式化.创建文 ...

  6. Openstack入门篇(十七)之Cinder服务-->安装并配置一个本地存储节点

    怎样为块存储服务安装并配置存储节点.为简单起见,这里配置一个有一个空的本地块存储设备的存储节点.这个向导用的是 /dev/sdb,此处选用linux-node1节点作为存储节点,需要在vmware中添 ...

  7. Openstack入门篇(十六)之Cinder服务的部署与测试

    1.理解块存储服务 操作系统获得存储空间的方式一般有两种: 通过某种协议(SAS,SCSI,SAN,iSCSI 等)挂接裸硬盘,然后分区.格式化.创建文件系统:或者直接使用裸硬盘存储数据(数据库) 通 ...

  8. 【openstack N版】——块存储服务cinder

    一.块存储服务介绍 1.1块存储服务通常包含以下组件 cinder-api: 接受API请求,并将其路由到"cinder-volume"执行. cinder-volume: 与块存 ...

  9. openstack Q版部署-----Cinder云存储服务(10)

    一.cinder介绍 一般 cinder-api 和 cinder-scheduler 安装在控制节点上, cinder-volume 安装在存储节点上. 二.数据库配置 # 在任意控制节点创建数据库 ...

随机推荐

  1. 2017-2018-1 20179209《Linux内核原理与分析》第三周作业

    一.函数调用堆栈 存储程序.函数调用堆栈(高级语言起点)和中断机制是计算机工作的三大法宝.其中函数调用堆栈是本次学习的重点.先介绍一些基本的知识点: 1.ebp 在C语言中用作记录当前函数调用的基址: ...

  2. angularJs-未加载完成的页面显示混乱ng-bind

    ng-bind 未初始化完成不加载数据,避免产生{{}}导致页面混乱 还是上边的例子,当前页面没有加载完成的时候,页面显示是不完整的会频繁的出现{{}}这样子的表达式语句,给用户的感觉很不和谐,所以使 ...

  3. 【总结】性能调优:JVM内存调优相关文章

    [总结]性能调优:JVM内存诊断工具 [总结]性能调优:CPU消耗分析 [总结]性能调优:消耗分析 JVM性能调优

  4. mvn 创建的项目 导入到eclipse

    首先,我的工具版本如下: jdk: java version "1.6.0_10-rc2"; maven: apache-maven-3.1.0; eclipse: MyEclip ...

  5. 【python】用python脚本Paramiko实现远程执行命令、下载、推送/上传文件功能

    Paramiko: paramiko模块,基于SSH用于连接远程服务器并执行相关操作. SSHClient: 用于连接远程服务器并执行基本命令 SFTPClient: 用于连接远程服务器并执行上传下载 ...

  6. Spring Boot2.0之纯手写框架

    框架部分重点在于实现原理,懂原理! 废话不多说,动手干起来! SpringMVC程序入口? 没有配置文件,Spring 容器是如何加载? 回顾我们之前搭建Spring Boot项目使用的pom 引入的 ...

  7. 算法(Algorithms)第4版 练习 1.3.10

    主要思路:和1.3.9相似,只不过运算表达式的生成方式不一样 用Dijkstra的双栈算法. 遇到数字则压入数字栈中(String). 遇到运算符则压入运算符栈中(String). 遇到右括号时,从数 ...

  8. Hadoop- 集群时间同步

    集群的时间要同步 * 找一台机器 时间服务器 * 所有的机器与这台机器时间进行定时的同步 比如,每日十分钟,同步一次时间 # rpm -qa|grep ntp # vi /etc/ntp.conf # ...

  9. 如何在VMware Workstation上安装CentOS_7

    1.首先打开VMware Workstation-文件-新建虚拟机 2.选择自定义向导,下一步. 3.由于我的软件版本比较高,不想太多硬件限制就选了版本11.也可以选择低一些版本的,这样兼容性会更好, ...

  10. 深入理解JVM - 线程安全与锁优化 - 第十三章

    线程安全 当多个线程访问一个对象时,如果不用考虑这些线程在运行时环境下的调度和交替执行,也不需要进行额外的同步,或者在调用方法进行任何其他的协调操作,调用这个对象的行为都可以获得正确的结果,那么这个对 ...