Preparing for default live migration
Prepare the default live migration process for RADOS Block Device (RBD) images within the same IBM Storage Ceph cluster.
Before you begin
Before you begin, make sure that you have the following prerequisites in place:
- A running IBM Storage Ceph.
- Two block device pools.
- One block device image.
About this task
The rbd migration prepare command accepts all the same layout options as the
rbd create command. The rbd create command allows changes to
the on-disk layout of the immutable image. If you only want to change the on-disk layout and want to
keep the original image name, skip the
migration_target argument. All clients using
the source image must be stopped before preparing a live migration. The prepare
step will fail if it finds any running clients with the image open in read/write mode. You can
restart the clients using the new target image once the prepare step is
completed.Note: You cannot restart the clients using the source image as it results in a
failure.
Important: Cloned images are implicitly flattened during live importing (using the
--import-only and these images are disassociated from any parent chain in the
source cluster when migrated to another Ceph cluster.
Procedure
What to do next
- Check the current state of the live migration
process.
rbd status TARGET_POOL_NAME/SOURCE_IMAGE_NAMEFor example,[ceph: root@rbd-client /]# rbd status targetpool1/sourceimage1 Watchers: none Migration: source: sourcepool1/sourceimage1 (adb429cb769a) destination: targetpool2/testimage1 (add299966c63) state: prepared
Important: During the migration process, the source image is moved into the RBD trash to prevent mistaken usage.For example:-
[ceph: root@rbd-client /]# rbd info sourceimage1 rbd: error opening image sourceimage1: (2) No such file or directory
-
[ceph: root@rbd-client /]# rbd trash ls --all sourcepool1 adb429cb769a sourceimage1
-
- Run the live migration. For more information, see Running the live migration.