4.9 Validación de la propuesta
4.9.2 Análisis costo beneficio
To perform online data migration when the HDLM is present, follow these steps.
NOTE: A maintenance window is required to complete an online data migration with removal of the HDLM.
NOTE: Before migrating a SAN-based Oracle RAC cluster using the HP 3PAR Online Import Utility, it is critical to understand whether and how the Oracle RAC cluster registry (CRS), voting disks, and data disks are distributed across the source arrays, and to plan migrations accordingly. Since the HP 3PAR Online Import Utility is currently designed to execute a migration exclusively from one source array at a time, multiple migrations must be executed serially in order to transfer all the Oracle-based disks from multiple source arrays to a single destination HP 3PAR StoreServ Storage. This use-case scenario is described in detail in“Appendix E: Use Case: Data Migration for an Oracle RAC Cluster” (page 112).
At the time of this publication, the coexistence or distribution of Oracle RAC disks is supported across the HP 3PAR StoreServ Storage and HDS Storage arrays listed in HP SPOCK:
HP SPOCK(http://www.hp.com/storage/spock)
NOTE: For ASM-based Oracle RAC configurations, the persistent device names that are used by the ASMlib to label ASM disks must be modified. With the HDLM, the devices get a
/dev/sddlm*name, whereas with Linux native device-mapper multipath software, the devices get a/dev/mapper/mpath*name. To ascertain whether the current ASMlib is using the HDLM-based names, issue the following command:
# oracleasm querydisk -p /dev/sddlm*
HDLM-based-device names are being used if the output is similar to the following example: Device "/dev/sddlmaa1" is marked as an ASM disk with the label "ASM_DISK01" 1. Zone the host to the destination HP 3PAR StoreServ Storage system to establish communication.
2. Uninstall the HDLM by following these steps:
CAUTION: The HDLM must not be present during the migration process. The native Linux device-mapper multipath must be managing the paths.
Stop all applications before removing the HDLM. For cluster configurations, also stop the cluster services and the cluster. Applications should be restarted after migration has started.
a. Close all applications on the host.
NOTE: Stop the Oracle RAC database services by issuing the following command on the primary node:
# $ORACLE_HOME/bin/srvctl stop database -d <DB_name> -o immediate
b. Unmount the application file systems, bring offline any raw devices (if configured), and deactivate any volume groups where Logical Volume Manager is in use.
c. For a cluster, stop the cluster services, and then stop the cluster.
NOTE: For Oracle RAC, stop the cluster services and the ASM by performing the following steps:
1) Issue the following command on the primary node: # $GRID_HOME/bin/crsctl stop cluster -all
2) To confirm that the cluster services have stopped, issue the following command on any of the nodes:
# $GRID_HOME/crs_stat -t The expected output is as follows:
CRS-0184: Cannot communicate with CRS Daemon
3) Stop the ASM by issuing the following command on each node: # /etc/init.d/oracleasm stop
d. Uninstall the HDLM from the host, following HDS documentation instructions.
3. Configure the native device-mapper multipath on the host.
• In a cluster environment, update themultipath.conffile on each of the cluster nodes.
NOTE: For Oracle RAC, multipath should be configured in accordance with Oracle recommendations.
Edit the/etc/multipath.conf file to map the device WWNs to a persistent device alias. This alias will be used by the ASMlib to label ASM disks for the Oracle RAC application. The/etc/multipath.conffiles should be edited identically on each of the cluster nodes. Make a note of the device type (for instance, ASM data disk, OCR disk, or FRA disk) while naming the disks, and keep them consistent with the way they were configured when the HDLM was enabled. For example:
multipath { wwid 36006016087202e00029a62ca76d3e411 alias <DEVICE_ALIAS>}
The value foralias must match the label used by the HDLM for that device.
NOTE: For ESXi 5.5, set the multipath load balance policy toround-robinfor all the devices on all ESX cluster nodes.
To verify newly discovered paths using ESXi 5.5, issue theesxcfg-mpath -bcommand on the ESX node, or use the vCenter console.
For HP-UX 11i v3, issue theioscan -m luncommand to verify newly discovered paths.
• If the HP 3PAR LUNs are not whitelisted, register the HP 3PAR LUN types with native device-mapper multipath by whitelisting HP 3PAR-specific information. (In the/etc/ multipath.conffile, the vendor is3PARdataand the product isVV.) See the HP 3PAR StoreServ product documentation on the Linux host configuration.
NOTE: 3PARdata andVVare case sensitive.
If the HP 3PAR LUNs are whitelisted, start the native device-mapper multipath.
Example 18 Starting the native device-mapper multipath # /etc/init.d/multipathd restart
ok
Stopping multipathd daemon: [ OK ] Starting multipathd daemon: [ OK ]
Example 19 Rescanning HBAs and listing the updated multipath mapping for RHEL 5.x and RHEL 6.x # ls /sys/class/fc_host host4 host5 # echo "1" > /sys/class/fc_host/host4/issue_lip # echo "1" > /sys/class/fc_host/host5/issue_lip # echo "- - -" > /sys/class/scsi_host/host4/scan # echo "- - -" > /sys/class/scsi_host/host5/scan # multipath -ll
mpath2 (360060e80045be50000005be500001249) dm-3 HITACHI,OPEN-8 [size=6.8G][features=1 queue_if_no_path][hwhandler=0][rw] \_ round-robin 0 [prio=1][active]
\_ 4:0:0:1 sdb 8:16 [active][ready] \_ 5:0:1:1 sdh 8:112 [active][ready]
mpath1 (360060e80045be50000005be500001248) dm-2 HITACHI,OPEN-8 [size=6.8G][features=1 queue_if_no_path][hwhandler=0][rw] \_ round-robin 0 [prio=1][active]
\_ 4:0:0:0 sda 8:0 [active][ready] \_ 5:0:1:0 sdg 8:96 [active][ready]
4. If the HDLM was uninstalled instep 2, and after multipathing has been configured again on the host, follow these steps:
a. If the HDLM was removed, modify/etc/fstabfor new mount points. Base the new
mount points on discovered LUNs, if the migrating LUN alias was not created in the
multipath.conffile. Remount file systems.
IMPORTANT: In Linux, the HDLM devices are presented as/dev/sddlm*(for example,
/dev/sddlmaa1). Removal of the HDLM in Linux also removes this device type. This changes when the Linux native device-mapper multipath assumes management of these devices. For example, before removal of the HDLM, consider combining/dev/sdband
/dev/sdcinto/dev/sddlmaa1. After removal of the HDLM,/dev/sdband/dev/ sdcwould be represented by/dev/mpathx. This represents a challenge for customers who use direct device referencing in/etc/fstabor other custom scripts. HP generally recommends thatfstabmounts be performed usingblkid/uuid; however, this is not always employed. In that case, consider mounting/dev/sddlmaa1as/var. After removal of the HDLM,/varwould not automatically mount to/dev/mpathx.
b. Where applicable, make the appropriate changes to the Logical Volume Manager configuration.
c. If this is for a cluster configuration, initialize the cluster and start cluster services.
NOTE: For Oracle RAC, edit the /etc/sysconfig/oracleasmfile on both nodes in order to redirect the ASMlib to use the newly defined persistent device names from the
etc/multipath.conffile, which will replace the HDLM-based/dev/sddlm*names that were being used to label the ASM disks.
1) In the/etc/sysconfigfile, change the following:
# ORACLEASM_SCANORDER: Matching patterns to order disk scanning ORACLEASM_SCANORDER=""
# ORACLEASM_SCANEXCLUDE: Matching patterns to exclude disks from scan ORACLEASM_SCANEXCLUDE=""
to:
# ORACLEASM_SCANORDER: Matching patterns to order disk scanning ORACLEASM_SCANORDER="dm"
# ORACLEASM_SCANEXCLUDE: Matching patterns to exclude disks from scan ORACLEASM_SCANEXCLUDE="sddlm"
2) Reset theoracleasmservices by issuing the following commands on all cluster nodes, beginning with the primary node:
# /etc/init.d/oracleasm start # oracleasm scandisks
# oracleasm listdisks
3) Verify that all ASM disks are visible from all nodes.
Also verify that the ASM disk labels are now using the Linux native device-mapper multipath-generated names by issuing the following command:
# oracleasm querydisk -p <ASM_label>
The output should be similar to the following example for all configured ASM disks:
Device <DEVICE_ALIAS> is marked as an ASM disk with the label "ASM_DISK_*"
4) Restart the Oracle RAC cluster and database services by issuing the following command on the primary node:
# $GRID_HOME/bin/crsctl start cluster -all
# $ORACLE_HOME/bin/srvctl start database -d <DB_name>
5) Verify that all cluster services have been restarted by issuing the following commands on all nodes:
# $GRID_HOME/bin/crs_stat —t
# $GRID_HOME/bin/crsctl stat res —t —init
d. Start applications.
5. RHEL 5.x or RHEL 6.x: Using the HP 3PAR Online Import Utility, issue thecreatemigration
command with the-migtype onlineoption.
Optionally, migrations with consistency groups are also supported, using the
-allvolumesincg or-cgvolmap parameters.
NOTE: For Oracle RAC, you must issue thecreatemigrationcommand using the
-allvolumesincg parameter.
Example 20 Usingcreatemigrationwith -migtype online
# createmigration -sourceuid xxxxxxxxxxxxxxxx -srchost "X7DBU-02-IG" -destcpg testcpg -destprov full -migtype online -persona “RHEL_5_6”
# SUCCESS: Migration job submitted successfully. Please check status/details using showmigration command. Migration id: 1411673030253
Example 21 Usingcreatemigrationwith-migtype onlinefor RHEL 5.x or RHEL 6.x
# createmigration -sourceuid xxxxx -srchost "X7DBU-02-IG" -destcpg testcpg -destprov full -migtype online —persona “RHEL_5_6”
# SUCCESS: Migration job submitted successfully. Please check status/details using showmigration command. Migration id: 1411673030253
For Oracle RAC: Using the HP 3PAR Online Import Utility, issue thecreatemigration
command with the-migtype onlineand-allvolumesincgparameters.
Example 22 Usingcreatemigrationwith-migtype onlinefor Oracle RAC
# createmigration -sourceuid xxxxx -srchost "x8dtuf-01" -allvolumesincg -migtype online -destcpg testcpg -destprov full -persona "RHEL_5_6"
This step admits LUNs presented to the HDS Storage system and exports them to the HP 3PAR host created on the HDS Storage system.
NOTE: Thecreatemigration command may take several minutes to complete.
TIP: Make a note of the migration ID, as it will be used in commands to track migration progress.
6. Issue theshowmigrationcommand to verify that the data migration task preparation has completed successfully. This may take some time. Upon successful creation of the
createmigrationtask, theSTATUScolumn in theshowmigrationcommand output will indicatepreparationcomplete(100%). When this status is indicated, continue to the next step.
Example 23 Issuing theshowmigrationcommand
# showmigration
MIGRATIONID TYPE SOURCE_NAME DESTINATION_NAME START_TIME
END_TIME STATUS(PROGRESS)(MESSAGE)
1411673030253 online USP_V.48748 3par_7200_DCA_01 Thu Sep 25 15:
23:50 EDT 2014 -NA- preparationcomplete(100%)(-NA-)
7. Using the HP 3PAR Management Console, verify that the host whose LUNs are under migration has paths to as many HP 3PAR controller nodes as are zoned in the SAN (seeFigure 9 (page 49)). This number of paths is listed in theNode ID(s)column. The path details are in theHost Detailspane.
Figure 9 HP 3PAR Management Console—Host Details
8. Update path configuration on the host by rescanning all HBAs and issuing themultipath -llcommand to verify the newly discovered paths. Multipath now recognizes extra paths to the HP 3PAR StoreServ Storage, but all paths are still managed as source array devices.
NOTE: With ESXi 5.5 and HP-UX 11i v3, HBA rescanning verifies new paths on the destination storage system.
Example 24 Rescanning HBAs and listing the updated multipath mapping with RHEL 5.x # ls /sys/class/fc_host host4 host5 # echo "1" > /sys/class/fc_host/host4/issue_lip # echo "- - -" > /sys/class/scsi_host/host5/scan # echo "1" > /sys/class/fc_host/host4/issue_lip # echo "- - -" > /sys/class/scsi_host/host5/scan # multipath -ll
mpath2 (360060e80045be50000005be500001249) dm-3 HITACHI,OPEN-8 [size=6.8G][features=1 queue_if_no_path][hwhandler=0][rw] \_ round-robin 0 [prio=1][active] \_ 4:0:0:1 sdb 8:16 [active][ready] \_ 4:0:4:1 sdf 8:80 [active][ready] \_ 5:0:1:1 sdh 8:112 [active][ready] \_ 5:0:2:1 sdj 8:144 [active][ready]
mpath1 (360060e80045be50000005be500001248) dm-2 HITACHI,OPEN-8 [size=6.8G][features=1 queue_if_no_path][hwhandler=0][rw] \_ round-robin 0 [prio=1][active] \_ 4:0:0:0 sda 8:0 [active][ready] \_ 4:0:4:0 sde 8:64 [active][ready] \_ 5:0:1:0 sdg 8:96 [active][ready] \_ 5:0:2:0 sdi 8:128 [active][ready]
9. Delete the migrating LUN paths pertaining to the source array. For details about identifying and deleting LUN paths, see“Appendix B: Identifying and Deleting Source Array LUN Paths” (page 105).
10. Unzone the host from the source array, if applicable.
Example 25 Output after unzoning the host from the source array with RHEL 5.x # multipath -ll mpath2(360060e80045be50000005be500001249) dm-3 3PARdata,VV [size=6.8G][features=1 queue_if_no_path][hwhandler=0][rw] \_ round-robin 0 [prio=1][active] \_ 4:0:0:1 sdb 8:16 [active][ready] \_ 5:0:1:1 sdh 8:112 [active][ready] mpath1(360060e80045be50000005be500001248) dm-2 3PARdata,VV [size=6.8G][features=1 queue_if_no_path][hwhandler=0][rw] \_ round-robin 0 [prio=1][active] \_ 4:0:0:0 sda 8:0 [active][ready] \_ 5:0:1:0 sdg 8:96 [active][ready]
11. Start the migration by using the HP 3PAR Online Import Utilitystartmigrationcommand.
Example 26 Starting migration by usingstartmigration # startmigration -migrationid 1411673030253 # SUCCESS: Data transfer started successfully.
NOTE: The-migrationid(in the example above,1411673030253) will have been assigned by thecreatemigrationcommand.
TIP: TheSTATUScolumn in the showmigrationcommand output will indicatesuccess
when all LDEVs have been migrated successfully.
Example 27showmigrationcommand showing successful migration # showmigration -migrationid 1411673030253
MIGRATION_ID TYPE SOURCE_NAME DESTINATION_NAME
START_TIME END_TIME STATUS(PROGRESS)(MESSAGE)
1411673030253 online USP_V.48748 3par_7200_DCB_01
Fri Apr 04 16:38:24 EDT 2014 -NA- success(-NA-)(-NA-)