Tuesday, July 13, 2021

SAN topology

 

Multi-PATH SAN topology

 

 

 

$ cat hbainfo
#!/bin/bash
for hosts in $(ls -ld /sys/class/fc_host/host* 2>/dev/null); do
  printf "%-26s %-8s %-20s %-ls\n" "$HOST" "$(cat $HOST/speed)" "$(cat $HOST/port_name)" "$(cat $HOST/port_state)"
done

 

SAN administration
1. Setting up a new server on SAN
a. Connect the server HBA ports to all SAN switches (make a note of ports used)
b. Run hbainfo script on the server to verify connectivity and get the WWN addresses
c. Login to each SAN switch and perform the following:
 i. Locate the connection on the switch:
   $ switchshow | grep "aa:bb" # aa:bb = last four characters of the WWN
 ii. Create an alias for the server connection
   $ alicreate SERVER_X_Y, "1,27" # X_Y = HBA port designation (may be?); 1 = Domain Switch number (from fabricshow); 27 = port number from above step
  iii. Zone the server connection to the storage:
   $ zomecreate SERVER00, "SERVER_X_Y; DISK_ALIAS1; DISK_ALIAS2"
   # You can get disk alias by running "zoneshow *" and finding a similar server's zone.
  iv. Repeat the above 3 steps for each connection on that switch
  v. Get the active switch config name
    $ cfgactiveshow | grep cfg # should be opsPlusTest
  vi. Add the zones to the active config
    $ cfgadd OpsPlusTest, "SERVER00; SERVER02" # List all zones created above
  vii. Apply the new config
  $ cfgenable OpsPlysTest # Answer "Y" to the prompt to make it active
d. Now, the server and storage can talk to each other.

2. Removing a server from SAN

a. Make sure all storage is unmounted, the multipath devices are removed, and the LUN's unallocated from the server.

b. Login to each SAN switch and perform the following:
 i. Get the zone names for the server:
    $ zoneshow *SERVER*
  ii. Delete each zone
    $ zonedelete <ZONENAME>
  iii. Get the alias name for the server
    $ alishow *SERVER*
  iv. Delete each alias:
    $ alidelete ALIAS_NAME
  v. Get the active switch config name:
    $ cfgactvshow | grep cfs
  Note: Output should be OpsPlusTest
  vi. Remove all zones (deleted above) from the config.
   $ cfgremove OpsPlysTest, "ZONENAME1; ZONENAME2"
  vii. Apply the new config.
   $ cfgenable OpsPlusTest
    # Answer 'Yes' to the prompt to make it active.

c. Now, you can disconnect the server from the SAN

No comments:

Post a Comment

Git branch show detached HEAD

  Git branch show detached HEAD 1. List your branch $ git branch * (HEAD detached at f219e03)   00 2. Run re-set hard $ git reset --hard 3. ...