Prior to 1.4.3 release, PowerVC supported three types of zoning policies:

  1. Initiator-target zoning: To create one zone with one initiator and one target.
  2. Initiator zoning: To create zone per one initiator and multiple targets from all storage providers.
  3. initiator-vfc zoning: To create a single zone with all initiators and multiple targets from all different storage providers together.

In PowerVC 1.4.3, to meet the customer requirement of zoning targets per storage provider, a new config option zone_by_stg_provider is introduced to create zone per storage provider so that targets from same storage provider are put together in single zone when volumes from multiple storage providers are mapped to a VM. The article also focuses on how to set the new config option from CLI, demonstrates what happens to the existing zones, how new zones are created, and so on.

The zone_by_stg_provider config option is applicable only for initiator and initiator-vfc zoning policies. It is by default set to False and zones are created based on zoning policy applied on fabrics.

Note: When volumes attached to VM are from pluggable / third party storage providers, then config option zone_by_stg_provider is ignored and zones are created based on zoning policy applied on fabrics.

Below CLI options help you to set the configuration of zone_by_stg_provider.

  1. To check current configuration of zoning targets per storage provider, run the below command:

    powervc-config storage fc-zone zone-by-stg-provider

  2. To enable configuration of zoning targets per storage provider, run the below command:

    powervc-config storage fc-zone zone-by-stg-provider --enable –restart

    When zone_by_stg_provider config option is set to True and initiator/initiator-vfc zoning policy is configured on fabrics, then zones are created or deleted based on the below conditions:

    • If there are any existing zones whose targets are from multiple storage providers, then those existing zones are deleted. For each storage provider, a new zone is created and targets from the storage provider are grouped together in the newly created zone.
    • When a new or existing volume is attached to a VM from a different storage provider in addition to volumes already attached to the VM, a new zone is created in addition to the existing zones with all targets from the storage provider.
  3. To disable the configuration of zoning targets per storage provider, run the below command:

    powervc-config storage fc-zone zone-by-stg-provider --disable –restart

    When zone_by_stg_provider config option is set to False and initiator/initiator-vfc zoning policy is configured on fabrics, then based on selected zoning policy, zones are consolidated or deleted based on the below conditions:

    • If there are any existing zones whose targets are from the same storage provider, then one of those existing zones is retained while others are deleted and targets of deleted zones are consolidated to the retained zone.
    • When a new or existing volume is attached to a VM from a different storage provider in addition to volumes already attached to the VM, then all targets from the storage provider are consolidated to the existing zone based on the selected zoning policy on the fabric.

Note: When zone_by_stg_provider config option is either set to either True or False with the above CLI commands, existing zones on the fabric will not be affected until a new volume from different storage provider is attached to the VM.

Let us see some below use cases with zoning polices and config option zone_by_stg_provider:

1. Initiator Zoning policy with ‘zone_by_stg_provider = False’.

When initiator zoning policy is configured on fabric and zone_by_stg_provider config option is set to False, for every initiator and target from multiple storage providers, it creates a zone. In the below example (diagram), it created a zone Zone1 on fabric.

Consider a VM deployed with initiator policy and volumes from multiple storage providers (storage1, storage2) attached to the VM.
In this case there are:

  • 2 initiator WWPNs (c0:50:76:08:67:25:4d:5a; c0:50:76:08:67:25:4d:5b) from VM
  • 2 target WWPNs (50:05:07:68:0b:22:46:02; 50:05:07:68:0b:22:46:03) from storage1
  • 1 target WWPN (50:06:0e:80:07:50:b1:10) from storage2

For every initiator WWPN and all target WWPNs from storage providers (storage1, storage2) one zone is created.
Thus, 2*(target WWPNS from all storage providers) = 2 zones are created as shown below:

In the above image, we can see that two zones are created while targets from storage1 and storage2 are zoned together in a single zone.

