从图像中截取快照时遇到困难。我正在使用带有环回存储的 cinder-9 charm:
# losetup -a
/dev/loop0: [0801]:2232155 (/var/lib/cinder/volumes/vol1.img)
# pvdisplay
--- Physical volume ---
PV Name /dev/loop0
VG Name cinder-volumes
PV Size 5.00 GiB / not usable 4.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 1279
Free PE 1023
Allocated PE 256
PV UUID hUZybu-S6Vr-Gx1E-MtHo-72wn-oW1v-TSh0ny
# vgdisplay
--- Volume group ---
VG Name cinder-volumes
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 5.00 GiB
PE Size 4.00 MiB
Total PE 1279
Alloc PE / Size 256 / 1.00 GiB
Free PE / Size 1023 / 4.00 GiB
VG UUID LRqwVp-xibZ-W9TC-XG5q-7ZgK-qiOW-dl5VeF
在 charm gui 中,“block-device”菜单有以下条目:
/var/lib/cinder/volumes/vol1.img|5G
类似地,“volume-group”指定:
cinder-volumes
关闭虚拟机后 - TrustyGstrm:
# nova list
+--------------------------------------+-------------+---------+------------+-------------+--------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------------+---------+------------+-------------+--------------------------------+
| 2bd319fb-b6dd-4541-a595-64ee85d5bb70 | TrustyGstrm | SHUTOFF | - | Shutdown | priv2=10.10.200.4, 10.0.200.52 |
| a43735cb-8368-4202-8425-cb8c8a66ad96 | t1 | ACTIVE | - | Running | priv2=10.10.200.2, 10.0.200.51 |
+--------------------------------------+-------------+---------+------------+-------------+--------------------------------+
# cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| 0f60862e-258d-417c-979e-e5e3e3cde516 | available | None | 1 | None | false | |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
启动快照后,它卡在了 25%:
# nova image-create --poll TrustyGstrm TrustyGstrmSn
Server snapshotting... 25% complete
我在日志文件中看不到任何重要的内容:
# tail -f /var/log/cinder/cinder-volume.log
2014-12-03 20:09:35.160 6236 INFO cinder.volume.manager [-] Updating volume status
2014-12-03 20:09:35.278 6236 INFO cinder.volume.manager [-] Updating volume replication status.
2014-12-03 20:10:35.166 6236 INFO cinder.volume.manager [-] Updating volume status
2014-12-03 20:10:35.292 6236 INFO cinder.volume.manager [-] Updating volume replication status.
2014-12-03 20:11:35.173 6236 INFO cinder.volume.manager [-] Updating volume status
2014-12-03 20:11:35.294 6236 INFO cinder.volume.manager [-] Updating volume replication
服务似乎已启动:
# cinder service-list
+------------------+----------------------+------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+----------------------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler | cinder | nova | enabled | up | 2014-12-03T20:21:36.000000 | None |
| cinder-scheduler | juju-machine-4-lxc-0 | nova | enabled | down | 2014-11-23T09:08:47.000000 | None |
| cinder-volume | cinder | nova | enabled | up | 2014-12-03T20:21:36.000000 | None |
| cinder-volume | juju-machine-4-lxc-0 | nova | enabled | down | 2014-11-23T09:08:49.000000 | None |
+------------------+----------------------+------+---------+-------+----------------------------+-----------------+
(juju-machine-4-lxc-0,是一台退役的机器。我不知道如何处理它。)
有什么想法吗?
编辑 1:
这总是让我感到困惑!确保您的环回存储大小大于您的风味磁盘大小!(最好有警告)