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

最新文章

  1. GoLang几种读文件方式的比较
  2. 学习js之类的使用
  3. ASP.NET MVC3在页面上获取当前控制器名称、Action名称以及路由参数
  4. 9.依赖(Dependence)
  5. 删除或清空具有外键约束的表数据报-ERROR 1701 (42000)
  6. 关于socket的关闭:close和shutdown
  7. directx11编程中遇到的错误及解决方法
  8. PHP通过传递对象参数调用asp.net Webservice 服务
  9. 如何将md文件转换成带目录的html文件
  10. postman使用详解
  11. eclipse juint4 出错!!!
  12. 【JVM】-NO.112.JVM.2 -【JDK11 HashMap详解-2-tab[i = (n - 1) & hash])剖析】
  13. 84. Largest Rectangle in Histogram
  14. [Python] 06 - Modules --> Packages
  15. SQLServer2012数据库降级至SQLServer2008R2的方法
  16. windows 2003端口80system进程占用的情况
  17. jquery实现点击复制到剪切板
  18. fhq treap 学习笔记
  19. Java 8 日期时间API
  20. fusionjs 学习一 基本试用

热门文章

  1. 我的Java开发学习之旅------>Java经典排序算法之希尔排序
  2. Action类的工作机制
  3. 开源Flex Air版免费激情美女视频聊天室,免费网络远程视频会议系统((Flex,Fms3联合打造))
  4. 一次跨域请求出现 OPTIONS 请求的问题及解决方法
  5. myeclipse 安装flex插件后变为中文 修改配置文件切换到英文界面
  6. Word怎么在方框里打勾
  7. 常用JS组件整理
  8. linux应用之开机自启动方法总结
  9. 常见css兼容问题
  10. java异常的原理以及应用