2. Initiator Zoning policy with ‘zone_by_stg_provider = True’

When initiator zoning policy is configured on fabric and zone_by_stg_provider config option is set to True, for every initiator and target from storage provider, it creates a zone. In the below example(diagram), it created two zones Zone1 and Zone2 on the fabric.

Consider a VM is deployed with initiator policy and volumes from multiple storage providers, let’s say storage1 and storage2 are attached to the VM.
In this case there are:

  • 2 initiator WWPNs (c0:50:76:08:67:25:4d:5a; c0:50:76:08:67:25:4d:5b) from the VM
  • 2 target WWPNs (50:05:07:68:0b:22:46:02; 50:05:07:68:0b:22:46:03) from storage1
  • 1 target WWPN (50:06:0e:80:07:50:b1:10) from storage2

For every initiator WWPN and target WWPNs from each storage provider, one zone is created.
Thus, 2*(no of storage providers) = 4 zones are created as shown below:


In the above image, we can see that four zones are created while targets from storage1 and storage2 are zoned in separate zones.

Zone naming convention with ‘zone_by_stg_provider = True’

When initiator/initiator-vfc zoning policy with config option zone_by_stg_provider is set to True, zone names follow the below pattern:
zone_name_prefix + host_name(truncated) + storage_host_name(truncated) + initiator(truncated)+random string of length 4.

Example
When a VM is deployed with initiator zoning policy and zone_by_stg_provider is set to True, zone is created with this name:
powervc_zone_config_v_8032267c_00_t164g1500_c050760867254d5aWEN9,

In this example, powervc_ is zone name prefix and zone_config_v_8032267c_00 is the VM name, t164g1500 is the storage host name. The storage host name is followed by the VM’s initiator port(c050760867254d5a) and WEN9 is the random string of length 4 (alpha numeric characters).

Note: If zone_name_template is configured for creating zone names, then it follows the template for zone name creation and appends a random string of length 4 towards the end of the zone name to differentiate between zone names created.

3. What happens to existing zones when zone_by_stg_provider = True?

Below is a scenario where targets are from multiple storage providers and a new or existing volume from a different storage provider is attached to a VM with config option zone_by_stg_provider is set to True.
Consider a VM is deployed with initiator-vfc policy and volumes from multiple storage providers, let’s say storage1 and storage2 are attached to the VM.
In this case there are:

  • 2 initiator WWPNs (c0:50:76:08:26:00:0a:ed; c0:50:76:08:26:00:0a:ec) from the VM
  • 2 target WWPNs (50:05:07:68:02:16:46:df; 50:05:07:68:02:26:46:e0) from storage1
  • 2 target WWPNs (50:05:07:68:02:26:46:57; 50:05:07:68:02:26:46:58) from storage2

For all initiator WWPNs and all target WWPNs from storage1 and storage2, a zone is created as shown below:

In the above image, we can see that a zone is created while targets from storage1 and storage2 are zoned together in a single zone.

After config option zone_by_stg_provider is set to True and a new or existing volume from a different storage provider(storage3) with 1 target WWPN (50:01:73:80:75:b0:01:41) is attached to the VM, then existing zone (powervc_dnd_ip9_114_181_166_c050760826000aedc050760826000aecNA0Q) is deleted, and it is split into 3 new zones such that the targets from each storage provider are put in a separate zone instead of grouping them together in one zone as shown below.


In the above image, we can see that 3 zones are created while targets from storage1, storage2, and storage3 zoned in separate zones.

So as you see that PowerVC allows you to create zone per storage provider so that targets from same storage provider are put together in single zone when volumes from multiple storage providers are mapped to a VM.

If you have any questions, feel free to add them below. We’d love to hear from you! And don’t forget to follow us on Facebook, LinkedIn, and Twitter.

Author:
Prashanth Kumar Reddy (prashkre@in.ibm.com)

Join The Discussion

Your email address will not be published. Required fields are marked *