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.
Let us consider an example, assume mpath2 DGC,RAID 5 is old LUN and mpath7 DGC,VRAID is new LUN in the below output of "multipath -ll" command (We have shown here single paths to each LUN via a single port for convenience)
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]
Our objective here would be to copy data from mpath2 to mpath7. It is also important to make a note of output of the above command or at least the wwids associated with these mpaths. Additionally, take a backup of /var/lib/multipath/bindings as it defines bindings for each wwid.
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.
The transfer copy rate by default is set to 1Mb/s. This transfer rate can be adjusted by setting the iosize and ceiling value. Please do tuning as follows:
# stormigrate tune -iosize 128
Default is 64K, recommend to increase I/O transfer buffer rate to 128 for faster transfer rate.
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
I have set it to 100 MB other day, but I was getting around 25 MB/S, so do not be greedy to get higher transfer rate as it depends on various factors like I/O, network speed etc.

  • 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.
Create a volume_pairs file using vi or any text editor and add source first and then destination as shown below:
# 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
Data copying operations are processed in the kernel driver for each task comprised in the session. When all subsequent copy tasks have completed, session volumes continue to be mirrored for as long as the session remains in an activated session state.
  • 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
To list all sessions:
# stormigrate list
To deactivate the active session session1
# stormigrate deactivate -session session1
To do a clean up:
# 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.

You Might Also Like

0 comments

Contact Form

Name

Email *

Message *

Translate

Wikipedia

Search results