Monday, June 9, 2014

Data migration from ext3 filesystem on LVM using Multipath Disk to VxFS filesystem on Veritas DMP LUN

Ideally, a LUN should not be in control of two multipathing software. In fact, we do not need to run multiple multipathing software on same system except when we are migrating one to another.

While migrating Linux Multipath to Veritas DMP, you may need to to copy data from ext3 filesystem on LVM using Multipath Disk to VxFS filesystem on Veritas DMP LUN.

Below are steps to copy data from ext3 /app_fs  to vxfs /app_fs_vxfs

> Assign new LUNs to be used for DMP

> Blacklist DMP LUNs in multiapthd.conf. Multipath will ignore these disks.

vi /etc/multipath.conf
    blacklist {
           wwid 7600508b4000bd0070000b00005320000
           wwid 7600508b4000bd0070000b00009820000
    }
multipathd reload

> Install Veritas SF ( it will isntalld DMP)

> Exclude local disks and Linux Multipath LUNs from DMP
vxdisk -p list
vxdmpadm listctlr
vxdmpadm exclude ctlr=c360xxxx
vxdmpadm exclude dmpnodename=disk_XX
cat /etc/vx/vxvm.exclude
vxdisk list

> Create VxFs filessytem on DMP LUN
vxdisk list
vxdisksetup -i disk_XX
vxdg init app_dg  app_data_1=data_disk
vxassist -g app_dg make app_vol 1g app_data_1
/opt/VRTS/bin/mkfs -f vxfs /dev/vx/rdsk/app_dg/app_volume_name
mount -t vxfs /dev/vx/dsk/app_dg/app_volume_name /app_fs_vxfs
df -hP /mnt

> Copy data from ext3 to vxfs filesystem

rsync -av /app_fs  /app_fs_vxfs

> Rename filesystem
umount /app_fs  /app_fs_vxfs
- add below in /etc/fstab
vi /etc/fstab
/dev/vx/dsk/app_dg/app_volume_name   /app_fs    vxfs   defaults 0 1
mount /app_fs

> Flush multiapth LUN and delete all paths of multiapth LUN ( where n is last number of LUN displayed in multipath -l output x:y:z:n)

lvchange -an lv_name # If there is Ligical Volume on multipath LUN
multipath -f mpathN   # mpathN == multipath device name
LUN=n
 for scsi_id in $(ls /sys/bus/scsi/drivers/sd/ | grep ":$LUN$"); do 
echo 1 > /sys/bus/scsi/drivers/sd/$scsi_id/delete; done

> Stop multiapth and remove package
service multiapthd stop
yum remove device-mapper-multipath






1 comment:

  1. Among the several data migration consulting companies, I found your company to be one of the best, which helped me in designing the proper plan for transforming the data correctly. Your team had worked with me and defined the best processes to meet the unique information quickly.

    ReplyDelete