Preparing import-only migration
You can initiate the import-only live migration process by running the rbd migration prepare command with the --import-only flag and either the --source-spec or --source-spec-path options. The import-only process is implemented by passing a JSON document that describes how to access the source image data directly on the command line or from a file.
Before you begin
- A running IBM Storage Ceph cluster.
- A bucket and an S3 object are created.
Procedure
What to do next
- Check the current state of the import-only live migration
process.
rbd status TARGET_POOL_NAME/SOURCE_IMAGE_NAMEFor example,[ceph: root@rbd-client /]# rbd status targetpool1/sourceimage1 Watchers: none Migration: source: {"stream":{"access_key":"RLJOCP6345BGB38YQXI5","secret_key":"oahWRB2ote2rnLy4dojYjDrsvaBADriDDgtSfk6o","type":"s3","url":"http://10.74.253.18:80/testbucket1/image.raw"},"type":"raw"} destination: targetpool1/sourceimage1 (b13865345e66) state: preparedThe following example shows migrating data from Ceph clusterc1to Ceph clusterc2:[ceph: root@rbd-client /]# cat /tmp/native_spec { "cluster_name": "c1", "type": "native", "pool_name": "pool1", "image_name": "image1", "snap_name": "snap1" } ceph: root@rbd-client /]# rbd migration prepare --import-only --source-spec-path /tmp/native_spec c2pool1/c2image1 --cluster c2 ceph: root@rbd-client /]# rbd migration execute c2pool1/c2image1 --cluster c2 Image migration: 100% complete...done. ceph: root@rbd-client /]# rbd migration commit c2pool1/c2image1 --cluster c2 Commit image migration: 100% complete...done. - Run the live migration. For more information, see Running the live migration.