Migrating of virtual instance from Ganeti DRBD to OpenStack/Ganeti via Ceph

On ganeti, shutdown the instance and activate its disks:

1
2
3
4
# gnt-instance shutdown 0030
Waiting for job 187265 for 0030 ...
# gnt-instance activate-disks 0030
snode-iu.gnt:disk/0:/dev/drbd20

On an OpenStack Havana installation using a Ceph cinder backend, create a volume with the same size:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# cinder create --volume-type ovh --display-name 0030 100
+---------------------+--------------------------------------+
|       Property      |                Value                 |
+---------------------+--------------------------------------+
|     attachments     |                  []                  |
|  availability_zone  |                 nova                 |
|       bootable      |                false                 |
|      created_at     |      2013-11-12T13:00:39.614541      |
| display_description |                 None                 |
|     display_name    |                 0030                 |
|          id         | 3ec2035e-ff76-43a9-bbb3-6c003c1c0e16 |
|       metadata      |                  {}                  |
|         size        |                  10                  |
|     snapshot_id     |                 None                 |
|     source_volid    |                 None                 |
|        status       |               creating               |
|     volume_type     |                 ovh                  |
+---------------------+--------------------------------------+

# rbd --pool ovh info volume-3ec2035e-ff76-43a9-bbb3-6c003c1c0e16
 >>>       <strong>format: 2</strong>
 >>>       features: layering

On a host connected to the Ceph cluster and running a linux-kernel > 3.8 ( because of the format: 2 above ), map to a bloc device with:

1
2
3
4
# rbd map --pool ovh volume-3ec2035e-ff76-43a9-bbb3-6c003c1c0e16
# rbd showmapped
id pool image                                       snap device
1  ovh  volume-3ec2035e-ff76-43a9-bbb3-6c003c1c0e16 -    /dev/rbd1

Copy the ganeti volume with:

1
2
# pv < /dev/drbd10 | ssh bm0014 dd of=/dev/rbd1
2,29GB 0:09:14 [4,23MB/s] [==========================>      ] 22% ETA 0:31:09

and unmap the device when it completes.

The volume is ready to boot.

Scroll to top