Friday, March 27, 2015

NetApp To Isilon Migrations








Isilon provides a built-in NDMP NetApp to Isilon utility called isi_vol_copy.  This enables admins to directly migrate a NetApp volume/qtree to an Isilon Folder.  

1. Confirm NDMP is configured and Running on the data source NetApp Filer.

      a.       Check NDMP current status
             ndmpd status
      b.      Enable NDMP
            ndmpd on

2. Confirm NDMP is configured on the Isilon Cluster. 

isi services ndmpd status

3. Run the isi_vol_copy command to copy a Volume or Qtree to a target folder on the Isilon:

Usage:  isi_vol_copy <src_filer>:<src_dir> <dest_dir>
                 [-sa user: | user:password]
                 [-sport ndmp_src_port]
                 [-full | -incr]
                 [-dhost dest_ip_addr]
                 [-h]

e.g. # isi_vol_copy Filer1:/vol/source_vol /ifs/migration -sa root:xxxxxx –full

LogMessage {type NDMP_LOG_NORMAL} {msg_id 1} {msg DUMP: creating "/vol/source_vol/../snapshot_for_backup.28" snapshot.} {associated_msg 0} {associated_msg_seq 0}
LogMessage {type NDMP_LOG_NORMAL} {msg_id 2} {msg DUMP: Using Full Volume Dump} {associated_msg 0} {associated_msg_seq 0}
LogMessage {type NDMP_LOG_NORMAL} {msg_id 3} {msg DUMP: Date of this level 0 dump: Wed Feb 11 11:47:28 2015.} {associated_msg 0} {associated_msg_seq 0}
LogMessage {type NDMP_LOG_NORMAL} {msg_id 4} {msg DUMP: Date of last level 0 dump: the epoch.} {associated_msg 0} {associated_msg_seq 0}
LogMessage {type NDMP_LOG_NORMAL} {msg_id 5} {msg DUMP: Dumping /vol/source_vol to NDMP connection} {associated_msg 0} {associated_msg_seq 0}
LogMessage {type NDMP_LOG_NORMAL} {msg_id 6} {msg DUMP: mapping (Pass I)[regular files]} {associated_msg 0} {associated_msg_seq 0}
LogMessage {type NDMP_LOG_NORMAL} {msg_id 7} {msg DUMP: mapping (Pass II)[directories]} {associated_msg 0} {associated_msg_seq 0}
LogMessage {type NDMP_LOG_NORMAL} {msg_id 8} {msg DUMP: estimated 402939 KB.} {associated_msg 0} {associated_msg_seq 0}
LogMessage {type NDMP_LOG_NORMAL} {msg_id 9} {msg DUMP: dumping (Pass III) [directories]} {associated_msg 0} {associated_msg_seq 0}
LogMessage {type NDMP_LOG_NORMAL} {msg_id 10} {msg DUMP: dumping (Pass IV) [regular files]} {associated_msg 0} {associated_msg_seq 0}
LogMessage {type NDMP_LOG_NORMAL} {msg_id 11} {msg ACL_START is '512692480'} {associated_msg 0} {associated_msg_seq 0}
LogMessage {type NDMP_LOG_NORMAL} {msg_id 12} {msg DUMP: dumping (Pass V) [ACLs]} {associated_msg 0} {associated_msg_seq 0}
LogMessage {type NDMP_LOG_NORMAL} {msg_id 13} {msg DUMP: 708016 KB} {associated_msg 0} {associated_msg_seq 0}
LogMessage {type NDMP_LOG_NORMAL} {msg_id 14} {msg DUMP: DUMP IS DONE} {associated_msg 0} {associated_msg_seq 0}
LogMessage {type NDMP_LOG_NORMAL} {msg_id 15} {msg DUMP: Deleting "/vol/source_vol/../snapshot_for_backup.28" snapshot.} {associated_msg 0} {associated_msg_seq 0}
LogMessage {type NDMP_LOG_NORMAL} {msg_id 16} {msg DUMP_DATE is '567890354'} {associated_msg 0} {associated_msg_seq 0}
The transfer is complete.
Elapsed time: 0 hours, 10 minutes, 9 seconds.


Happy Learning!

Monday, March 16, 2015

Isilon Health Check Script











Thrive in what all you do... Okay i'm not writing any spiritual article here ;)

