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 Chapter2, “Configuring and Managing VSANs”
DPVM configurations are based on port world wide name (pWWN) and node world wide name (nWWN) assignments. A DPVM database contains mapping information for each device pWWN/nWWN assignment and the corresponding VSAN. The Cisco NX-OS software checks the database 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 Family 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 Family 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).
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:
|
|
|
Step 1 |
switch# config t switch(config)# |
Enters configuration mode. |
Step 2 |
switch(config)# feature dpvm |
Enables DPVM on that switch. |
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.
About DPVM Databases
The DPVM database 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.
The DPVM feature uses three databases to accept and implement configurations.
- Configuration (config) database—All configuration changes are stored in the configuration database when distribution is disabled.
- Active database—The database currently enforced by the fabric.
- Pending database—All configuration changes are stored in the DPVM pending database when distribution is enabled (see the “DPVM Database Distribution” section).
Changes to the DPVM config database are not reflected in the active DPVM database until you activate the DPVM config database. Changes to the DPVM pending database are not reflected in the config or active DPVM database until you commit the DPVM pending database. This database structure allows you to create multiple entries, review changes, and let the DPVM config and pending databases take effect.
Configuring DPVM Config and Pending Databases
To create and populate the DPVM config and pending databases, follow these steps:
|
|
|
Step 1 |
switch# config t switch(config)# |
Enters configuration mode. |
Step 2 |
switch(config)# device-alias mode enhanced switch(config)# device-alias commit |
Enables enhanced device alias mode. This is required for device-alias configuration in the DPVM database. |
Step 3 |
switch(config)# dpvm database switch(config-dpvm-db)# |
Creates the DPVM config database. |
switch(config)# no dpvm database |
Deletes the DPVM config database. |
Step 4 |
switch(config-dpvm-db)# pwwn 12:33:56:78:90:12:34:56 vsan 100 |
Maps the specified device pWWN to VSAN 100. |
switch(config-dpvm-db)# no pwwn 12:33:56:78:90:12:34:56 vsan 101 |
Removes the specified device pWWN mapping from the DPVM config database. |
Step 5 |
switch(config-dpvm-db)# nwwn 14:21:30:12:63:39:72:81 vsan 101 |
Maps the specified device nWWN to VSAN 101. |
switch(config-dpvm-db)# no nwwn 14:21:30:12:63:39:72:80 vsan 101 |
Removes the specified device nWWN mapping from the DPVM config database. |
Step 6 |
switch(config-dpvm-db)# device-alias device1 vsan 102 |
Maps the specified device-alias to VSAN 102. |
switch(config-dpvm-db)# no device-alias device1 vsan 102 |
Removes the specified device-alias mapping from the DPVM config database. |
Activating DPVM Config Databases
When you explicitly activate the DPVM config database, the DPVM config database becomes the active DPVM database. Activation may fail if conflicting entries are found between the DPVM config database and the currently active DPVM database. However, you can force activation to override conflicting entries.
To disable DPVM, you must explicitly deactivate the currently active DPVM database by issuing the no dpvm activate command.
To activate the DPVM config database, follow these steps:
|
|
|
Step 1 |
switch# config t switch(config)# |
Enters configuration mode. |
Step 2 |
switch(config)# dpvm activate |
Activates the DPVM config database. |
switch(config)# no dpvm activate |
Deactivates the currently active DPVM database. |
switch(config)# dpvm activate force |
Forcefully activates the DPVM config database to override conflicting entries. |
About Autolearned Entries
The DPVM database can be configured to automatically learn (autolearn) about new devices within each VSAN. The autolearn feature can be enabled or disabled at any time. Learned entries are created by populating device pWWNs and VSANs in the active DPVM database. The active DPVM database should already be available to enable autolearn.
You can delete any learned entry from the active DPVM database when you enable autolearn. These entries only become permanent in the active DPVM database when you disable autolearn.
Note Autolearning 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, that entry is automatically deleted from the active DPVM database.
- 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 Autolearning
To enable autolearning, follow these steps:
|
|
|
Step 1 |
switch# config t switch(config)# |
Enters configuration mode. |
Step 2 |
switch(config)# dpvm auto-learn |
Enables learning on this switch. |
switch(config)# no dpvm auto-learn |
Disables (default) learning on this switch. |
switch(config)# clear dpvm auto-learn |
Clears the list of auto-learned entries. |
switch(config)# clear dpvm auto-learn pwwn pwwn |
Clears the list of auto-learned pWWN entries in the distributed DPVM database. |
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.
DPVM Database Distribution
If the DPVM database 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 Family NX-OS System Management Configuration Guide).
This section describes how to distribute the DPVM database and includes the following topics:
About DPVM Database Distribution
Using the CFS infrastructure, each DPVM server learns the DPVM database from each of its neighboring switches during the ISL bring-up process. If you change the database locally, the DPVM server notifies its neighboring switches, and that database is updated by all switches in the fabric.
If fabric distribution is enabled, all changes to the configuration database are stored in the DPVM pending database. These changes include the following tasks:
- Adding, deleting, or modifying database entries.
- Activating, deactivating, or deleting the configuration database.
- Enabling or disabling autolearning.
These changes are distributed to all switches in a fabric when you commit the changes. You can also discard (abort) the changes at this point.
Tip You can view the contents of the DPVM pending database by issuing the show dpvm pending command.
Disabling DPVM Database Distribution
To disable DPVM database distribution to the neighboring switches, follow these steps:
|
|
|
Step 1 |
switch# config t switch(config)# |
Enters configuration mode. |
Step 2 |
switch(config)# no dpvm distribute |
Disables DPVM distribution to the neighboring switches. |
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 pending database and locks the feature in the fabric. Once you lock the fabric, the following conditions apply:
- No other user can make any configuration changes to this feature.
- A copy of the configuration database becomes the DPVM pending database. Modifications from this point on are made to the DPVM pending database. The DPVM pending database remains in effect until you commit the modifications to the DPVM pending database or discard (abort) the changes to the DPVM pending database.
Locking the Fabric
To lock the fabric and apply changes to the DPVM pending database, follow these steps:
|
|
|
Step 1 |
switch# config t switch(config)# |
Enters configuration mode. |
Step 2 |
switch(config)# dpvm database switch(config-dpvm-db)# |
Accesses the DPVM config database. |
Step 3 |
switch(config-dpvm-db)# pwwn 11:22:33:44:55:66:77:88 vsan 11 |
Adds one entry to the DPVM config database. |
Step 4 |
switch(config-dpvm-db)# exit switch(config)# |
Exits to configuration mode. |
Step 5 |
switch(config)# dpvm activate |
Activates the DPVM config database. |
Committing Changes
If you commit the changes made to the configuration, the configuration in the DPVM pending database are distributed to other switches. On a successful commit, the configuration change is applied throughout the fabric and the lock is released.
To commit the DPVM pending database, follow these steps:
|
|
|
Step 1 |
switch# config t switch(config)# |
Enters configuration mode. |
Step 2 |
switch(config)# dpvm commit |
Commits the database entries that are currently in the DPVM pending database. |
Discarding Changes
If you discard (abort) the changes made to the DPVM pending database, the configurations remain unaffected and the lock is released.
To discard the DPVM pending database, follow these steps:
|
|
|
Step 1 |
switch# config t switch(config)# |
Enters configuration mode. |
Step 2 |
switch(config)# dpvm abort |
Discards the database entries that are currently in the DPVM pending database. |
Clearing a Locked Session
If you have performed a DPVM task and have forgotten to release the lock by either committing or discarding the changes, an administrator can release the lock from any switch in the fabric. If the administrator performs this task, your changes to the DPVM pending database are discarded and the fabric lock is released.
Tip The DPVM pending database is only available in the volatile directory and is subject to being discarded if 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
Database Merge Guidelines
A database merge refers to a union of the configuration database and static (unlearned) entries in the active DPVM database. 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 database does not exceed 16 K.
Caution
If you do not follow these two conditions, the merge will fail. The next distribution will forcefully synchronize the databases and the activation states in the fabric.
This section describes how to merge DPVM databases and includes the following topics:
About Copying DPVM Databases
The following circumstances may require the active DPVM database to be copied to the DPVM config database:
- If the learned entries are only added to the active DPVM database.
- If the DPVM config database or entries in the DPVM config database are accidently deleted.
Note If you copy the DPVM database and fabric distribution is enabled, you must commit the changes.
Copying DPVM Databases
To copy the currently active DPVM database to the DPVM config database, 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
You can compare the DPVM databases as follows:
- Use the dpvm database diff active command to compare the active DPVM database with the DPVM config database.
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 DPVM config database with the active DPVM database.
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 DPVM pending database with the DPVM config database.
To add pending database entries to the DPVM config database, follow these steps:
|
|
|
Step 1 |
switch# config t switch(config)# |
Enters configuration mode. |
Step 2 |
switch(config)# dpvm distribute |
Enables CFS distribution. |
Step 3 |
switch(config)# dpvm database |
Accesses the DPVM config database. |
Step 4 |
switch(config-dpvm-db)# pwwn 44:22:33:44:55:66:77:88 vsan 55 switch(config-dpvm-db)# pwwn 55:22:33:44:55:66:77:88 vsan 55 |
Adds two entries to the DPVM config database. |
Displaying DPVM Merge Status and Statistics
To display the DPVM databases merge statistics, follow these steps:
|
|
switch# show dpvm merge statistics switch(config)# |
Displays the DPVM databases merge statistics. |
switch(config)# clear dpvm merge statistics switch(config)# |
Clears the DPVM databases merge statistics. |
This example shows the conflicts in DPVM databases merge:
switch# show dpvm merge status
Last Merge Time Stamp : Fri Aug 8 15:46:36 2008
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
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 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
Remote DDAS mode : Enhanced
Displaying DPVM Configurations
Use the show dpvm command to display information about WWNs configured on a per VSAN basis (see Examples 3-1 to 3-6 ).
Example 3-1 Displays the DPVM Configuration Status
DB is activated successfully, auto-learn is on
Example 3-2 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
Example 3-3 Displays the DPVM Config Database
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
Example 3-4 Displays the DPVM Database
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
Example 3-5 Displays DPVM Config Database
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
Example 3-6 Compares Pending Database with the DPVM Config Database
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:
Step 1 Enable DPVM and enable DPVM distribution.
Enter configuration commands, one per line. End with CNTL/Z.
switch1(config)# feature dpvm
switch1# show dpvm database
switch1# show dpvm database active
switch1# show dpvm status
At this stage, the configuration does not have an active DPVM database and the auto-learn option is disabled.
Step 2 Activate a null (empty) database so it can be populated with autolearned entries.
Enter configuration commands, one per line. End with CNTL/Z.
switch1(config)# dpvm activate
switch1(config)# dpvm commit
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.
Enter configuration commands, one per line. End with CNTL/Z.
switch1(config)# dpvm auto-learn
switch1(config)# dpvm commit
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(*)
--------------------------------------------------------------
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 database. However the entries are not yet permanent in the active DPVM database.
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:
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(*)
switch9# show dpvm status
DB is activated successfully, auto-learn is on
Step 5 Access switch3 and issue the following commands:
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(*)
switch3# show dpvm status
DB is activated successfully, auto-learn is on
Step 6 Disable autolearning in switch1 and commit the configuration changes.
Enter configuration commands, one per line. End with CNTL/Z.
switch1(config)# no dpvm auto-learn
switch1(config)# dpvm commit
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
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 database.
Step 7 Access switch9 and issue the following commands:
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
switch9# show dpvm status
DB is activated successfully, auto-learn is off
Step 8 Access switch3 and issue the following commands:
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
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 Family switch.
Default Settings
Table 3-1 lists the default settings for DPVM parameters.
Table 3-1 Default DPVM Parameters
|
|
DPVM |
Disabled. |
DPVM distribution |
Enabled. |
Autolearning |
Disabled. |