How to perform LUN Migration using EMC Open Migrator in Linux ?
10:00 PM- Download Latest version of Open Migrator for Linux (EMCom.LINUX_3.12.0.12.tar at the time of writing) from EMC site (Storage team would be able to download and provide you as it requires to login to EMC site or one should register at their site https://powerlink.emc.com) and upload it to server from where migration LUN migration has to be performed.
- Once untarred, you will find a set of rpms each for each linux make and architecture, assuming server make is RHEL 5 and architecture x86_64. we will install EMC open migrator as follows:
# rpm -ivh EMCom-V3. 12.0 . 12 -rhel- 5 -x86_64-as.rpm # rpm -qa |grep -i emc EMCom-V3. 12.0 . 12 - 1 |
- You should now be able to find stormigrate utility which will be used for migration
# which stormigrate /usr/sbin/stormigrate |
- Before starting with LUN migration, ensure that new LUNs are provisioned and presented to the server. Identify the old and new mpaths carefully. This is most important step as we are performing disk level migration, if not identified correctly, it can result in loss of data.
mpath2 (3600601606f371a008ee411882fcce111) DGC,RAID 5 [size=350G][features= 1 queue_if_no_path][hwhandler= 1 emc][rw] \_ round-robin 0 [prio= 0 ][active] \_ 3 : 0 : 0 : 1 sdc 8 : 32 [active][ready] mpath7 (3600601606f403100c6be74a522dde111) DGC,VRAID [size=350G][features= 1 queue_if_no_path][hwhandler= 1 emc][rw] \_ round-robin 0 [prio= 1 ][active] \_ 4 : 0 : 0 : 0 sdf 8 : 80 [active][ready] |
Let us assume mpath2 has Oracle ASM/raw data.
- What is EMC Open Migrator? EMC Open migrator is an online tool to perform online data migration and comparison, where data copying between storage arrays is performed from the host/server. It is implemented as a host based kernel driver and command line interface (CLI) and is used to migrate data from source to target volumes with only a single disruption to the server and applications.
- Per EMC Documentation, during migration the source volume can be available for I/O to production applications. The target volume is set to read write disabled. But, while we performed the migration with Oracle running, we noticed some inconsistencies and it was not happy with the state of the ASM diskgroup. So, Oracle team recommended us to have Oracle stopped before the migration is performed. Have a DBA stop Oracle or you can stop with following command.
# crsctl stop cluster -all |
- The Open Migrator/LM command (stormigrate) allows you to perform copy, control and comparison operations between between volumes that are accessible to the production host within a session. We recommend to refer to documentation and man pages to explore all options available with this command. Before we start with actual migration, let us do some tuning that increase the transfer rate.
# stormigrate tune -iosize 128 |
You can set the operating bandwidth (in megabytes) for target devices by using the -ceiling option. Setting the bandwidth allows the software to throttle all data transfer operations so that the aggregate bandwidth remains at or below the set ceiling value. Values can range from 1 to 10,000 megabytes per second,depending on your system, with the default value being 1 MB. To set the operating bandwidth for all sessions to 50 MB, type:
# stormigrate tune -ceiling 50 |
- Data migration and comparison operations that use the stormigrate command are performed from a production host and are completed in sessions. Volume pairs consisting of source and target devices can be located on the same array or separate arrays. A device file can be used to specify a list of the volume pairs for the operation at the time the session is created. The production host for the kernel driver must have access to the volumes for the session, and is responsible for controlling data migration between the volume pairs. A session is first defined by using the "stormigrate create" command and specifying a session name. An additional option parameter (-file) can be used to define volume pairs by attaching as separate device file to the create command.
# cat volume_pairs /dev/mapper/mpath2 /dev/mapper/mpath7 |
- Once done, create a session for copying data:
# stormigrate create -session session1 -file volume_pairs |
- Before you proceed with activating the session as described in next
step, please check the tuning values viz I/O Size and Ceiling for final
confirmation, lest you may end up getting default of 1 MB/S which is
default.
# stormigrate tune
System wide Open Migrator Tune Parameters
Parameter Value
----------------------------------- --------
I/O Size
128
kb
Ceiling
50
MB/s
Mover threads
16
Checkpoint Size
256
MB
Mirror I/O Throttle Performance Ratio
200
%
Mirror I/O Throttle Recovery Action Terminate
- Next step is to activate the session. The "stormigrate activate" command is used to activate a session. When a session is activated, it becomes established in the kernel driver under the defined session name.
# stormigrate activate -session session1 |
- To begin volume copying for an activated session, use the "stormigrate copy" command. The copy command begins the transfer of data between the source and target devices associated with the session. The session must be activated before copying can begin. To begin transferring data from the source to target devices, use the following example:
# stormigrate copy -session session1 |
- You can check the session status for copy completion completion by using the stormigrate show, query or verify commands. To check progress of copy, use following command:
# stormigrate query -session session1 -summary |
- Once copy is 100%complete, you are free to do clean up of sessions
# stormigrate list |
# stormigrate deactivate -session session1 |
# stormigrate cleanup |
- Oracle team needs mpaths be same after copy is complete, that is to say, new LUNs should use old mpaths in order to maintain binding. So, the next step is to interchange wwids. This is done in /var/lib/multipath/bindings, so here in this example you will change mpath2 wwid with mpath 7 and vice versa. Do a reboot and then check "multipath -ll", you should find wwid interchanged between mpath2 and mpath7. Hand it over to DBA to check data consistency.
mpath2 (3600601606f403100c6be74a522dde111) DGC,VRAID [size=350G][features= 1 queue_if_no_path][hwhandler= 1 emc][rw] \_ round-robin 0 [prio= 1 ][active] \_ 4 : 0 : 0 : 0 sdf 8 : 80 [active][ready] mpath7 (3600601606f371a008ee411882fcce111) DGC,RAID 5 [size=350G][features= 1 queue_if_no_path][hwhandler= 1 emc][rw] \_ round-robin 0 [prio= 0 ][active] \_ 3 : 0 : 0 : 1 sdc 8 : 32 [active][ready] |
- Once DBA has confirmed all good, you can ask Storage to disconnect the old LUNs.
0 comments