| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
|
| Hi, my company purchased a new storage array, and i need to migrate data from the old array to the new one. i'd like to know if there is a way to migrate the data online, with host-based mirroring. can i add a new volume or set of volumes to an existing volume group, perform a mirror and disconnect the old volumes without downtime? i have AIX 5.3 and HPUX 11.23 & 11.31 systems instructions will be very appreciated. thanks, yaron |
|
#2
|
| pomikister > > my company purchased a new storage array, and i need to migrate data > from the old array to the new one. > i'd like to know if there is a way to migrate the data online, with > host-based mirroring. > can i add a new volume or set of volumes to an existing volume group, > perform a mirror and disconnect the old volumes without downtime? > > i have *AIX 5.3 and HPUX 11.23 & 11.31 systems I've done it on Solaris, AIX and HPUX which their respective LVMs. Learn how to scan the device tree to create the device files after the SAN masking/zoning is done. devfsadm on Solaris, ioscan and insf on HPUX, I forget on AIX. Once new devices are in place use extendvg, vgextend, etc to add them to the groups. The two main ways to get the data moved that I tried are do the mirroring one logical volume at a time and move the lp/pp s in the volume group. Turns out on HPUX lvextend to mirror then lvreduce to unmirror ran twice as fast as relocating the lp/pp s. Yet on AIX doing the relocate was three times as fast and the mirror/unmirror. On Solaris the mirror/unmirror and vxevac took about the same time and vxevac is simpler. Removing the devices - My caution is never do more than 5 at a time and do a device scan (ioscan, etc) before pulling the next 5. It's possible to trigger a SCSI reset storm if you pull too many at once. If you made the mistake of booting from SAN this can cause a server hang, bummer. I used to have some loop scripts that I used for cut-n-paste when doing this. I just looked in my Yahoo archive and no luck finding them. |
|
#3
|
| pomikister > > instructions will be very appreciated. I found my old files on a backup CD-ROM. These are the HPUX ones that use mirroring. Note that they assume Symmetrix arrays ahd have embedded serial numbers that will need to be changed. hpux.directions -- Host level migration of EMC frames for HPUX. hpux.directions - This file. hpux.disks - Check for new provisioning. hpux.postprov - Build final tables. hpux.start - Build initial tables before provisioning. hpux.vgclean - Per volume group clean-up script. hpux.vgmove - Per volume group move script. hpux.vgprep - Per volume group internal support script, used by hpux.start and hpux.postprov Before starting anything: 1) Go through the scripts and check the PATH. Especially check where EMC's "inq" is installed. 2) Note the serial numbers of the frames involved and the names of the frames involved. Edit all of the "inq" calls to reflect the serial numbers and names. In the original, there are 4 frames named f8, f11, f13 and f14 referenced. Initialize the tables by running "ksh hpux.start". It will produce an "ioscan.$DATE.txt" for easy reference, "inq.$NAME.txt" for each frame's LUNs, "vg.list" for the list of volume groups, *.LVLIST for the list of logical volumes in each vloume group, *.NEWPRILIST for the new primary devices, *.NEWALTLIST for the new alternate paths, *.OLDPRILIST for the old primary devices and *.OLDAALTLIST for the old alternate paths. Also *.OLD*LIST.orig for later use. Look at inq.*.txt to see what devices come from what frame. Edit vg.list and remove any volume group that only has internal devices. Delete the tables for any of those volume groups. Edit *.OLD*LIST.orig to see if there are any new devices listed as old. Provision the new storage. ioscan ; insf -e Run "ksh hpux.disks" to see the new storage. Note the devices. By hand add the devices to each volume group. NOTE FOR HPUX! When a volume group is created with only single/regular LUNs, by default it can end up only taking more single LUNs. "vgdisplay -v /dev/$VG | more" and look for the Max PPs per PV column to check. This is the main reason devices need to be added by hand. Only add singles to VGs that can only handle singles. Feel free to add metas to groups that can take metas. It may be necessary to add only a few LUNs by hand if the number of physical volumes hits the max. If so the later scripts can be run a bit at a time. After provisioning run "ksh hpux.postprov" to build the new tables. It uses the *.OLD*LIST.orig files and hpux.vgprep, then rebuilds *.NEW*LIST to reflect the new storage. Inspect the *.NEW*LIST files to see if they are correct. Loop running the move on each volume group and the clean on each volume group. for i in ` cat vg.list ` ; do ksh hpux.vgmove $i ksh hpux.vgclean $i done Deprovision using the numbers in inq.*. The HPUX scripts loop through the logical volumes using lvextend -m 1 (oldlist) (newlist) rather than looping through the devices devices using pvmove (olddev) (newdev). When I benchmarked the two methods on a couple of N-class hosts the pvmove method took 8+ hours per meta, well over 10 times as long as the mirror/unmirror method. Also the man page for pvmove claims it conflicts with clustering. hpux.start -- #! /bin/ksh # # Bootstrap by recording the devices now existing. # /sbin/ioscan -fn > ioscan.fn.`date +%Y-%m-%d`.txt # # Find all EMC devices by frame. # /usr/local/adm/bin/inq -sid -sortsymm | grep 1169 | sort > inq.f8.txt /usr/local/adm/bin/inq -sid -sortsymm | grep 0300 | sort > inq.f11.txt /usr/local/adm/bin/inq -sid -sortsymm | grep 0404 | sort > inq.f13.txt /usr/local/adm/bin/inq -sid -sortsymm | grep 0247 | sort > inq.f15.txt # # Get the list of volume groups, trim vg00. # vgdisplay | grep "VG Name" | grep -v vg00 | awk ' { print $3 } ' | tr "/" " " | awk ' { print $2 } ' > vg.list # cat vg.list | while read i ; do # ksh hpux.vgprep ${i} # # Retain the list of old volumes beccause we will overwrite it when # we use the same hpux.vgprep script to find the new volumes. # cp ${i}.OLDPRILIST ${i}.OLDPRILIST.orig cp ${i}.OLDALTLIST ${i}.OLDALTLIST.orig # done # exit 0 hpux.disks -- #! /bin/ksh # # Bootstrap by recording the devices now existing. # /sbin/ioscan /sbin/insf -e # # Find all EMC devices by frame. # /usr/local/adm/bin/inq -sid -sortsymm | grep 1169 | sort > inq.f8.txt /usr/local/adm/bin/inq -sid -sortsymm | grep 0300 | sort > inq.f11.txt /usr/local/adm/bin/inq -sid -sortsymm | grep 0404 | sort > inq.f13.txt.new /usr/local/adm/bin/inq -sid -sortsymm | grep 0247 | sort > inq.f15.txt.new # echo New drives on f13 diff inq.f13.txt inq.f13.txt.new # echo New drives on f15 diff inq.f15.txt inq.f15.txt.new # exit 0 hpux.postprov -- #! /bin/ksh # # Bootstrap by recording the devices now existing. # ioscan insf -e /sbin/ioscan -fn > ioscan.fn.`date +%Y-%m-%d`.txt # # Find all EMC devices by frame. See the new ones. # /usr/local/adm/bin/inq -sid -sortsymm | grep 1169 | sort > inq.f8.txt /usr/local/adm/bin/inq -sid -sortsymm | grep 0300 | sort > inq.f11.txt /usr/local/adm/bin/inq -sid -sortsymm | grep 0404 | sort > inq.f13.txt /usr/local/adm/bin/inq -sid -sortsymm | grep 0247 | sort > inq.f15.txt # # No need to repeatedly get the list of volume groups, trim vg00. # # vgdisplay | grep "VG Name" | grep -v vg00 | awk ' { print $3 } ' | tr "/" " " | awk ' { print $2 } ' > vg.list # cat vg.list | while read i ; do # ksh hpux.vgprep ${i} # # Restore the list of old volumes beccause we just overwrote it. # cp ${i}.OLDPRILIST.orig ${i}.OLDPRILIST cp ${i}.OLDALTLIST.orig ${i}.OLDALTLIST comm -3 ${i}.OLDPRILIST ${i}.NEWPRILIST > wow cat wow | sed -e 's/ //' > ${i}.NEWPRILIST comm -3 ${i}.OLDALTLIST ${i}.NEWALTLIST > wow cat wow | sed -e 's/ //' > ${i}.NEWALTLIST # done # exit 0 hpux.vgmove -- #! /bin/ksh # cat ${1}.LVLIST | while read i ; do # echo lvchange -s n ${i} lvchange -s n ${i} # echo lvextend -m 1 ${i} ` cat ${1}.NEWPRILIST ` lvextend -m 1 ${i} ` cat ${1}.NEWPRILIST ` # echo lvreduce -m 0 ${i} ` cat ${1}.OLDPRILIST ${1}.OLDALTLIST ` lvreduce -m 0 ${i} ` cat ${1}.OLDPRILIST ${1}.OLDALTLIST ` # echo lvchange -s y ${i} lvchange -s y ${i} # done # exit 0 hpux.vgclean -- #! /bin/ksh # cat ${1}.OLDPRILIST ${1}.OLDALTLIST | while read i ; do # echo vgreduce /dev/${1} ${i} vgreduce /dev/${1} ${i} # done # exit 0 hpux.vgprep -- #! /bin/ksh # # Logical volumes # vgdisplay -v /dev/${1} | grep "LV Name" | awk ' { print $3 } ' > ${1}.LVLIST # # Old devices # vgdisplay -v /dev/${1} | grep "PV Name" | grep -v Alternate | awk ' { print $3 } ' > ${1}.OLDPRILIST # vgdisplay -v /dev/${1} | grep "PV Name" | grep Alternate | awk ' { print $3 } ' > ${1}.OLDALTLIST # # New devices # vgdisplay -v /dev/${1} | grep "PV Name" | grep -v Alternate | awk ' { print $3 } ' > ${1}.NEWPRILIST # vgdisplay -v /dev/${1} | grep "PV Name" | grep Alternate | awk ' { print $3 } ' > ${1}.NEWALTLIST # echo "Now edit" ${1}.NEW* ${1}.OLD* "to reflect which devices are old and which are old." # exit 0 |
|
#4
|
| pomikister > > my company purchased a new storage array, and i need to migrate data > from the old array to the new one. > i'd like to know if there is a way to migrate the data online, with > host-based mirroring. > can i add a new volume or set of volumes to an existing volume group, > perform a mirror and disconnect the old volumes without downtime? > > i have *AIX 5.3 and HPUX 11.23 & 11.31 systems > > instructions will be very appreciated. On Solaris using Veritas LVM, because all of the commands are so complex compared to AIX and HPUX, I use the "vxdiskadm" menu to add the new LUN into the volume grou, then "vxevac" a device at a time to the new devices, then "vxdiskadm" to remove the one devices and take them offline. The data transfer phase is slower than with mirroing, but not greatly so. I looked through the files on the CD-ROM and the commentary in the AIX versions still say HPUX. It's clear which OS I did first. Let me know if you want those files cut-n-paste also. |
|
#5
|
| On Jul 11, 6:28*pm, Doug Freyburger > pomikister > > > my company purchased a new storage array, and i need to migrate data > > from the old array to the new one. > > i'd like to know if there is a way to migrate the data online, with > > host-based mirroring. > > can i add a new volume or set of volumes to an existing volume group, > > perform a mirror and disconnect the old volumes without downtime? > > > i have *AIX 5.3 and HPUX 11.23 & 11.31 systems > > > instructions will be very appreciated. > > On Solaris using Veritas LVM, because all of the commands > are so complex compared to AIX and HPUX, I use the > "vxdiskadm" menu to add the new LUN into the volume grou, > then "vxevac" a device at a time to the new devices, then > "vxdiskadm" to remove the one devices and take them > offline. *The data transfer phase is slower than with mirroing, > but not greatly so. > > I looked through the files on the CD-ROM and the commentary > in the AIX versions still say HPUX. *It's clear which OS I did > first. *Let me know if you want those files cut-n-paste also. Hi, on AIX: - To discover the news disks cfgmgr emc_cfgmgr (if you are using EMC SAN, Symmetrix, Clarion is another commend I think) dlmccgfmgr (if you are using Hitachi SAN) - To review the disks lsdev -Ccdisk - To add the new disks to the current vg to mirror to the new ones first extendvg NAMEVG hdiskX extendvg NAMEVG hdiskY - To mirror the VG with 3 copies (2 old disks and 1 new disks) mirrorvg -c 3 NAMEVG hdiskX - To unmirror the 2 old disks and remove disks from volume group NAMEVG unmirrorvg NAMEVG hdiskA unmirrorvg NAMEVG hdiskB reducevg NAMEVG hdiskA reducevg NAMEVG hdiskB - To mirror two copies of the new disks mirrorvg -c 2 NAMEVG hdiskY - Delete from ODM the old disks rmdev -dl hdiskA rmdev -dl hdiskB - Remove also the controllers of the old hdisks You have to repeat these instructions for every volume group that you have in your system, except the cfgmgr commands. Regards!!!! |
![]() |
| Thread Tools | |
| Display Modes | |