Virtualization, Servers and Storage : Nexenta: MedFS iscsi migration steps

Ref: Nexenta: restore Windows Cluster using iscsi snapshots

Ref: Nexenta: iscsi RDM migration from NSTOR11 to NSTOR15

Ref: Nexenta 5: scripts for manual zfs snapshot replication

Brief description of migration steps

Step

Details

  • check pre-failover of iSCSI pool

record results

  • make sure clustered VMs stopped

confirm with Administrator
MedFS nodes

  • disable VSS Alarms on UGW

UGW: /local/adm/vss-alarms maint

  • remove VM name from vm-luns.txt 

NSTOR15N

  • rename zvol and lun files in VM folder

Ex: root@nstor15n:~/migrate/all-luns/2010P-SQL-17-01

  • create new volume group

Ex: vg create -b 8K nstor15-vol10/vg-2010P-SQL-17-01

  • move zfs to new VG

Ex: for i in {1..6}; do  echo zfs rename nstor15-vol10/2010P-SQL-17-01/lun21${i}_sql17_0304  nstor15-vol10/vg-2010P-SQL-17-01/lun21${i}_sql17_0304; done 

  • run manual replication of stopped VM

screen -r
bash -x ./manual_run_incr_replication.sh 2010P-SQL-17-01 > 2010P-SQL-17-01.log 2>&1

  • Rename zvol.txt and lun.txt files in VM folder

NSTOR15N

  • find the correct VMs folders on original iSCSI datastore

vCenter, VM Edit Settings

  • enable SSH on esxi251

vCenter>Configure>Services

  • using esxi251, copy *.vmx *.vmxf *.nvram *.vmsd from old VM to new VM folder

df

[root@esxi251:~] cd /vmfs/volumes/CL-NSTOR11-iSCSI-vol81/2010P-SQL-17-03

mkdir  /vmfs/volumes/N15-10-iSCSI-Rotman-syslun1/2010P-SQL-17-01

mkdir  /vmfs/volumes/N15-10-iSCSI-Rotman-syslun1/2010P-SQL-17-02

ls -al /vmfs/volumes/N15-10-iSCSI-Rotman-syslun1/2010P-SQL-17-01

2010P-SQL-17-03] cp *.vmx *.vmxf *.nvram *.vmsd  /vmfs/volumes/N15-10-iSCSI-Rotman-syslun1/2010P-SQL-17-01

  • using esxi251, copy none RDM vmdk from old VM to new VM folder

vmkfstools  -i 2010P-SQL-17-03.vmdk    /vmfs/volumes/N15-10-iSCSI-Rotman-syslun1/2010P-SQL-17-01/2010P-SQL-17-03.vmdk

  • using esxi251, copy the SECOND RDM vmdk from old VM to new VM folder

  • copy vmx,vmdk,… for the second VM

esxi251 , exsi252

  • using esxi251, copy none RDM vmdk from second old VM to second new VM folder

  • record the name of esxi server for both VMs

vCenter: esxi251 esxi252

  • select unused LUN IDs if possible

esxi151 : 511-516

  • map the LUNs

for i in {1..6}; do echo   lunmapping  create -b 512 -n 51${i} nstor15-vol10/vg-2010P-SQL-17-01/lun21${i}_sql17_0304 TargetGroup10  hg-prodesxi; done

  • rescan LUNs on all 4 esxi servers

vCenter

  • make sure new LUNs are visible and Attached on all 4x esxi

vCenter

  • register both VMs from new DS under new “-new” name and place in a test folder

vCenter

  • create affinity rule for both VMs

vCenter

  • remove old iSCSI RDM disk in vCenter

just the reference NOT data

Edit Settings for both VMs

  • check booting: EFI or BIOS
  • update VM version of both new VMs

vCenter, Edit Settings; Result: EFI

  • check current disks for both VMs

PS /Users/martynov/code-local/powershell>   Get-VM -Name "2010P-SQL-17-01-new" |  Get-HardDisk 
PS /Users/martynov/code-local/powershell>   Get-VM -Name "2010P-SQL-17-02-new" |  Get-HardDisk 

  • list LUN IDs

history 0 | egrep awk  |egrep sed  

lunmapping list | egrep 2010P-SQL-SC-03 | egrep -v syslun | sort -k5 |  awk '{print $1}' | sed 's/00000000$//' | awk '{print "\""$1"\""}'| paste -d"," -s -

  • prepare PowerCLI command

./win-cluster-add-luns.ps1     -vmname1 "X2010P-SQL-17-01-new" -vmname2 "X2010P-SQL-17-02-new" -datastore "N15-10-iSCSI-Rotman-syslun1" -esx1 "esxi251*" -naaIds "9E6A1E546AACDB67","2133F4CC74DEFA70","DDD1E676C9C24074","8113AADD0A35F757","17CB90C0AC3243BD","3D005C568412FB77" 


./win-cluster-add-luns.ps1    -vmname1 "2010P-FILE-05-new" -vmname2 "2010P-FILE-06-new" -datastore "N15-10-iSCSI-Rotman-syslun1" -esx1 "esxi251*" -naaIds "9A65217493E23B0F","3A57124CFB2F52E9"

  • run PowerCLI command
    make sure all good check for unitNumber error

MacBook

powershell> ./win-cluster-add-luns.ps1     -vmname1 "2010Q-S-SQL-SC-03-new" -vmname2 "2010Q-S-SQL-SC-04-new" -datastore "N15-10-iSCSI-Rotman-syslun1" -esx1 "esxi251*" -naaIds "1ADD…

  • check “-new” VM disks and Controllers

vCenter

  • update VMs version if EFI

vCenter

  • check that VM is not in vm-luns.txt

or crontab

Ex: NSTOR15

  • re-enable VSS Alarms

UGW: /local/adm/vss-alarms default 

  • move both “-new” VMs to same folder as original VMs

vCenter

  • create HPR replication

NSTORHSB27[NS]

  • disable SSH on esxi251

vCenter>Configure>Services

  • check HPR replication

Ex: hsb27n# hpr history  n15-10-vg-2010P-SQL-17-01 

  • Move original VMs to VSS/Migrated-iSCSI-Keep

vCenter