Common commands of SAN switches

foreword

Commonly used switch commands at work, here is a small summary, and I hope it will be useful to you and me

1. Basic commands

Order Basic instructions
switchStatusShow View the health status of the switch
switchShow View basic switch configuration information
portShow View switch port status
tempShow Check the ambient temperature of the switch
supportShow Display switch diagnostic and status information
cfgshow Display switch configuration information
aliashow view aliases
fanShow Viewing the Status of the Cooling Fans of a Switch
psShow Check the switch power status
errDump Check the log of the running process of the switch
errShow View the switch error log
errClear clear switch logs
supportSave Save switch information to FTP server
pdShow Display panic dump file content
nsShow Show all devices connected to the switch
nsAllShow Show all devices connected to Fabric
fabricShow Show all switches in the Fabric
licenseShow View the switch license file
wwn View the WWN number of the switch
version Check the version number of the switch
haShow View the status of the Control Blade
slotShow View the status of each Blade
uptime Display switch working hours
ipaddrshow Display switch IP address information
memshow View memory information (more than 80% should pay attention)

2. Practical operation

2.1 Modify Domain ID

Specific steps are as follows:

  1. By viewing the Domain ID of the switch, mainly through fabricShow
    the Switch ID in the output result includes the switch ID
  2. Turn off the switch:swichDisable
  3. Configuration ID:configure
  4. Reboot the switch:swichEnable

2.2 Aliases

The specific command format is as follows:

alicreate “别名”,“DomainID,端口号;DomainID,端口号”

(Save every time)

  • An example of creating an alias (via aliCreateand cfgSavecommand)
    is as follows: alicreate "loop", "1,3", then savecfgSave

  • An example of adding members to an alias (via aliAddand cfgSavecommand) is as follows: , then save
    aliAdd "loop", "1,3"cfgSave

  • An example of deleting a member from an alias (via aliRemoveand cfgSavecommand) is as follows: , then save
    aliRemove "loop", "1,3"cfgSave

  • Remove the alias: alidelete "loop", after doingcfgSave

  • View the aliases in the configuration:alishow "loop*"

2.3 Zone

A zone can be in different zone configurations (similar to collections). If the zone configuration takes effect, all zones belonging to the collection will take effect

(Save every time)

  • Create zone: zonecreate "redzone", "1,2; 2,33; 2,34", zonecreate "greenzone","1,2"proceedcfgsave
  • Add equipment: zoneadd "redzone", "1,3", carry outcfgsave
  • Delete device: zoneremove "redzone", "2,34", proceedcfgsave
  • Delete zone: zonedelete "redzone", proceed cfgsave(I didn’t delete it here)

  • Create zone configuration: cfgcreate "NEW_xx", "redzone; greenzone", proceedcfgsave
  • Add zone to configuration members: cfgadd "newxx", "redzone", carry outcfgsave
  • Delete zone in the configuration member: cfgremove "newxx", "redzone", proceedcfgsave
  • Delete the zone configuration: cfgdelete "testcfg", proceedcfgsave
  • Undo to cfgsavethe state of the last execution:cfgtransabort

Finally don't forget to activate:cfgenable “cgfname”

Guess you like

Origin blog.csdn.net/weixin_47872288/article/details/131640611