openstack集群数据迁移

[root@node2 home]# docker exec ceph_mon rbd -p volumes export volume-54c2aea0-8863-4595-b709-39b51e3d496c@snapshot-86537a28-5c74-4f3a-868e-6d9bcb6f5b28 /etc/ceph/uemdisk.img

 

[root@node2 home]# export IMAGE_UUID=$(uuidgen)

[root@node2 home]# echo $IMAGE_UUID

15c3014c-a901-4e04-957e-c1f3b9dc1e61

[root@node2 home]# export IMAGE_FILE=/home/uemdisk.img

[root@node2 home]# rbd -p images --image-format 2 import $IMAGE_FILE $IMAGE_UUID

rbd: --pool is deprecated for import, use --dest-pool

Importing image: 100% complete...

 

[root@node2 home]# rbd -p images info $IMAGE_UUID

rbd image '15c3014c-a901-4e04-957e-c1f3b9dc1e61':

        size 500 GB in 128000 objects

        order 22 (4096 kB objects)

        block_name_prefix: rbd_data.32318674b0dc51

        format: 2

        features: layering, exclusive-lock, object-map, fast-diff, deep-flatten

        flags:

        create_timestamp: Mon Jun 25 23:11:51 2018

[root@node2 home]# rbd -p images snap ls $IMAGE_UUID

[root@node2 home]# rbd -p images snap create  $IMAGE_UUID@snap

rbd -p images snap protect  $IMAGE_UUID@snap

 

[root@node1 ~]# glance --os-image-api-version 1  image-create --name uemdisk --store rbd --disk-format raw --container-format bare --location rbd://3b7ee8a3-34a2-4556-a0d1-d2fc8cc2e1be/images/15c3014c-a901-4e04-957e-c1f3b9dc1e61/snap   --progress

+------------------+--------------------------------------+

| Property         | Value                                |

+------------------+--------------------------------------+

| checksum         | None                                 |

| container_format | bare                                 |

| created_at       | 2018-06-25T15:50:17.000000           |

| deleted          | False                                |

| deleted_at       | None                                 |

| disk_format      | raw                                  |

| id               | 075c9544-9e4c-4eed-a8f3-92a7041365be |

| is_public        | False                                |

| min_disk         | 0                                    |

| min_ram          | 0                                    |

| name             | uemdisk                              |

| owner            | c9524f73ace3495491245a1484f25536     |

| protected        | False                                |

| size             | 536870912000                         |

| status           | active                               |

| updated_at       | 2018-06-25T15:50:18.000000           |

| virtual_size     | None                                 |

+-

hofman   2018-06-28 09:24:31 评论:0   阅读:8   引用:0

发表评论>>

署名发表(评论可管理,不必输入下面的姓名)

姓名:

主题:

内容: 最少15个,最长1000个字符

验证码: (如不清楚,请刷新)

2003-2007@copyright