VLAN conversion

Network Administration Guide for Hitachi NAS Platform

Part Number

Previously, VLANs were configured by defining an association between a VLAN ID and a subnet (using a network address and a subnet mask). It is no longer possible to create subnet VLANS. This topic describes how to convert subnet-VLANs to use VLAN interfaces. Seek guidance from your support provider before attempting the conversion procedure.

The subnet VLANs are maintained by the vlan command. This command enables the NAS server to display and remove existing subnet VLANs. However, a script is also available to convert legacy subnet-based VLANs to the new static VLANs. The following procedure describes how to run the script and convert the VLANs.

The procedure has three stages:

  • Accessing the NAS Linux console
  • Retrieving and running the script
  • Converting a subnet VLAN

Accessing the NAS Linux console

The script does not run under the NAS CLI but is available on the NAS platform (from version 12.2), through the Linux console.

To access the NAS Linux console:

  1. SSH to the SMU IP address
  2. Enter q to drop to the operating system prompt of the SMU
  3. Enter ssh manager@<cluster node ip>
  4. Enter the password.
  5. Enter exit
  6. Enter su
  7. Enter the password.

Retrieving and running the script

On the NAS Linux console, the script is located at: /opt/mercury-utils/bin/vlan-convert-config.rb.

To obtain the script (from a NAS server named xyz) and copy it onto a local Linux client, enter the following command:

# scp manager@xyz:/opt/mercury-utils/bin/vlan-convert-config.rb .
manager@xyz's password:
vlan-convert-config.rb              00%   23KB  22.9KB/s   00:00

Either on the NAS Linux console or a local Linux client, run the script with the following parameters:

vlan-convert-config.rb [--user <user>] [--password <password>] <HNAS-server>
  • user <user> is the username required to access the server
  • password <password> is the password required to access the server
  • <hnas-server> is the hostname or address of the NAS server
Note: If the user option is supplied without a corresponding password, the script prompts for the password without displaying the entered text.

On the NAS Linux console only

When executing the script on the NAS Linux console, the name localhost can be used to identify the NAS server. In this case it is normally not necessary to supply the username and password.

For example:

/opt/mercury-utils/bin/vlan-convert-config.rb localhost > /tmp/vlan-conv-commands

Converting a subnet VLAN

The script outputs the commands to run in order to perform the conversion. Review these changes before applying them to the system by running the following command:

cat /tmp/vlan-conv-commands

Apply the generated commands to the NAS by running the following command:

source /tmp/vlan-conv-commands

Keep a copy of the script output for reference in case a downgrade to a version of firmware below 12.0 is required, as this information is necessary in order to convert back.