Tuesday, 11 July 2017

Fabric OS - Getting Started

 

Installation

Prereqs: rack, power, cabling, management vlan, IP, gateway, DNS domain, NTP server and SMTP server. Install physical device.

Configure the switch using a serial connection (eg. tip hardwire, or tip /dev/ttyb -9600, or ttya). Login with admin / password.

# Set a new admin password, set the hostname, IP, netmask and gateway (optional ipv6):
$ passwd 
$ switchname
$ ipaddrset

# Set the current date, timezone and specify NTP server:
$ date "mmddHHMMyy"
$ tstimezone AU/Brisbane 	(or tstimezone --interactive)
$ tsclockserver "x.x.x.x"

# Configure SNMP community, report and add licenses (refer to vendor, eg. https://my.brocade.com/wps/myportal):
$ snmpconfig 
$ licenseshow 
$ licenseadd 

# Configure a login message; reboot and verify our settings are persistent:
$ bannershow 
$ bannerset 
$ reboot

Check access via WebTools (http://switch-IP) in browser or java web app.

Remote Access

# Remote access can be passwordless, for example:
$ userconfig --add reports -d "Reporting user" –p secret5 -r user
$ sshutil importpubkey
Enter user name for whom key is imported:reports
Enter IP address:192.168.10.10
Enter remote directory:/home/ansible/.ssh
Enter public key name(must have .pub suffix):id_rsa.pub
Enter login name:ansible
ansible@192.168.10.18's password:
public key is imported successfully.

# Reporting example, show ports and NPIV WWNs,
$ ssh reports@sw1 "switchshow"
$ for i in `ssh reports@sw1 switchshow | grep NPIV | awk '{print $1}' | xargs`; do
  ssh reports@sw1 "portshow $i" | grep ":" | grep -v ^[a-zA-Z0-9]
  done
  
* Node Port Virtualization (NPIV) is enabled by default

Firmware Update

# In FOS, prepare staging area, list versions
$ cleanup
$ firmwareshow
$ version

# Extract the firmware update to homedir on a linux system,
$ cd /tmp/fos/
$ tar xzf v7.4.1d.tar.gz

# In FOS, sFTP backup the config, save support data and clear the staging area,
$ configupload
$ supportSave
$ errClear 

# In FOS, update the switch (download from linux, commit, HA apply..)
$ firmwareDownload

Note: >= 2 versions different requires single-mode, firmwareDownload -s

Example:

Server Name or IP Address: 192.168.10.10
User Name: admin
File Name: /home/ansible/v7.4.0/v7.4.0
Network Protocol(1-auto-select, 2-FTP, 3-SCP, 4-SFTP) [1]: 4
Verifying if the public key authentication is available.Please wait ...
The public key authentication is not available.
Password:
Server IP: 192.168.10.10, Protocol IPv4
Do Auto-Commit after Reboot [Y]: Y
Reboot system after download [N]: Y
Checking system settings for firmwaredownload...

Issue the reboot if required, and re-check the active version. Takes some time to HA apply the update.

FabricOS Zoning

# Run fibre cables connecting array<->switch, and host<->switch. Review HBA WWN, eg. Solaris,
$ luxadm -e port
$ fcinfo hba-port

# Login to FabricOS, review switch port status, speed etc. Can also use WebTools for this, and to set the port speed.
$ switchshow
$ portshow 10

# Review existing aliases, zones, and live zoneset
$ zoneshow

# Create WWN aliases, then a new host-array zone
$ alicreate array1_0a,"50:01:00:2f:3g:31:5a:1f"
$ alicreate solaris1_p1,"21:01:00:1b:32:38:7d:21"
$ zonecreate solaris1_array1,"solaris1_p1 ; array1_0a"
* Note: can group a bunch of hosts with an array port in a single zone, or separate them.
# Add new zone to live zoneset, save changes, activate zoneset,
$ cfgadd LiveSet1, solaris1_array1
$ cfgsave
$ cfgenable LiveSet1

* Can also use WebTools (http://fabricos/) to add, modify and rename items.

# Enable Solaris multipathing as follows,
$ stmsboot -D fp -e
$ reboot
 
 

Thursday, 13 October 2016

Automated Solaris explorer capture and upload


Many companies have a large investment in Oracle servers running Solaris, and it's important to be proactive about maintenance on these assets.

The Oracle Solaris explorer software gathers system diagnostic data and creates an archive suitable for Oracle support analysis. Some very handy reports become available when this is automated. Here are the steps I follow to configure the settings for a physical asset, then automate the data collection and delivery.

Solaris 11

1) Install explorer from IPS

$ pkg install support/explorer

2) Configure Diagnostic Assistance (DA) with MOS creds, proxy server, etc.

$ cd /usr/lib/rda/da
$ ./da.sh setupmos
$ cat /etc/explorer/default/explorer


3) Configure explorer defaults, using DA and cron schedule,

$ explorer -g
$ crontab -l | grep explo


4) Run explorer, then check it was delivered to Oracle (MOS, Proactive analysis)

$ explorer -P -q
$ ls -l /var/explorer/output


5) If necessary, re-send the latest explorer using the DA settings; alternately specify the ftp or http delivery path,

$ explorer -N -T DA


Solaris 10

1) Ensure we have explorer installed, or download from Oracle,

$ pkginfo SUNWexplo
2) Configure Diagnostic Assistance (DA) with MOS creds, proxy server, etc.

$ cd /usr/lib/rda/da
$ ./da.sh setupmos


3) Configure explorer defaults, using DA and cron schedule

$ /opt/SUNWexplo/bin/explorer -g
$ crontab -l | grep explo


4) Run explorer, then check delivery in MOS (Proactive analysis),

$ /opt/SUNWexplo/bin/explorer -q -P
$ ls -l /opt/SUNWexplo/output


5) If necessary, re-send the latest explorer using the DA settings; alternately specify the ftp or http delivery path,

$ explorer -N -T DA

Review time

Going forward, regularly check the proactive analysis pages and keep these precious systems healthy.

Tuesday, 2 September 2014

I created some pages for reference, handy examples for the Solaris Unix admin.