Tuesday, March 19, 2013

EMC VNX LUN Migrations for Block Storage

LUN migrations are fairly useful and easy to do. If a specific LUN is suffering from performance from a heavily utilized pool, a LUN migration to a dedicated RAID group can resolve that issue. The LUN migration does not require the source LUN to be offline and can be canceled at any time (it is a copy and write delta process).

First off, when doing a LUN migration, the destination LUN has to be equal to in size and not attached to any host already. Apart from that, there appears to be no other prerequisites. This implies that you can migrate a LUN to a different drive type (ie: SAS to NLSAS), a different RAID type, or even from a thick to a thin LUN.

To do a LUN migration for block storage, first log in to Unisphere and then go to Storage -> LUNs. Create a new LUN that is equal or larger in size than the source LUN.


Next, right click the source LUN and select Migrate.


Select the destination LUN and the migration rate.


The LUN migration should now be started. You can monitor the status by selecting "LUN Migration Summary" on the right hand side.


To change the migration rate, go to the Migration tab under the LUN properties. This tab will only be visible when there's a LUN migration currently running.

Once the LUN migration is complete, the source LUN is deleted and the new destination LUN will be exactly the same as the previous source. This means that the LUN ID, SP ownership, host connectivity, and naa.id are all migrated over as well.

Configuring Boot from SAN on Cisco UCS

A while back, we purchased another Cisco UCS chassis populated with B200-M3 blades. These blades didn't come with internal hard disks, so we had to configure boot from SAN. As these were new servers, all we had to do was make the necessary changes to the Service Profile Template and then deploy it onto the blades. If the service profiles are already deployed, you will need to apply the change to the service profile for each server or the service profile template if it is an updating template.

The first thing you will need to do is select the service profile or service profile template and "modify the boot policy" under the "boot order" tab.


Next, create a boot policy. Add CD-ROM device first so that you can install the OS/hypervisor (ESXi 5 in my case). Under vHBA, select "Add SAN Boot" and then type in the name of the vHBA that will be the primary initiator.

 
Note: In my environment, vHBA FC_0 and vHBA FC_1 are the primary and secondary SAN boot initiators correspondingly. Moreover, I have another pair of vHBAs (FC_2 and FC_3) that are to be used to connect to the SAN (not for SAN boot). This is a necessary requirement for proper LUN masking on the EMC VNX. 

Highlight the newly created primary SAN boot initiator and select "Add SAN Boot Target". Type in the boot target LUN id and WWPN for the primary boot target. Repeat this for the secondary boot target. Once done, repeat all the steps above for the secondary SAN boot initiator. It should look something like this:


Note: FC_0 is pinned onto Fabric A which is physically connected to Storage Processors A Port 0 (SPA0) and SPB0 while FC_1 is pinned onto Fabric B which is physically connected to SPA1 and SPB1. Therefore, the primary and secondary WWPNs are configured correspondingly.

Once the settings have been applied, the UCS servers will now boot from SAN (assuming all the fiber channel zoning and LUN masking is configured).

If you have an EMC VNX storage on the back end, you may want to read here on how to configure the storage groups and LUN masking.

Configuring Boot from SAN on EMC VNX for VMware vSphere 5.0

Configuring boot from SAN on an EMC VNX is fairly straight forward, but there are some little configuration changes that need to be applied.

The assumptions to the environment are:
  1. 4 HBAs per host, 2 will be used for the SAN boot while 2 will be used for datastore access
  2. All hosts will boot from LUN ID 0 (common use case when using UCS templates)

Note:  Fiber channel zoning is not within the scope of this post.


The first step to configuring boot from SAN on the EMC VNX is to register the initiators and create the host entries. If no zoning has been done yet, go ahead and zone the HBAs that will be used for SAN boot with both storage processors (SPs). Once that is done, restart the hosts and they should log in to the fabric and the VNX.

Open Unisphere and then go to Hosts -> Initiators and you should see the unregistered HBAs that are logged into the system. Next, the initiator records have to be created. In my environment, I will need to create a total of 4 records as there are 4 paths to each host (2 HBAs and 2 SP ports).


The WWN in this case is a combination of the WWNN and the WWPN. In this example, the WWNN is 20:00:00:25:B5:FF:00:17 and the WWPN is 20:00:00:25:B5:0A:00:1A. Select and/or enter the other fields. Please note that the IP address of the host does not matter for the SAN boot HBAs. Here are all 4 initiator records I had to create:

Record 1
WWN/IQN: 20:00:00:25:B5:FF:00:17:20:00:00:25:B5:0A:00:1A
SP Port: A-0
Initiator Type: CLARiion/VNX
Failover Mode: Active-Active mode (ALUA)
New Host: esxi07_boot, 169.254.1.1

Record 2
WWN/IQN: 20:00:00:25:B5:FF:00:17:20:00:00:25:B5:0A:00:1A
SP Port: B-0
Initiator Type: CLARiion/VNX
Failover Mode: Active-Active mode (ALUA)
New Host: Existing host, esxi07_boot

Record 3
WWN/IQN: 20:00:00:25:B5:FF:00:17:20:00:00:25:B5:0B:00:1A
SP Port: A-1
Initiator Type: CLARiion/VNX
Failover Mode: Active-Active mode (ALUA)
New Host: esxi07_boot, 169.254.1.1

Record 4
WWN/IQN: 20:00:00:25:B5:FF:00:17:20:00:00:25:B5:0B:00:1A
SP Port: B-1
Initiator Type: CLARiion/VNX
Failover Mode: Active-Active mode (ALUA)
New Host: Existing host, esxi07_boot


Once the initiator records are created and registered, a separate storage group for each host needs to be created. The reason behind this is that each storage group can only have one LUN ID 0, hence the need for multiple storage groups. Also, it is more secure with multiple storage groups (each with only 1 host member) as each host can be masked exclusively to its own boot LUN.

In order to create the storage groups go to Hosts -> Storage groups. Press create and give it a name.


Click OK then add the host to that specific storage group. Next add the LUN under storage group properties and ensure that you change the "Host LUN ID" to 0.


Note: You will not have the option to change the "Host LUN ID" if the LUN is already in the Storage Group. You will need to first remove the LUN from the storage group and then re-add it into the storage group.

This concludes the steps required to configure boot from SAN on an EMC VNX. However, there are a few additional steps. Once vSphere is installed, go into the Host -> Configurations -> Advanced Settings -> Disk and set the "Disk.EnableNaviReg" setting to 0. Once this is done, you can then zone and configure the HBAs for datastore access. If this setting is not changed to 0, the VNX will merge the 2 storage groups together for each ESXi host.