Mirroring Disk to Migrate Data from an Old Storage Array to a New Array using VxVM in HP-UX

Mirroring Disk to Migrate Data from an Old Storage Array to a New Array using VxVM in HP-UX

Basic Steps for Luns Migration

There was some reasons why the migration need to be done. Some of them was issues related to the storage that triggered on monitoring tool or from the OS itself. Below is the example of the errors captured referring to the storage issues:

node :home/userid$ grep -i sync /var/adm/syslog/syslog.log|tail

Jul  5 00:56:22 node vmunix: Asynchronous write failed on LUN (dev=0x1000030)

Jul  5 09:05:51 node vmunix: Asynchronous write failed on LUN (dev=0x100000f)

Jul  6 16:43:58 node vmunix: Asynchronous write failed on LUN (dev=0x1000030)

Jul  6 20:26:57 node vmunix: Asynchronous write failed on LUN (dev=0x1000030)

Jul  7 04:04:35 node vmunix: Asynchronous write failed on LUN (dev=0x1000030)

Jul  7 11:47:17 node vmunix: Asynchronous write failed on LUN (dev=0x1000030)

node :home/userid$

 

Below is the basic migration steps no matter what is the software or utility that manage the volume such as LVM or VxVM :

1.Create LUNs on the new disk array
2.Present them to the HP-UX server
3.Add the LUNs into the appropriate volume groups
4.Using LVM mirroring to mirror the data from the current LUNs to the new LUNs
5.Verify that the data has been successfully mirrored
6.Reduce the mirrors from the old LUNs
7.Reduce the old LUNs out of the VG
8.Repeat as needed for each VG

For steps no 1, it will normally be handled by storage team and it will be allocated from the storage level.

 

2.Present them to the HP-UX server

We have to scan I/O system for new LUNs using below commands:

# ioscan -fC disk

Sample of the output for above will be as shown below:

Node:home/userid$ ioscan -funC disk
Class I H/W Path Driver S/W State H/W Type Description
==================================================================

disk 311 0/0/0/5/0/0/2.1.54.0.0.3.1 sdisk CLAIMED DEVICE 3PARdataVV
/dev/dsk/c11t3d1 /dev/rdsk/c11t3d1

Install special device files and enable VxVM configuration daemon:

# insf -vC disk

# vxdctl enable

Initialize new added disk so it can be added in the disk group:

/opt/VRTS/bin/vxdisksetup -i c11t3d1

 

3.Add the LUNs into the appropriate volume groups

Associate newdisk with the dg that going to be mirrored

vxdg -g dg01 adddisk dg01_disk02=c11t3d1

bring into the Volume Manager “world” using:
vxdctl enable

 

4.Using LVM mirroring to mirror the data from the current LUNs to the new LUNs

vxassist -g dg01 mirror lvol1 dg01_disk02

if we found below errors, that is mean we have to reset and resfresh the incore database of volume manager:

VxVM vxassist ERROR V-5-1-1080 Unexpected inconsistency in configuration
Disk Access and Disk Media records don’t match

/usr/sbin/vxconfigd -k -m enable

 

5.Verify that the data has been successfully mirrored

Node:home/userid$ vxtask list
TASKID PTID TYPE/STATE PCT PROGRESS
161 ATCOPY/R 22.91% 0/69632000/15955968 PLXATT lvol1 lvol1-02 dg01
Node:home/userid$

if it has been succesfully mirrored, there will be no longer task running in the vxtask list. You may want to regularly checking on the progress during mirroring proccess.

 

6.Reduce the mirrors from the old LUNs

vxplex -g dg01 -o rm dis lvol2-01

 

7.Reduce the old LUNs out of the VG

vxdg -g dg01 rmdisk dg01_disk01

/opt/VRTS/bin/vxdisksetup -i c3t0d3

Initialization to the old disk was a proper handover to the storage support for them to reclaim the luns and re-use for other purposes. This is because if we do not initialize the disk, there will be still old data such as old disk group configurations data and it will be detected during re-scanning of the disk. After initialize the disk, the disk will be considered as unused. You can re-scan the disk using vxdisk -o alldgs list, and if nothing associates or attached with the disk on the result output, then you know that is the old ones. Thanks.

 

 

References:

http://etcfstab.com/hpux/hpux_san_add_vxvm.html
https://sort.veritas.com/ecls/umi/V-5-1-1080
https://vox.veritas.com/t5/Storage-Foundation/Unable-to-mirror-a-volume/td-p/503624
https://www.veritas.com/support/en_US/article.100023745
https://community.hpe.com/t5/LVM-and-VxVM/Mirror-data-with-Mirrordisk-UX-between-two-LUNs/td-p/5700095#.XSQ46Y9S82w
https://community.hpe.com/t5/LVM-and-VxVM/Moving-data-from-old-SAN-to-new-SAN/td-p/6718937#.XSQ4bY9S82w
https://vox.veritas.com/t5/Storage-Foundation/vxassist-multiple-volume-of-a-same-subdisk/td-p/644077
https://sort.veritas.com/public/documents/sf/5.0/hpux/manpages/vxvm/vxassist_1m.html
https://sort.veritas.com/public/documents/sf/5.1/aix/html/vxvm_admin/ch09s10s02.htm