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 安装在存储节点上. 二.数据库配置 # 在任意控制节点创建数据库 ...
随机推荐
- 聚聚科技——php开发笔试题及答案
聚聚科技是一个刚创立的公司,很小很小,人很少,老板感觉是个典型的北京小伙儿,戾气很重,很有个性.笔试题倒是简单: 1. echo(), print(), print_r()的区别? echo是PHP语 ...
- STO存在哪些潜在隐患?
STO(Security Token Offering),即证券型通证发行,无疑是现目前区块链圈子讨论最热门的话题之一,纵使STO有很好的前景,但是其潜在隐患也不得不引起重视. 第一,STO与分布式网 ...
- Redis shell
Redis shell 命令 参数 功能 redis-cli -r 将一个命令执行多次 -i 每隔几秒执行一次 -x 和|一起接收前面地输出,并执行命令 -c -a --scan/--patt ...
- MySQL——并发控制(锁)
核心知识点: 1.表锁和行级锁代表着锁的级别:读锁和写锁代表锁定真实类型. 2.读锁属于共享锁,共享同一资源,互不干扰:写锁属于排他锁,为了安全起见,写锁会阻塞其他的读锁和写锁. 3.表锁的开销最小, ...
- YxdJSON - Delphi 高性能 JSON 库(支持RTTI和序列化操作)
源:YxdJSON - Delphi 高性能 JSON 库(支持RTTI和序列化操作) Delphi 高性能 JSON 库(支持RTTI和序列化操作) 支持平台: Windows, Android, ...
- jzyz集训 0611
今天jjh和mzx搞的互测题目有必要记录一下. T1:序列上可以放012三种颜色,有m个限制表示[l,r]区间的颜色数目必须是c,求方案数. 显然的DP,但关键是状态怎么设置,连续设置了n个状态都被自 ...
- JSON.stringify出现 "Converting circular structure to JSON"
JSON.stringify() 我们很熟悉了,将一个对象转换为json形式的字符串. 但是如果你在浏览器控制台中输出 JSON.stringify(window). 如果期望输出一段文字, 可能会 ...
- 修改织梦DedeCms文章页默认title的方法
<title>{dede:field.title/}_{dede:field name='typeid' runphp='yes'}$id=@me;global $dsql;$sql=&q ...
- z+f profiler 9012
角度分辨率/角度精度 0.0088°/0.02°RMS
- 按钮滚动到指定位置(JS)
function intval(v) { v = parseInt(v); return isNaN(v) ? 0 : v; } function getPos(e) { var l = 0; var ...