Creating Dynamic VSANs

This chapter includes the following sections:

About DPVM

Port VSAN membership on the switch is assigned on a port-by-port basis. By default each port belongs to the default VSAN.

You can dynamically assign VSAN membership to ports by assigning VSANs based on the device WWN. This method is referred to as Dynamic Port VSAN Membership (DPVM). DPVM offers flexibility and eliminates the need to reconfigure the port VSAN membership to maintain fabric topology when a host or storage device connection is moved between two Cisco MDS switches or two ports within a switch. It retains the configured VSAN regardless of where a device is connected or moved. To assign VSANs statically, see Creating Dynamic VSANs .

DPVM configurations are based on port world wide name (pWWN) and node world wide name (nWWN) assignments. DPVM contains mapping information for each device pWWN/nWWN assignment and the corresponding VSAN. The Cisco NX-OS software checks DPVM active configuration during a device FLOGI and obtains the required VSAN details.

The pWWN identifies the host or device and the nWWN identifies a node consisting of multiple devices. You can assign any one of these identifiers or any combination of these identifiers to configure DPVM mapping. If you assign a combination, then preference is given to the pWWN.

DPVM uses the Cisco Fabric Services (CFS) infrastructure to allow efficient database management and distribution. DPVM uses the application driven, coordinated distribution mode and the fabric-wide distribution scope (for information about CFS, refer to the Cisco MDS 9000 Series NX-OS System Management Configuration Guide .


Note

DPVM does not cause any changes to device addressing. DPVM only pertains to the VSAN membership of the device, ensuring that the host gets the same VSAN membership on any port on the switch. For example, if a port on the switch has a hardware failure, you can move the host connection to another port on the switch and you do not need to update the VSAN membership manually.

Note

DPVM is not supported on FL ports. DPVM is supported only on F ports.

This section describes DPVM and includes the following topics:

About DPVM Configuration

To use the DPVM feature as designed, be sure to verify the following requirements:

  • The interface through which the dynamic device connects to the Cisco MDS 9000 Series switch must be configured as an F port.

  • The static port VSAN of the F port should be valid (not isolated, not suspended, and in existence).

  • The dynamic VSAN configured for the device in the DPVM database should be valid (not isolated, not suspended, and in existence).

  • Device-alias must be in enhanced mode.


Note

The DPVM feature overrides any existing static port VSAN membership configuration. If the VSAN corresponding to the dynamic port is deleted or suspended, the port is shut down.

Enabling DPVM

To begin configuring DPVM, you must explicitly enable DPVM on the required switches in the fabric. By default, this feature is disabled in all switches in the Cisco MDS 9000 Family.

The configuration and verification commands for DPVM are only available when DPVM is enabled on a switch. When you disable this feature, all related configurations are automatically discarded.

To enable DPVM on any participating switch, follow these steps:

Procedure


Step 1

switch# config t

switch(config)#

Enters configuration mode.

Step 2

switch(config)# feature dpvm

Enables DPVM on that switch.

Step 3

switch(config)# no feature dpvm

Disables (default) DPVM on that switch.

Note 
To overwrite the login information with the duplicate pWWN login, enter the dpvm overwrite-duplicate-pwwn command.

DPVM Device Configuration (Static)

The DPVM device configuration consists of a series of device mapping entries. Each entry consists of a device pWWN or nWWN assignment along with the dynamic VSAN to be assigned. You can configure a maximum of 16,000 DPVM entries in the DPVM database. This database is global to the whole switch (and fabric) and is not maintained for each VSAN.

Configuring DPVM

To configure DPVM, follow these steps:

Procedure


Step 1

switch# configure terminal

Enters configuration mode.

Step 2

switch(config)# device-alias mode enhanced

switch(config)# device-alias commit

Enables enhanced device alias mode.

Step 3

switch(config)# dpvm database

Creates the DPVM config database.

Step 4

switch(config)# no dpvm database

(Optional) Deletes the DPVM config database.

Step 5

switch(config-dpvm-db)# pwwn 12:33:56:78:90:12:34:56 vsan 100

Maps the specified device pWWN to VSAN 100.

Step 6

switch(config-dpvm-db)# no pwwn 12:33:56:78:90:12:34:56 vsan 101

(Optional) Removes the specified device pWWN mapping from the DPVM config database.

Step 7

switch(config-dpvm-db)# nwwn 14:21:30:12:63:39:72:81 vsan 101

Maps the specified device nWWN to VSAN 101.

Step 8

switch(config-dpvm-db)# no nwwn 14:21:30:12:63:39:72:80 vsan 101

(Optional) Removes the specified device nWWN mapping from the DPVM config database.

Step 9

switch(config-dpvm-db)# device-alias device1 vsan 102

Maps the specified device-alias to VSAN 102.

Step 10

switch(config-dpvm-db)# no device-alias device1 vsan 102

(Optional) Removes the specified device-alias mapping from the DPVM config database.

Step 11

switch(config-dpvm-db)# show dpvm pending

(Optional) When DPVM distribute is enabled (enabled by default when the feature is enabled) all configuration changes are held until they are committed. The list of pending changes can be seen at any time using this command.

Step 12

switch(config-dpvm-db)# dpvm commit

(Optional) When DPVM distribute is enabled (enabled by default when the feature is enabled) this command is required to commit the configuration changes.

Step 13

switch(config-dpvm-db)# show dpvm database

(Optional) Displays DPVM static device configuration.


Activating DPVM

Activating DPVM enforces the DPVM configuration. Activation may fail if there are conflicts between the already active configuration and the configuration to be activated. Activation can be forced to override the conflicting entries.

DPVM configuration can also be deactivated by issuing the no dpvm activate command.

To activate DPVM, follow these steps:

Procedure


Step 1

switch# configure terminal

Enters configuration mode.

Step 2

switch(config)# dpvm activate

Activates the DPVM configuration.

Step 3

switch(config)# no dpvm activate

Deactivates the currently active DPVM configuration.

Step 4

switch(config)# dpvm activate force

Forcefully activates the DPVM configuration and overrides the conflicting entries.

Step 5

switch(config)# dpvm commit

When DPVM distribute is enabled (enabled by default when the feature is enabled) this command is required to commit the configuration changes.

Step 6

switch(config)# show dpvm database active

(Optional) Displays the enforced DPVM device configuration.


DPVM Autolearn

DPVM can be configured to automatically learn (autolearn) new devices within each VSAN. DPVM autolearn can be enabled or disabled at any time. Learned entries are created by populating device pWWNs and VSANs and can be using the show dpvm database active . DPVM should be activated before autolearn can be enabled.

Auto learned entries can also be manually deleted. The auto learned entries become permanent when DPVM auto learn is disabled.


Note

Autolearn is only supported for devices connected to F ports. Devices connected to FL ports are not entered into the DPVM database because DPVM is not supported on FL ports.

The following conditions apply to learned entries:

  • If a device logs out while autolearn is enabled, the corresponding autolearn entry is automatically deleted.

  • If the same device logs multiple times into the switch through different ports, then the VSAN corresponding to last login is remembered.

  • Learned entries do not override previously configured and activated entries.

  • Learning is a two-part process—Enabling autolearning followed by disabling autolearning. When the auto-learn option is enabled, the following applies:

    • Learning currently logged-in devices—Occurs from the time learning is enabled.

    • Learning new device logins— Occurs as and when new devices log in to the switch.

Enabling Autolearn

To enable autolearn, follow these steps:

Procedure


Step 1

switch# configure terminal

Enters configuration mode.

Step 2

switch(config)# dpvm auto-learn

Enables autolearn on the switch.

Step 3

switch(config)# no dpvm auto-learn

Disables (default) autolearn on the switch.

Step 4

switch(config)# clear dpvm auto-learn

Clears the list of autolearned entries.

Step 5

switch(config)# clear dpvm auto-learn pwwn pwwn

Clears the list of autolearned pWWN entries in the distributed DPVM database.

Step 6

switch(config)# dpvm commit

When DPVM distribute is enabled (enabled by default when feature is enabled) any change to DPVM autolearn has to be committed before it can take effect locally and in the fabric.


Clearing Learned Entries

You can clear DPVM entries from the active DPVM database (if autolearn is still enabled) using one of two methods.

  • To clear a single autolearn entry, use the clear dpvm auto-learn pwwn command.


switch# clear dpvm auto-learn pwwn 55:22:33:44:55:66:77:88
  • To clear all autolearn entries, use the clear dpvm auto-learn command.


switch# clear dpvm auto-learn

Note

These two commands do not start a session and can only be issued in the local switch.

Disabling Autolearn

To disable autolearn, follow these steps:

Procedure


Step 1

switch# configure terminal

Enters configuration mode.

Step 2

switch(config)# no dpvm auto-learn

Disables autolearn on the switch.

Note 

Running the no dpvm auto-learn command on other switches in the fabric before running the dpvm commit command helps to overcome the learnt conflict.


DPVM Distribution

If the DPVM configuration is available on all switches in the fabric, devices can be moved anywhere and offer the greatest flexibility. To enable database distribution to the neighboring switches, the database should be consistently administered and distributed across all switches in the fabric. The Cisco NX-OS software uses the Cisco Fabric Services (CFS) infrastructure to achieve this requirement (refer to the Cisco MDS 9000 NX-OS System Management Configuration Guide ).

This section describes how to distribute DPVM and includes the following topics:

About DPVM Distribution

Using the CFS infrastructure, each DPVM server learns the DPVM configuration from each of its neighboring switches during the ISL bring-up process. Any configuration changes done locally are distributed in the fabric and updated by all switches in the fabric.

With DPVM distribution enabled, all DPVM configuration changes are stored temporarily and committed only when the dpvm commit command is run. Changes include the following tasks:

  • Adding, deleting, or modifying DPVM device configuration.

  • Activating or deactivating DPVM.

  • Enabling or disabling autolearn.

  • DPVM copy active configuration.

These changes are distributed to all switches in a fabric with the dpvm commit command. Changes can also discard via the dvpm abort command.


Tip

Temporary changes made can be viewed by the show dpvm pending or show dovm pending-diff commands.


Disabling DPVM Distribution

To disable DPVM distribution to the neighboring switches, follow these steps:

Procedure


Step 1

switch# configure terminal

switch(config)#

Enters configuration mode.

Step 2

switch(config)# no dpvm distribute

Disables DPVM distribution to the neighboring switches.

Step 3

switch(config)# dpvm distribute

Enables (default) DPVM distribution to the neighboring switches.


About Locking the Fabric

The first action that modifies the existing configuration creates the DPVM temporary storage and locks the feature in the fabric. Once the fabric is locked, no other user can make any further configuration changes to this feature.

Locking the Fabric

To lock the fabric and apply changes to the DPVM temporary storage, follow these steps:

Procedure


Step 1

switch# config terminal

Enters configuration mode.

Step 2

switch(config)# dpvm database

switch(config-dpvm-db)#

Accesses the DPVM configuration.

Step 3

switch(config-dpvm-db)# pwwn 11:22:33:44:55:66:77:88 vsan 11

Adds one entry to the DPVM configuration.

Step 4

switch(config-dpvm-db)# exit

Exits to configuration mode.

Step 5

switch(config)# dpvm activate

Run this command for the recent configuration changes to take effect.


Committing Changes

The dpvm commit command commits all the configuration changes made thus far on the local switch and also distributes the configurations to other switches in the fabric. On a successful commit, the configuration change is applied throughout the fabric and the lock is released.

To commit the DPVM configuration changes, follow these steps:

Procedure


Step 1

switch# configure terminal

Enters configuration mode.

Step 2

switch(config)# dpvm commit

Commits the pending changes. The changes can be viewed using the show dpvm pending or the show dpvm pending-diff commands.


Discarding Changes

The dpvm abort discards all the temporary DPVM changes made thus far. The configurations remain unaffected and the lock is released.

To discard the DPVM configuration changes, follow these steps:

Procedure


Step 1

switch# configure terminal

Enters configuration mode.

Step 2

switch(config)# dpvm abort

Discards the database entries that are currently in the DPVM pending database. Discards all the pending DPVM changes.


Clearing a Locked Session

If DPVM lock is held and not released either by committing or by discarding the changes, an administrator can still clear the DPVM session from any switch in the fabric. When a DPVM session is cleared, all pending DPVM changes are discarded and the fabric lock is released.


Tip

Changes made to DPVM when distribution is enabled and held temporarily until the configuration changes are either committed or discarded. The configuration changes are discarded when the switch is restarted.


To use administrative privileges and release a locked DPVM session, use the clear dpvm session command in EXEC mode.


switch# clear dpvm session

DPVM Configuration Merge Guidelines

DPVM merge refers to a union of DPVM configuration across the fabric. For information about CFS merge support, refer to the Cisco MDS 9000 Family NX-OS System Management Configuration Guide for detailed concepts.

When merging the DPVM database between two fabrics, follow these guidelines:

  • Verify that the activation status and the auto-learn status is the same is both fabrics.

  • Verify that the combined number of device entries in each configuration does not exceed 16 K.


Caution

If these conditions are not met, the merge will fail. The next distribution will forcefully synchronize the configurations and the activation states in the fabric.


This section describes how to merge DPVM configurations and includes the following topics:

About Copying DPVM DPVM Configurations


Note

Fabric distribution is enabled and changes must be committed.

Copying DPVM Active Configuration

To copy the currently active DPVM configurations to the DPVM static configuration, use the dpvm database copy command.


switch# dpvm database copy active
Legend: “+” New Entry, “-” Missing Entry, “*” Possible Conflict Entry
---------------------------------------------------------------------
-  pwwn  12:33:56:78:90:12:34:56  vsan 100
-  nwwn  14:21:30:12:63:39:72:81  vsan 101

Comparing Database Differences

Compare the DPVM configurations as follows:

  • Use the dpvm database diff active command to compare the active DPVM configuration with the static DPVM configuration.


switch# dpvm database diff active
Legend: “+” New Entry, “-” Missing Entry, “*” Possible Conflict Entry
---------------------------------------------------------------------
-  pwwn  44:22:33:44:55:66:77:88  vsan 44
*  pwwn  11:22:33:44:55:66:77:88  vsan 11
  • Use the dpvm database diff config command to compare the static DPVM configuration with the active DPVM configuration.


switch# dpvm database diff config
Legend: “+” New Entry, “-” Missing Entry, “*” Possible Conflict Entry
---------------------------------------------------------------------
+  pwwn  44:22:33:44:55:66:77:88  vsan 44
*  pwwn  11:22:33:44:55:66:77:88  vsan 22
  • Use the show dpvm pending-diff command (when CFS distribution is enabled) to compare the pending DPVM configuration changes.

Displaying DPVM Merge Status and Statistics

To display the DPVM configuration merge statistics, follow these steps:

Command

Purpose


switch# show dpvm merge statistics 

Displays the DPVM configuration merge statistics.


switch(config)# clear dpvm merge statistics 

switch(config)#

Clears the DPVM configuration merge statistics.

This example shows the conflicts in DPVM configuration merge:


switch# show dpvm merge status
Last Merge Time Stamp     : Fri Aug  8 15:46:36 2008
Last Merge State          : Fail
Last Merge Result         : Fail
Last Merge Failure Reason : DPVM DB conflict found during merge [cfs_status: 76] Last Merge Failure Details: DPVM merge failed due to database conflict
Local Switch WWN          : 20:00:00:0d:ec:24:e5:00
Remote Switch WWN         : 20:00:00:0d:ec:09:d5:c0
 
--------------------------------------------------------------------------
        Conflicting DPVM member(s)                    Loc VSAN   Rem VSAN
--------------------------------------------------------------------------
dev-alias dpvm_dev_alias_1 [21:00:00:04:cf:cf:45:ba]    1313       1414
dev-alias dpvm_dev_alias_2 [21:00:00:04:cf:cf:45:bb]    1313       1414
dev-alias dpvm_dev_alias_3 [21:00:00:04:cf:cf:45:bc]    1313       1414
[Total 3 conflict(s)]
rbadri-excal13#

This example shows the conflicts in DDAS mode:


switch# show dpvm merge status
Last Merge Time Stamp     : Fri Aug  8 15:46:36 2008
Last Merge State          : Fail
Last Merge Result         : Fail
Last Merge Failure Reason : DPVM DB conflict found during merge [cfs_status: 76] Last Merge Failure Details: DPVM merge failed due to DDAS mode conflict
Local Switch WWN          : 20:00:00:0d:ec:24:e5:00
Remote Switch WWN         : 20:00:00:0d:ec:09:d5:c0
Local DDAS mode           : Basic
Remote DDAS mode          : Enhanced

Displaying DPVM Configurations

Use the show dpvm command to display information about WWNs configured on a per VSAN basis (see the following examples).

Displays the DPVM Configuration Status


switch# show dpvm status
DB is activated successfully, auto-learn is on
Displays the DPVM Current Dynamic Ports for the Specified VSAN

switch# show dpvm ports vsan 10
--------------------------------------------------------------
Interface Vsan Device pWWN             Device nWWN
--------------------------------------------------------------
fc1/2     10   29:a0:00:05:30:00:6b:a0 fe:65:00:05:30:00:2b:a0
Displays the DPVM Configuration

switch# show dpvm database
pwwn  11:22:33:44:55:66:77:88  vsan 11
pwwn  22:22:33:44:55:66:77:88  vsan 22
pwwn  33:22:33:44:55:66:77:88  vsan 33
pwwn  44:22:33:44:55:66:77:88  vsan 44
[Total 4 entries]
Displays the DPVM Active Configurations

switch# show dpvm database active
pwwn  11:22:33:44:55:66:77:88  vsan 22
pwwn  22:22:33:44:55:66:77:88  vsan 22
pwwn  33:22:33:44:55:66:77:88  vsan 33
[Total 3 entries]
* is auto-learnt entry
Displays DPVM Configurations

switch# show dpvm database
pwwn  11:22:33:44:55:66:77:88  vsan 11
pwwn  22:22:33:44:55:66:77:88  vsan 22
pwwn  33:22:33:44:55:66:77:88  vsan 33
pwwn  44:22:33:44:55:66:77:88  vsan 44
[Total 4 entries]
Shows Pending Changes with Respect to the DPVM Configurations

switch# show dpvm pending-diff
Legend: “+” New Entry, “-” Missing Entry, “*” Possible Conflict Entry
---------------------------------------------------------------------
+  pwwn  55:22:33:44:55:66:77:88  vsan 55
-  pwwn  11:22:33:44:55:66:77:88  vsan 11
*  pwwn  44:22:33:44:55:66:77:88  vsan 44

Sample DPVM Configuration

To configure a basic DPVM scenario, follow these steps:

Procedure


Step 1

Enable DPVM and enable DPVM distribution.

Example:


switch1# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z. 
switch1(config)# feature dpvm
switch1(config)# end
 
switch1# show dpvm database 
switch1# show dpvm database active 
switch1# show dpvm status 

At this stage, the configuration does not have an active DPVM configuration and the auto-learn option is disabled.

Step 2

Activate a null (empty) configuration so that it can be populated with autolearned entries.

Example:


switch1# configure terminal
 
Enter configuration commands, one per line.  End with CNTL/Z. 
switch1(config)# dpvm activate 
switch1(config)# dpvm commit 
switch1(config)# end
 
switch1# show dpvm database
 
switch1# show dpvm database active
 
switch1# show dpvm status 

At this stage, the database is successfully activated and the auto-learn option continues to be disabled.

Step 3

Enable the auto-learn option and commit the configuration changes.

Example:


switch1# configure terminal
 
Enter configuration commands, one per line.  End with CNTL/Z. 
switch1(config)# dpvm auto-learn 
switch1(config)# dpvm commit 
switch1(config)# end
 
switch1# show dpvm database active 
pwwn 21:00:00:e0:8b:0e:74:8a vsan 4(*) 
pwwn 21:01:00:e0:8b:2e:87:8a vsan 5(*) 
[Total 2 entries] 
* is auto-learnt entry 
switch1# show dpvm ports 
-------------------------------------------------------------- 
Interface   Vsan        Device pWWN       Device nWWN 
-------------------------------------------------------------- 
fc1/24       4   21:00:00:e0:8b:0e:74:8a  20:00:00:e0:8b:0e:74:8a 
fc1/27       5   21:01:00:e0:8b:2e:87:8a  20:01:00:e0:8b:2e:87:8a 
switch1# show flogi database 
--------------------------------------------------------------------------- 
INTERFACE  VSAN    FCID            PORT NAME               NODE NAME      
--------------------------------------------------------------------------- 
fc1/24     4     0xe70100  21:00:00:e0:8b:0e:74:8a  20:00:00:e0:8b:0e:74:8a 
fc1/27     5     0xe80100  21:01:00:e0:8b:2e:87:8a  20:01:00:e0:8b:2e:87:8a 
Total number of flogi = 2. 
switch195# show dpvm status 
DB is activated successfully, auto-learn is on 

At this stage, the currently logged in devices (and their current VSAN assignment) populate the active DPVM configuration. However the entries are not yet permanent in the active DPVM configuration.

The output of the show dpvm ports and the show flogi database commands displays two other devices that have logged in (referred to as switch9 and switch3 in this sample configuration).

Step 4

Access switch9 and issue the following commands:

Example:


switch9# show dpvm database active 
pwwn 21:00:00:e0:8b:0e:87:8a vsan 1(*) 
pwwn 21:01:00:e0:8b:2e:74:8a vsan 1(*) 
[Total 2 entries] 
* is auto-learnt entry 
switch9# show dpvm status 
DB is activated successfully, auto-learn is on 
Step 5

Access switch3 and issue the following commands:

Example:


switch3# show dpvm database active 
pwwn 21:00:00:e0:8b:0e:76:8a vsan 1(*) 
pwwn 21:01:00:e0:8b:2e:76:8a vsan 1(*) 
[Total 2 entries] 
* is auto-learnt entry 
switch3# show dpvm status 
DB is activated successfully, auto-learn is on 
Step 6

Disable autolearning in switch1 and commit the configuration changes.

Example:


switch1# configure terminal
 
Enter configuration commands, one per line.  End with CNTL/Z. 
switch1(config)# no dpvm auto-learn 
switch1(config)# dpvm commit 
switch1(config)# end
 
switch1# show dpvm status 
DB is activated successfully, auto-learn is off 
switch1# show dpvm database active 
pwwn 21:00:00:e0:8b:0e:74:8a vsan 4 
pwwn 21:01:00:e0:8b:2e:87:8a vsan 5 
pwwn 21:00:00:e0:8b:0e:87:8a vsan 1 
pwwn 21:01:00:e0:8b:2e:74:8a vsan 1 
pwwn 21:00:00:e0:8b:0e:76:8a vsan 1 
pwwn 21:01:00:e0:8b:2e:76:8a vsan 1 
[Total 6 entries] 
* is auto-learnt entry 
switch1# show dpvm status 
DB is activated successfully, auto-learn is off 

At this stage, the autolearned entries are made permanent in the active DPVM configuration.

Step 7

Access switch9 and issue the following commands:

Example:


switch9# show dpvm database active 
pwwn 21:00:00:e0:8b:0e:87:8a vsan 1 
pwwn 21:01:00:e0:8b:2e:74:8a vsan 1 
pwwn 21:00:00:e0:8b:0e:76:8a vsan 1 
pwwn 21:01:00:e0:8b:2e:76:8a vsan 1 
pwwn 21:00:00:e0:8b:0e:74:8a vsan 4 
pwwn 21:01:00:e0:8b:2e:87:8a vsan 5 
[Total 6 entries] 
* is auto-learnt entry 
switch9# show dpvm status 
DB is activated successfully, auto-learn is off 
Step 8

Access switch3 and issue the following commands:

Example:


switch3# show dpvm database active 
pwwn 21:00:00:e0:8b:0e:76:8a vsan 1 
pwwn 21:01:00:e0:8b:2e:76:8a vsan 1 
pwwn 21:00:00:e0:8b:0e:87:8a vsan 1 
pwwn 21:01:00:e0:8b:2e:74:8a vsan 1 
pwwn 21:00:00:e0:8b:0e:74:8a vsan 4 
pwwn 21:01:00:e0:8b:2e:87:8a vsan 5 
[Total 6 entries] 
* is auto-learnt entry 
switch3# show dpvm status 
DB is activated successfully, auto-learn is off 
Note 
These basic steps help you determine that the information is identical in all the switches in the fabric.

You have now configured a basic DPVM scenario in a Cisco MDS 9000 Series switch.


Default Settings

Table 1 lists the default settings for DPVM parameters.

Table 1. Default DPVM Parameters

Parameters

Default

DPVM

Disabled.

DPVM distribution

Enabled.

Autolearn

Disabled.