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服务使用的更多相关文章
- Openstack入门篇(十八)之Cinder服务-->使用NFS作为后端存储
1.安装cinder-volume组件以及nfs [root@linux-node2 ~]# yum install -y openstack-cinder python-keystone [root ...
- cinder服务端的keystone认证机制
keystone在openstack中的地位 Keystone作为OpenStack中的身份管理与授权模块,主要实现系统用户的身份认证.基于角色的授权管理.其他OpenStack服务的地址发现和安全策 ...
- cinder服务状态up/down的源码梳理
基于ocata版本的,源码梳理 1)用户输入cinder service-list命令行,查看cinder服务的状态时,cinder的入口函数为cinder/api/contrib/services. ...
- cinder 服务启动与请求流程源码分析
文章以ocata版本进行分析 cinder api 的创建和启动,和 nova api 类似,都是通过在 api-paste.ini 中定义 app ,然后将 app 加载之后,启动 wsgi ...
- openstack——cinder服务篇
一.cinder 介绍: 理解 Block Storage 操作系统获得存储空间的方式一般有两种: 通过某种协议(SAS,SCSI,SAN,iSCSI 等)挂接裸硬盘,然后分区.格式化.创建文 ...
- Openstack入门篇(十七)之Cinder服务-->安装并配置一个本地存储节点
怎样为块存储服务安装并配置存储节点.为简单起见,这里配置一个有一个空的本地块存储设备的存储节点.这个向导用的是 /dev/sdb,此处选用linux-node1节点作为存储节点,需要在vmware中添 ...
- Openstack入门篇(十六)之Cinder服务的部署与测试
1.理解块存储服务 操作系统获得存储空间的方式一般有两种: 通过某种协议(SAS,SCSI,SAN,iSCSI 等)挂接裸硬盘,然后分区.格式化.创建文件系统:或者直接使用裸硬盘存储数据(数据库) 通 ...
- 【openstack N版】——块存储服务cinder
一.块存储服务介绍 1.1块存储服务通常包含以下组件 cinder-api: 接受API请求,并将其路由到"cinder-volume"执行. cinder-volume: 与块存 ...
- openstack Q版部署-----Cinder云存储服务(10)
一.cinder介绍 一般 cinder-api 和 cinder-scheduler 安装在控制节点上, cinder-volume 安装在存储节点上. 二.数据库配置 # 在任意控制节点创建数据库 ...
随机推荐
- SAP 4代增强
*20170325 160000 以下之外, 还有:.替代, -用过一次:.BTE -没用过,需要学习: 第二代增强和第三代增强的差别: 1.Tcode 不同:第二代: CMOD 增强管理,SMOD ...
- CSS3定时提示动画特效
在线演示 本地下载
- HDU4825 Xor Sum —— Trie树
题目链接:https://vjudge.net/problem/HDU-4825 Xor Sum Time Limit: 2000/1000 MS (Java/Others) Memory Li ...
- matlab之细胞数组
学习matlab的一个博客:https://blog.csdn.net/smf0504/article/details/51814362 Matlab从5.0版开始引入了一种新的数据类型—细胞( ce ...
- BZOJ 1637 [Usaco2007 Mar]Balanced Lineup:前缀和 + 差分
题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1637 题意: Farmer John 决定给他的奶牛们照一张合影,他让 N (1 ≤ N ...
- BZOJ 2020 [Usaco2010 Jan]Buying Feed,II:贪心【定义价值】
题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=2020 题意: FJ开车去买K份食物. 如果他的车上有X份食物,每走一里就花费X元. FJ的 ...
- linux应用之nginx的源码安装及配置(centos)
1.准备工作选首先安装这几个软件:GCC,PCRE(Perl Compatible Regular Expression),zlib,OpenSSL.Nginx是C写的,需要用GCC编译:Nginx的 ...
- jenkins maven tomcat做持续集成
maven 采用 maven 3.0以上的版本.tomcat 采用 tomcat 7.0 以上的版本 1. tomcat 配置用户账号和权限 tomcat-users.xml <role rol ...
- 跨线程send message
今天同事问了一个问题,说在线程中send message 和直接调用是不是一样,他觉得是一样的,但是线程跟踪却发现处理过程是在接收消息队列完成.回家看到博客园上的一番争论才有些明白,这里贴出来,共勉 ...
- django 模板中通过变量替代key取字典内容
模板中通过变量替代key取字典内容 templatetags/├── get_item.py├── __init__.py ###get_item.py # coding=utf-8 from dja ...