OpenStack+Ceph+热迁移+++六、测试是否运行正常
来源:互联网 发布:level2免费版软件 编辑:程序博客网 时间:2024/06/01 09:52
六、测试是否运行正常
查看nova各服务
openstack compute service list
root@controller ~]# . admin-openrc [root@controller ~]# openstack compute service list+----+------------------+------------+----------+---------+-------+----------------------------+| Id | Binary | Host | Zone | Status | State | Updated At |+----+------------------+------------+----------+---------+-------+----------------------------+| 1 | nova-conductor | controller | internal | enabled | up | 2017-11-28T15:20:58.000000 || 2 | nova-consoleauth | controller | internal | enabled | up | 2017-11-28T15:21:07.000000 || 3 | nova-scheduler | controller | internal | enabled | up | 2017-11-28T15:21:05.000000 || 6 | nova-compute | compute1 | nova | enabled | up | 2017-11-28T15:21:04.000000 || 7 | nova-compute | compute2 | nova | enabled | up | 2017-11-28T15:21:04.000000 || 8 | nova-compute | cinder | nova | enabled | up | 2017-11-28T15:20:57.000000 |+----+------------------+------------+----------+---------+-------+----------------------------+
查看cinder服务
cinder service-list
[root@controller ~]# cinder service-list+------------------+-------------+------+---------+-------+----------------------------+-----------------+| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |+------------------+-------------+------+---------+-------+----------------------------+-----------------+| cinder-scheduler | controller | nova | enabled | up | 2017-11-28T15:22:17.000000 | - || cinder-volume | cinder | nova | enabled | down | 2017-11-28T12:13:07.000000 | - || cinder-volume | cinder@ceph | nova | enabled | up | 2017-11-28T15:22:18.000000 | - |+------------------+-------------+------+---------+-------+----------------------------+-----------------+
发现有个down掉的,不碍事我们删掉它眼不见心不烦
先更改状态为disable
cinder service-disable cinder cinder-volume
[root@controller ~]# cinder service-disable cinder cinder-volume+--------+---------------+----------+| Host | Binary | Status |+--------+---------------+----------+| cinder | cinder-volume | disabled |+--------+---------------+----------+[root@controller ~]# cinder service-list+------------------+-------------+------+----------+-------+----------------------------+-----------------+| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |+------------------+-------------+------+----------+-------+----------------------------+-----------------+| cinder-scheduler | controller | nova | enabled | up | 2017-11-28T16:03:21.000000 | - || cinder-volume | cinder | nova | disabled | down | 2017-11-28T16:02:58.000000 | - || cinder-volume | cinder@ceph | nova | enabled | up | 2017-11-28T16:03:19.000000 | - |+------------------+-------------+------+----------+-------+----------------------------+-----------------+
通过数据库直接删了它
update services set deleted=1 where host='cinder' and topic='cinder-volume';
[root@controller ~]# mysql -uroot -pEnter password: Welcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 457Server version: 10.1.12-MariaDB MariaDB ServerCopyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> use cinder;Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedMariaDB [cinder]> update services set deleted=1 where host='cinder' and topic='cinder-volume';Query OK, 1 row affected (0.02 sec)Rows matched: 1 Changed: 1 Warnings: 0MariaDB [cinder]> exitBye[root@controller ~]# cinder service-list+------------------+-------------+------+---------+-------+----------------------------+-----------------+| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |+------------------+-------------+------+---------+-------+----------------------------+-----------------+| cinder-scheduler | controller | nova | enabled | up | 2017-11-28T16:04:21.000000 | - || cinder-volume | cinder@ceph | nova | enabled | up | 2017-11-28T16:04:29.000000 | - |+------------------+-------------+------+---------+-------+----------------------------+-----------------+
删掉了,舒服多了
—————————————————————————————————————————————————————————
通过控制台创建一个云硬盘
在node1节点上执行
rbd --pool volumes ls
[root@node1 ~]# rbd --pool volumes lsvolume-555f10eb-1a35-40a4-a60f-cfefaab2b1d4没毛病是在ceph上
—————————————————————————————————————————————————————————
上传一个镜像
先把以前那个img的转成raw
qemu-img convert -f qcow2 -O raw cirros-0.3.0-x86_64-disk.img cirros-0.3.0-x86_64-disk.raw
[root@controller ~]qemu-img convert -f qcow2 -O raw cirros-0.3.0-x86_64-disk.img cirros-0.3.0-x86_64-disk.raw[root@controller ~]# lsadmin-openrc anaconda-ks.cfg cirros-0.3.0-x86_64-disk.img demo-openrc[root@controller ~]# qemu-img convert -f qcow2 -O raw cirros-0.3.0-x86_64-disk.img cirros-0.3.0-x86_64-disk.raw
上传镜像到镜像服务
openstack image create "raw" \
--file cirros-0.3.0-x86_64-disk.raw \
--disk-format raw --container-format bare \
--public
[root@controller ~]# openstack image create "raw" \> --file cirros-0.3.0-x86_64-disk.raw \> --disk-format raw --container-format bare \> --public+------------------+----------------------------------------------------------------------------------------------------------+| Field | Value |+------------------+----------------------------------------------------------------------------------------------------------+| checksum | 35cadb3cc5458a9c7a1fa4d08ba9e593 || container_format | bare || created_at | 2017-11-28T19:24:20Z || disk_format | raw || file | /v2/images/1039ef83-c618-4900-98b0-df61c3d7b132/file || id | 1039ef83-c618-4900-98b0-df61c3d7b132 || min_disk | 0 || min_ram | 0 || name | raw || owner | 3cdd57cd88014ef3a85d63ae0a0dcb60 || properties | direct_url='rbd://46ac86e8-1efe-403c-b735-587f9d76a905/images/1039ef83-c618-4900-98b0-df61c3d7b132/snap' || protected | False || schema | /v2/schemas/image || size | 41126400 || status | active || tags | || updated_at | 2017-11-28T19:25:37Z || virtual_size | None || visibility | public |+------------------+----------------------------------------------------------------------------------------------------------+
在node1节点上执行
rbd --pool images ls
[root@node1 ~]# rbd --pool images ls1039ef83-c618-4900-98b0-df61c3d7b132
通过控制台创建一个虚拟机
在node1节点上执行
rbd --pool vms ls
[root@node1 ~]# rbd --pool vms ls44b8eae7-7866-4b52-b2ad-9929d8dc3c3f_disk
—————————————————————————————————————————————————————————
你也可以试试连接云硬盘和虚拟机
- OpenStack+Ceph+热迁移+++六、测试是否运行正常
- 部署OpenStack+Ceph+热迁移架构图
- OpenStack+Ceph+热迁移+++一、前提条件
- OpenStack+Ceph+热迁移+++七、实现热迁移
- OpenStack+Ceph+热迁移+++五、配置Glance、Ceph、Nova
- OpenStack+Ceph+热迁移+++四、创建存储池
- ceph+configdrive+热迁移
- turnserver测试是否正常运行
- OpenStack+Ceph+热迁移+++二、准备一台单独的cinder节点
- OpenStack+Ceph+热迁移+++三、各节点解析与基本设置
- ceph存储 "ceph集群浅析六"Ceph与OpenStack
- “Ceph浅析”系列之六——Ceph与OpenStack
- “Ceph浅析”系列之六Ceph与OpenStack
- 基于Openstack的虚拟机热迁移
- openstack juno热迁移配置过程
- Openstack nova 热迁移绿色thread分析
- Openstack不支持LVM后端的热迁移
- openstack热迁移搭建NFS共享存储
- O(logN)时间复杂度内求整数的N次方以及矩阵的N次方
- extends继承中子类调用父类构造函数
- iOS开发UI篇—Quartz2D (八) 气球上升动画
- pku acm题目分类 (1)
- Python的模块
- OpenStack+Ceph+热迁移+++六、测试是否运行正常
- 学习笔记:信息检索(3) 词典及容错式检索
- shell脚本习题
- H5 布局tips
- 使用Renesas E1烧录RL78/G13(R5F100AA)芯片
- 《大型分布式网站架构设计与实践》
- [51Nod1676 无向图同构]无向图哈希
- 成为Android高级工程师看这里就够了
- 随手记-处理图片内存溢出