Fibre Channel (SAN)

Reply
N/A
Posts: 1
Registered: ‎06-25-2008

CLI zoning

I have over 50 zones to remove from an active zoneset. Doing this task through EFCM is quite painful. Has anyone scripted such a task with the cli?

EFCM 9.7

2 fabrics

New Contributor
Posts: 3
Registered: ‎08-11-2008

Re: CLI zoning

I'm in a very similar position.  I'll be removing zones, and adding about 100 zones, so I'm looking, too.  Hopefully we'll find something!

New Contributor
Posts: 2
Registered: ‎08-27-2008

Re: CLI zoning

"zonehelp" at cmdprompt will give you the commands you need to know for zone scripting.

with "help <command>" you will get the syntax and the description of the command.

I like to build to commands in an external scripting cli (windows shell or linux bash) and then simply paste it into the cli of the switch.

if you build the zonenames on rules for e.g. "<servername>_<hba.nbr.>_<storagesystem>_<storageproc>" it is white easier to do such work.

example:

get a list of zones: zoneshow | grep zone:

copy the output into the notepad or excel, or into a textfile and remove the left field

append zonedelete on each line, paste it into the switch cli, be happy....

BR

mpi

New Contributor
Posts: 2
Registered: ‎08-27-2008

Re: CLI zoning

<<duplicate post>>

New Contributor
Posts: 3
Registered: ‎08-11-2008

Re: CLI zoning

Thanks Manfred - That doesn't answer the question, but it does provide great knowledge for those who need it.

I will be using expect scripts to do the zoning on Linux.  I have installed the expect package on a linux machine, and have tested a modified version of the sample script in wikipedia.  Remember to get the prompt correct.  For the Brocade 4900, it's "switchname login:>".  I also needed to add a sleep of 10 seconds to telnet into the switch.

Adam

Occasional Contributor
Posts: 19
Registered: ‎01-12-2009

Re: CLI zoning

You could export the config, modify it then import it.  That is how I recently migrated my zones from a McData switch to a Brocade.

New Contributor
Posts: 3
Registered: ‎08-11-2008

Re: CLI zoning

How do I export/import the config?

Occasional Contributor
Posts: 19
Registered: ‎01-12-2009

Re: CLI zoning

Commands are ran from the switch's perspective.  The command is configupload.

configupload Usage:
configupload ]
Options:
-h     Help. Prints this help information.
-p     Protocol to use for upload. Valid options are <ftp|scp>
-ftp   upload using FTP Protocol. Alternate for "-p ftp"
-scp   upload using SCP Protocol. Alternate for "-p scp"
-local upload using local file specified via <filename>
-USB   upload local file from an attached USB device.
-U     Same as -USB above.
-force Overwrite config file if it exists. Use with -local
Run this command without arguments for interactive mode.

Examples:
  configupload (defaults to interactive mode)
  configupload -p ftp | -ftp ]
  configupload -p scp | -scp
  configupload -local|-USB|-U

If <path> is not specified then config filename defaults to config.txt.
Otherwise the specified path is used as is. Examples:
  /usr/home/myconfig.txt (config file is /usr/home/myconfig.txt)
  (path is default path on FTP server and filename defaults to config.txt)

Contributor
Posts: 33
Registered: ‎08-15-2007

Re: CLI zoning

I am with Manfred on this.   It is easy to get all the commands prepared in a txt file and then just log on to a switch on the san using putty and just drop the commands in.  Using a separate Linux sever seems like adding an extra layer.  You can retain the output from the putty session easily enough.  I would usually advise just double checking that the commands were accepted before you enter the cfgenable.

Once the zoning is complete we like to capture the entire config by just doing an "alishow" and then saving this as a .txt file - this can often be useful for reference.

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.

vADC is now Pulse Secure
Download FREE NVMe eBook