Actually i was tired of running manual commands on array to check the status on daily basis, which encouraged me to write a small health check script. I believe that's why man made the machine :-D

Anyways.. below is the script which does couple of tasks:
  • Check the overall status of the cluster
  • Mail the output to my e-mail id
In case you have a large setup then you can schedule it via cron or autosys as well...

Script::

#####################################################
#
# Script: To perform the health check on Isilon Array
# DATE: 2015-03-15              
#
# Version Update: 1.0 Piyush Chawla            
#    
#####################################################


TODAY=$(date)
HOST=$(hostname)
sleep 15

#Move yesterday’s backups to an archive location
mv /ifs/pc1611/*.txt /ifs/pc1611/archive/

echo “-----------------------------” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “Date: $TODAY  Host: $HOST” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “-----------------------------” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
# To check the Isilon array health status
/usr/bin/isi status -q >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “-----------------------------” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo "Event List"
/usr/bin/isi event list | tail -10 >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “-----------------------------” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “SyncIQ Report” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “-----------------------------” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
# To check the SyncIQ status
/usr/bin/isi sync reports list >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “-----------------------------” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “File System Utilization” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “-----------------------------” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
# To check the file system utilization
df -kh -a /ifs >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo ”-----------------------------” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
/usr/bin/isi storagepool list >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “-----------------------------” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “Deduplication status” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “-----------------------------” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
# To check the deduplication status
/usr/bin/isi dedupe stats  >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “-----------------------------” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
# To check the performance status
echo “Performance stats” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “-----------------------------” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
sleep 1
echo ”  ” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “–System Stats–” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo ”  ” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
/usr/bin/isi statistics system  >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
sleep 1
echo ”  ” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “–Client Stats–” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo ”  ” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
/usr/bin/isi statistics client  >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
sleep 1
echo ”  ” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “–Protocol Stats–” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo ”  ” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
/usr/bin/isi statistics protocol  >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
sleep 1
echo ”  ” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “–Protocol Data–” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo ”  ” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
/usr/bin/isi statistics pstat  >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
sleep 1
echo ”  ” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo “–Drive Stats–” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
echo ”  ” >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"
/usr/bin/isi statistics drive  >> /ifs/pc1611/"isilon_status-`date '+%Y-%m-%d'`.txt"

# Mail the required output

cat /ifs/pc1611/isilon_status* | mail -s "$TODAY Report" piyush.chawla@xyz.com

#End of Script


Happy Learning!

Friday, March 13, 2015

SyncIQ











In Isilon, data replication is coordinated according to replication policies and jobs. Replication policies specify what data is replicated, where the data is replicated to, and how often the data is replicated. Replication jobs are the operations that replicate data from one Isilon cluster to another. SyncIQ generates replication jobs according to replication policies.


When SyncIQ transfers updates to a file that was transferred during a previous SyncIQ job, SyncIQ transfers only the blocks of that file that have changed since the last job, rather than transferring the entire file.


Create replication policy:

# isi sync policies create <policy name> sync <source path>  <target cluster name> <target path> --schedule "<schedule name>" --target-snapshot-archive on --target-snapshot-pattern "%{PolicyName}-%{SrcCluster}-%Y-%m-%d_%H-%M" 

Create SyncIQ domain:

It is required for the fail back operations.

# isi job jobs start <domain name> --root <path> --dm-type SyncIQ


Assess a replication policy:

you can assess the status of a policy using below command.  This can be useful if you want to preview the size of the data set that will be transferred if you run the policy

# isi sync jobs start <policy name> --test
# isi sync reports view <policy name> 1


Managing the replication:

You can manage the replication using the below commands

# isi sync jobs start <policy name>
# isi sync jobs pause <policy name>
# isi sync jobs resume <policy name>
# isi sync jobs cancel <policy name>

View active replication jobs

# isi sync jobs list
# isi sync jobs view <policy name>

Delete replication policy

# isi sync policies delete <policy name>

Enable or disable a replication policy

# isi sync policies enable <policy name>
# isi sync policies disable <policy name>

View replication policies

# isi sync policies list
# isi sync policies view <policy name>


View replication policies targeting the local cluster

# isi sync target list
# isi sync target view <policy name>

Managing replication performance rules

# isi sync rules create

example: below command creates a network traffic rule that limits bandwidth consumption to 13500 kbps per second from 00:00 to 23:59 during Sun-Sat

# isi sync rules create bandwidth 00:00-23:59 Sun-Sat 13500

Below command creates a file-operations rule that limits the file-send rate to 3 files per second from 10:00 AM to 6:00 PM every weekday:

# isi sync rules create file_count 10:00-18:00 M-F 3

Enable or Disable the performance rule:

# isi sync rules list
# isi sync rules view --id bw-0
# isi sync rules modify bw-0 --enabled true
# isi sync rules modify bw-0 --enabled false

Managing replication reports:

# isi sync reports list
# isi sync reports view <policy name> 2
# isi sync reports subreports list <policy name> 1  -- to view sub-reports

Managing failed jobs:

If SyncIQ disables the replication due to policy error then you can resolve it using below command:

# isi sync policies resolve <policy name>

If you can't resolve the replication issue then you can reset the job as well. Resetting a policy causes OneFS to perform a full or differential replication the next time the policy is run

# isi sync policies reset <policy name>


Happy Learning!

Brocade CLI Cheat sheet

Useful Brocade SAN Switch CLI commands


Show Commands


Command Description
psshow Displays the status of the power supply
fansshow Displays the status of the fans
tempshow Displays the status of the temperature readings
sensorshow Displays the status of the sensor readings
nsshow Displays information in the name server
nsshow -t Displays information in the name server
nsshow -r Displays the information in the name server along with the state change registration details
nscamshow Displays detailed information of all the devices connected to all the switches in the fabric (Remote Name Servers)
nsallshow Displays the 24 bit address of all devices that are in the fabric
licenseshow Displays all the licenses that have been added in the switch
date Displays the current date set on the switch
bannershow Displays the banner that will appear when logging in unsing the CLI or webtools
httpcfgshow Displays the JAVA version the switch expects at the management console
switchname Displays the switchname
fabricshow Displays information of all the switches in the fabric
userconfig –show -a Displays the account information like role , description , password exp date , locked status
switchstatusshow Displays the overall status of the switch
switchstatuspolicyshow Displays policy set for the switch regarding Marginal(Yellow) or Down(Red) error status
portshow To show the port status
portcfgshow Displays the speed set for all ports on all slots and other detailed port information
configshow fabric.ops Displays the parameters of the switch. Ensure all switches in a fabric have the same parameters in order to communicate
configshow fabric.ops.pidFormat Displays the PID set for a switch Core , Native or Extended edge
switchuptime OR uptime Displays the uptime for the switch
firmwareshow Displays the firmware on the switch
version Displays the current firmware version on the switch
hashow Displays the status of local and remote CP’s. High availability , heartbeat and synchronization
   

Port Settings

 
Command Description
portcfgshow Displays the port settings
portcfg rscnsupr [slot/port] –enable A registered state change registration is suppressed when a state change occurs on the port
portcfg rscnsupr [slot/port] –disable A registered state change registration is sent when a state change occurs on the port
portname To assign a name for a port
portdisable To disable a port or slot
portenable To enable a port or slot
portcfgpersistentdisable To disable a port , status would not change even after rebooting the switch
portcfgpersistentenable To enable a port , status would not change even after rebooting the switch
portshow To show the port status
portcfgspeed , To set speed for a port Note – 0:auto negotiated 1,2,4 Gbit/sec , 1 : 1Gbit/sec , 2 : 2 Gbit/sec , 4 : 4Gbit/sec
switchcfgspeed To set speed for all the ports on the switch Note – 0:auto negotiated 1,2,4 Gbit/sec , 1 : 1Gbit/sec , 2 : 2 Gbit/sec , 4 : 4Gbit/sec
portcfgshow Displays the speed set for all ports on all slots and other detailed port information
portcfgdefault To set the port settings to default
portcfglongdistance To set the long distance mode . Default is L0(Normal), as per distance will display LE <=10 kms , L0.5 <=25kms , L1 <=50 kms, L2<=100kms , LD=auto , LS = Static
portcfgeport Used to disable a port from being a E port
   

Setting commands

Command Description
ipaddrset To set the ip address for the switch
bannerset To set the banner which will appear when logging in using the CLI or webtools

Time and Date Settings

Command Description
date Displays the current date set on the switch
tsclockserver 10.10.1.1 Instruction for the principal switch to synchronize time with the NTP server (specify ipaddress of the NTP server)
tsclockserver LOCL Instruction to stop NTP server synchronization (Local time of the switch)
date mmddhhmmyy To set the time of the switch when the NTP server synchronization is cancelled
tstimezone -5 To set the time zone for individual switches

License Commands

Command Description
licenseshow Displays all the licenses that are added in the switch
licenseadd To add a new license to the switch
licenseremove To remove a license from the switch
licenseidshow Based on Switch WWN

Banner Commands

Command Description
bannershow Displays the banner that will appear when logging in unsing the CLI or webtools
bannerset To set the banner which will appear when logging in using the CLI or webtools
bannerset “” To remove the bannerset

Password commands

Command Description
passwd To change the password for that particular login
passwdcfg –set -lowercase 3 uppercase 1 -digits 2 -punctuation 2 -minlength 10 -history 3 To set the password rules
passwdcfg –set -minpasswordage 1 To set the minimum password age in Days
passwdcfg –set -maxpasswordage 30 To set the maximum password age in Days
passwdcfg –set -warning 23 To set a warning for the expiration Days remaining
passwdcfg –set -lockoutthreshold 5 To set the account lockout thresh hold
passwdcfg –set -lockoutduration 30 To set the account lockout duration in Minutes
passwdcfg –setdefault To restore the password policy to Factory settings (min length – 8, history -1 , lockoutduration – 30)

User Configuration (commands to administer Accounts)

Command Description
userconfig –show -a / userconfig –show Displays all the account information like role , description , password exp date , locked status
userconfig –add jdoe -r admin -d “Jane Doe” To add a new account -r = role , -d = description
userconfig –show jdoe Displays all the information for the account jdoe
userconfig –change -e no To Disable an account , usually default a/cs like admin and user . But ensure before disabling the admin a/c there is another a/c with admin rights
userconfig –change -e yes To Enable an account
 

NPIV Commands

Command Description
portcfgnpivport Enables NPIV functionality on a port . By default on Condor based switches
configure In order to increase the no of port logins ( Default is 126 , max 255)

SNMP

Command Description
snmpconfig snmpconfig for 5.0 above fos
agtcfgset snmp config for fos below 5.0
snmpmibcapset for choosing the MIB’s for the snmp settings

Zoning

Command Description
alicreate “Name”, “domain,port no” Used to create alias
alicreate “Name”,”portname1; portname2″ To create more than one ports under one alias
alidelete “Name” To delete alias
aliadd “Name”, “domain,port no” To add additional ports to an alias
aliremove “Name”, “domain,port no” To remove a port from the alias
alishow “AliName” To show the alias configuration on the switch
zonecreate “Zone Name”, “alias1; alias2″ To create zones based on alias
zonedelete “ZoneName” To delete a zone
zoneadd “ZoneName”, “alias name” To add additional alias into the zone
zoneremove “ZoneName”, “alias name” To remove an alias from the zone
zoneshow “zoneName” To show the zone configuration information
cfgcreate “Configname”, “Zone1; Zone2″ To create configurations by adding in zones
cfgdelete “ConfigName” To delete a configuration
cfgadd “ConfigName”, “Zone3″ To add additional zones in the configuration
cfgremove “ConfigName”, “Zone3″ To remove a zone from the configuration
cfgshow “ConfigName” To show the details of that configuration
cfgenable “ConfigName” To enable a configuration on the switch
cfgsave To have the effective configuration to be written into the flash memory
   

Firmware commands

Command Description
configupload Saves the switch config as an ASCII text file to an FTP server
configdownload To restore a switch configuration from ASCII text file Note – Need to disable the switch before downloading the config file
configure => cfgload attributes : [y] => Ensure secure config upload / download : [y] Fabric OS v 4.4 & above provides Secure File Copy Protocol (SCP) during upload or download of configurations
firmwaredownload To download the firmware to be installed on the switch
firmwareshow To be run after installing the firmware on the switch
version Displays the current firmware version on the switch
fastboot Needs to be run after installing the firmware . This doesnot include the post
reboot Needs to be run after installing the firmware. This includes the post
 

Other commands

Command Description
killtelnet To kill a particular session which is using telnet
configure To configure a switch
quitemode To switch off the quietmode
quietmode 1 To suppress messages to the console
switchname Displays the switchname
switchname “EXAMPLE” To assign a switch name
configure To disable/enable TELNETD
timeout Displays the timeout time set for Telnet session on the switch
timeout 10 To set a specific timeout time for the Telnet session
switchuptime OR uptime Displays the uptime for the switch
switchcfgspeed To set speed for all the ports on the switch Note – 0:auto negotiated 1,2,4 Gbit/sec , 1 : 1Gbit/sec , 2 : 2 Gbit/sec , 4 : 4Gbit/sec
fastboot To reboot the switch without post
reboot To reboot the switch with the post
switchstatusshow Displays the overall status of the switch
switchstatuspolicyshow Displays policy set for the switch regarding Marginal(Yellow) or Down(Red) error status
switchstatuspolicyset To change the policy set for the switch regarding Marginal(Yellow) or Down(Red) error status

Thursday, March 12, 2015

MDS Series Switch Zoning via CLI


Zones are configured within VSANs. The Logical tab displays the VSANs configured in the currently discovered fabric. 
Note: zone information must always be identical for all the switches in the network fabric.

To configure a zone and assign a zone name, follow these steps:

Configuring an Alias

To create an alias using the fcalias command, follow these steps:


Command
Purpose
Step 1 
switch# config t
Enters configuration mode.
Step 2 
switch(config)# fcalias name Alias_Sample vsan 3
switch-config-fcalias#
Configures an alias name (Alias_Sample).
   Step 3
switch-config-fcalias# member pwwn xx:xx:xx:xx:xx:xx:xx:xx
Configures alias members based on the specified port WWN type and value (pWWN xx:xx:xx:xx:xx:xx:xx:xx).

Creating Zone Sets

A zone set consists of one or more zones. A zone can be a member of more than one zone set and consists of multiple zone members. Members in a zone can access each other; members in different zones cannot access each other. Devices can belong to more than one zone.
A zone set can be activated or deactivated as a single entity across all switches in the fabric. Only one zone set can be activated at any time. If zoning is not activated, all devices are members of the default zone. If zoning is activated, any device that is not in an active zone (a zone that is part of an active zone set) is a member of the default zone.
Zoning can be administered from any switch in the fabric. When you activate a zone (from any switch), all switches in the fabric receive the active zone set. Additionally, full zone sets are distributed to all switches in the fabric, if this feature is enabled in the source switch.

Command

Purpose

Step 1 
switch# config tEnters configuration mode.

Step 2 
switch(config)# zoneset name Zoneset1 vsan 3
switch(config-zoneset)#
Configures a zone set called Zoneset1.

Step 3 
switch(config-zoneset)# member Zone1Adds Zone1 as a member of the specified zone set (Zoneset1).

Step 4 
switch(config-zoneset)# zone name 
first-new-zone
switch(config-zoneset-zone)# 
Adds a zone (first-new-zone) to the specified zone set (Zoneset1).

Step 5 
switch(config-zoneset-zone)# member fcid  xxxxxxxxxx

switch(config-zoneset-zone)# 
Adds a new member (FC ID xxxxxxxxxx) to the newly created zone (first-new-zone).


Activating a Zone Set


Changes to a zone set do not take effect to a full zone set until you activate it.

To activate a zone set, follow these steps:

Command

Purpose

Step 1 
switch# config t
switch(config)#
Enters configuration mode.

Step 2 
switch(config)# zoneset activate name Zoneset1 vsan 3Activates the specified zone set.
switch(config)# no zoneset activate name Zoneset1 vsan 3Deactivates the specified zone set

show zone and show zoneset Commands 

show Command

Description

show zone

Displays zone information for all VSANs.

show zone vsan 1

Displays zone information for a specific VSAN.

show zoneset vsan 1

Displays information for the configured zone set.

show zoneset vsan 2-3

Displays configured zone set information for a range of VSANs.

show zone name Zone1

Displays members of a zone.

show fcalias vsan 1

Displays fcalias configuration.

show zone member pwwn xx:xx:xx:xx:xx:xx:xx:xx

Displays membership status.

show zone statistics

Displays zone statistics.

show zone statistics read-only-zoning

Displays read-only zoning statistics.

show zoneset active

Displays active zone sets.

show zoneset brief

Displays brief descriptions of zone sets.

show zone active

Displays active zones.

show zone status

Displays zone status.

show zone

Displays zone statistics.

show running

Displays the interface-based zones.