Create the LUN import relationship for an ONTAP FLI offline migration
Before you can migrate a LUN from a foreign array to an ONTAP storage system, you must create a LUN import relationship. A LUN import relationship is a persistent pairing between the source and destination storage for the purpose of data import. The source and destination endpoints are LUNs.
Creating the LUN import relationship for Foreign LUN Import (FLI) offline migrations includes identifying the source array LUNs as foreign in ONTAP, creating and configuring the destination volume to contain the foreign LUNs, creating destination target LUNs, and finally establishing the import relationship.
You should have completed the steps to prepare your foreign LUNs for FLI offline migration.
Step 1: Identify the source array LUNs as foreign in ONTAP
You’ll need to identify the source array LUNs as foreign LUNs in ONTAP before you begin your FLI offline migration.
-
List the source LUNs mapped from the foreign array; then verify the disk properties and paths.
storage disk show -array-name <array_name> -fields disk, serial-number, container-type, owner, path-lun-in-use-count, import-in-progress, is-foreignYou should see the number of paths expected based on your cabling (at least two paths for each source controller). You should also check the event log after masking the array LUNs.
The following example shows the source LUNs from the Hitachi DF600F array.
DataMig-ontap::*> storage disk show -array-name HITACHI_DF600F_1 -fields disk, serial-number, container-type, owner, path-lun-in-use-count, import-in-progress, is-foreign disk owner is-foreign container-type import-in-progress path-lun-in-use-count serial-number -------- ----- ---------- -------------- ------------------ --------------------- ------------- HIT-1.2 - false unassigned false 0,0,0,0,0,0,0,0 83017542001E HIT-1.3 - false unassigned false 0,0,0,0,0,0,0,0 83017542000E HIT-1.14 - false unassigned false 0,0,0,0,0,0,0,0 830175420019 3 entries were displayed.
-
Use the serial number to mark the source LUN as foreign in ONTAP:
storage disk set-foreign-lun -serial-number <lun_serial_number> -is-foreign trueThe following example marks the source LUNs from the Hitachi DF600F array as foreign.
DataMig-ontap::*> storage disk set-foreign-lun { -serial-number 83017542001E } -is-foreign true DataMig-ontap::*> storage disk set-foreign-lun { -serial-number 83017542000E } -is-foreign true DataMig-ontap::*> storage disk set-foreign-lun { -serial-number 83017542000F } -is-foreign true -
Verify the source LUN is marked as foreign.
storage disk show -array-name <array_name> -fields disk, serial-number, container-type, owner,import-in-progress, is-foreignThe following example shows the source LUNs from the Hitachi DF600F array marked as foreign.
DataMig-ontap::*> storage disk show -array-name HITACHI_DF600F_1 -fields disk, serial-number, container-type, owner,import-in-progress, is-foreign disk owner is-foreign container-type import-in-progress serial-number -------- ----- ---------- -------------- ------------------ ------------- HIT-1.2 - true foreign false 83017542001E HIT-1.3 - true foreign false 83017542000E HIT-1.4 - true foreign false 83017542000F 3 entries were displayed.
Step 2: Create and configure a destination volume
Before you create the LUN import relationship for an FLI offline migration, you must create a volume on your ONTAP storage system to contain the LUNs you will import from your foreign array.
Beginning with ONTAP 9.17.1, data migration of foreign LUNs using FLI offline migration is supported with ASA r2 systems. ASA r2 systems vary from other ONTAP systems (ASA, AFF, and FAS) in the implementation of its storage layer. In ASA r2 systems, volumes are automatically created when a storage unit (LUN or namespace) is created. Therefore, you do not need to create a volume before creating the LUN import relationship. You can skip this step if you are using an ASA r2 system.
Learn more about ASA r2 systems.
-
Create a destination volume.
volume create -vserver <SVM_name> -volume <volume_name> -aggregate <aggregate> -size <volume_size> -snapshot-policy defaultThe following example creates a volume named
winvolon theaggr1aggregate with a size of 100 GB.DataMig-ontap::*> vol create -vserver datamig winvol aggr1 -size 100g
-
Disable the default Snapshot policy on each volume.
volume modify -vserver <SVM_name> -volume <volume_name> -snapshot-policy noneIf default Snapshot copies exist prior to FLI migration, the volume needs additional space to store changed data.
The following example disables the default Snapshot policy on the
winvolvolume.DataMig-ontap::> volume modify -vserver datamig -volume winvol -snapshot-policy none Warning: You are changing the Snapshot policy on volume winvol to none. Any Snapshot copies on this volume from the previous policy will not be deleted by this new Snapshot policy. Do you want to continue? {y|n}: y Volume modify successful on volume winvol of Vserver datamig. -
Set
fraction_reserveoptionfor each volume to0and set the Snapshot policy tonone.vol modify -vserver <SVM_name> -volume * -fractional-reserve 0 –snapshot-policy noneThe following example sets the
fractional-reserveoption to0and the Snapshot policy tononefor all the volumes in the datamig SVM.DataMig-ontap::> vol modify -vserver datamig -volume * -fractional-reserve 0 –snapshot-policy none Volume modify successful on volume winvol of Vserver datamig.
-
Verify your volume settings.
volume show -vserver <SVM_name> -volume * -fields fractional-reserve,snapshot-policyThe factional-reserve and snapshot-policy settings should be
0andnone, respectively. -
Delete any existing Snapshot copies.
set advanced; snap delete –vserver <SVM_name> –volume <volume_name> –snapshot * -force trueFLI migration modifies every block of the target LUN. If default or other Snapshot copies exist on a volume prior to FLI migration, the volume gets filled up. Changing the policy and removing any existing Snapshot copies before FLI migration are required. Snapshot policy can be set again post-migration.
Step 3: Create the destination LUNs and LUN import relationship
For FLI offline migration, the destination LUNs on your ONTAP storage system, must be created and mapped to an igroup; then they must be offlined before creating the LUN import relationship.
Beginning with ONTAP 9.17.1, data migration of foreign LUNs using FLI offline migration is supported with ASA r2 systems. ASA r2 systems vary from other ONTAP systems (ASA, AFF, and FAS) in the implementation of its storage layer. In ASA r2 systems, volumes are automatically created when a storage unit (LUN or namespace) is created. Each volume contains only one storage unit. Therefore, for ASA r2 systems, you do not need to include the volume name in the -path option when creating the LUN; you should include the storage unit path instead.
-
Create destination LUNs.
lun create -vserver <SVM_name> -path <volume_path|storage_unit_path> -ostype <os_type> -foreign-disk <serial_number>The following example creates LUNs on the
datamigSVM with the specified paths and foreign disk serial numbers. The-ostypeoption specifies the operating system type of the LUN.DataMig-ontap::*> lun create -vserver datamig -path /vol/winvol/bootlun -ostype windows_2008 -foreign-disk 83017542001E Created a LUN of size 40g (42949672960) Created a LUN of size 20g (21474836480) DataMig-ontap::*> lun create -vserver datamig -path /vol/linuxvol/lvmlun1 -ostype linux -foreign-disk 830175420011 Created a LUN of size 2g (2147483648) DataMig-ontap::*> lun create -vserver datamig -path /vol/esxvol/bootlun -ostype vmware -foreign-disk 830175420014 Created a LUN of size 20g (21474836480)
The
lun createcommand detects the LUN size and alignment based on partition offset and creates the LUN accordingly with foreign-disk option. Some I/O will always appear be partial writes and will therefore look misaligned. Examples of this would be database logs. -
Verify the size and source LUN of the newly created LUNs.
lun show -vserver <SVM_name> -fields vserver, path, state, mapped, type, sizeThe following example shows the LUNs created in the
datamigSVM with their paths, states, mapped status, types, and sizes.DataMig-ontap::*> lun show -vserver datamig Vserver Path State Mapped Type Size --------- ------------------------------- ------- -------- -------- -------- datamig /vol/esxvol/bootlun online unmapped vmware 20GB datamig /vol/esxvol/linuxrdmvlun online unmapped linux 2GB datamig /vol/esxvol/solrdmplun online unmapped solaris 2GB datamig /vol/winvol/gdrive online unmapped windows_2008 3GB 4 entries were displayed.
-
If you are running ONTAP 9.15.1 or later, disable space allocation for the newly created LUNs.
Space allocation is enabled by default for newly created LUNs in ONTAP 9.15.1 and later.
lun modify -vserver <vserver_name> -volume <volume_name> -lun <lun_name> -space-allocation disabled -
Verify that space allocation is disabled.
lun show -vserver <vserver_name> -volume <volume_name> -lun <lun_name> -fields space-allocation -
Create a host igroup of protocol FCP and add host initiators.
lun igroup create -ostype <os_type> -protocol fcp -vserver <SVM_name> -igroup <igroup_name> -initiator <initiator_wwpn1>,<initiator_wwpn2>Find initiator WWPNs from storage groups section of your Site Survey planning worksheet.
The following example creates igroups for the destination LUNs with the specified operating system types and initiators.
DataMig-ontap::*> lun igroup create -ostype windows -protocol fcp -vserver datamig -igroup dm-rx200s6-21 -initiator 21:00:00:24:ff:30:14:c4,21:00:00:24:ff:30:14:c5 DataMig-ontap::*> lun igroup create -ostype linux -protocol fcp -vserver datamig -igroup dm-rx200s6-22 -initiator 21:00:00:24:ff:30:04:85,21:00:00:24:ff:30:04:84 DataMig-ontap::*> lun igroup create -ostype vmware -protocol fcp -vserver datamig -igroup dm-rx200s6-20 -initiator 21:00:00:24:ff:30:03:ea,21:00:00:24:ff:30:03:eb
Use the same LUN ID as source. Refer to source LUNS section of your Site Survey planning worksheet.
-
Map the destination LUNs to an igroup.
lun map -vserver <SVM_name> -path <volume_path|storage_unit_path> -igroup <igroup_name> -lun-id <lun_id>The following example maps the destination LUNs to their respective igroups with the specified paths and LUN IDs.
DataMig-ontap::*> lun map -vserver datamig -path /vol/winvol/bootlun -igroup dm-rx200s6-21 -lun-id 0 DataMig-ontap::*> lun map -vserver datamig -path /vol/linuxvol/bootlun -igroup dm-rx200s6-22 -lun-id 0 DataMig-ontap::*> lun map -vserver datamig -path /vol/esxvol/bootlun -igroup dm-rx200s6-20 -lun-id 0
-
Offline the destination LUNs.
lun offline -vserver <SVM_name> -path <volume_path|storage_unit_path>The following example offlines the destination LUNs in the
datamigSVM.DataMig-ontap::*> lun offline -vserver datamig -path /vol/esxvol/bootlun DataMig-ontap::*> lun offline -vserver datamig -path /vol/esxvol/linuxrdmvlun DataMig-ontap::*> lun offline -vserver datamig -path /vol/esxvol/solrdmplun
-
Create the LUN import relationship between the destination and source LUNs.
lun import create -vserver <SVM_name> -path <volume_path|storage_unit_path> -foreign-disk <serial_number>The following example creates the LUN import relationship for the destination LUNs in the
datamigSVM with their respective paths and foreign disk serial numbers.DataMig-ontap::*> lun import create -vserver datamig -path /vol/winvol/bootlun -foreign-disk 83017542001E DataMig-ontap::*> lun import create -vserver datamig -path /vol/linuxvol/ext3lun -foreign-disk 830175420013 DataMig-ontap::*> lun import create -vserver datamig -path /vol/esxvol/linuxrdmvlun -foreign-disk 830175420018 DataMig-ontap::*> lun import create -vserver datamig -path /vol/esxvol/solrdmplun -foreign-disk 830175420019
-
Verify the LUN import relationship is created.
lun import show -vserver <SVM_name> -fields vserver, foreign-disk, path, operation, admin-state, operational-state, percent-completeThe following example shows the LUN import relationship created for the destination LUNs in the
datamigSVM with their respective foreign disks and paths.DataMig-ontap::*> lun import show -vserver datamig vserver foreign-disk path operation admin operational percent in progress state state complete ------------------------------------------------------------------------------- datamig 83017542000E /vol/winvol/fdrive import stopped stopped 0 datamig 83017542000F /vol/winvol/gdrive import stopped stopped 0 datamig 830175420010 /vol/linuxvol/bootlun import stopped stopped 0 3 entries were displayed.