Showing posts with label SAN. Show all posts
Showing posts with label SAN. Show all posts

Friday, September 17, 2010

PowerShell Script to Create Visio Diagram of Your Aggregates, Volumes, and LUNS!

Want to Visio your Netapp Filer for Aggregates, Volumes, and LUNS!. I found a great article on it explaining the whole process .

Netapp LinK

Blog Link

Thursday, July 15, 2010

I/O alignment in VMWare ESX

In Many cases, VMDK partitions can become misaligned, leading to performance degradation.So before deploying your virtual machine check these recommendation for Netapp

VMDK partitions need to be aligned at both the VMFS and guest OS levels. For example, you can align the partitions at the VMFS level by selecting the vmware LUN type when creating your LUNs. By doing so, the partitions are aligned to sector 128 or sector 0, depending on whether you use VirtualCenter or vmkfstools to create the VMFS. Regardless, the partitions will be aligned as both are multiples of 4KB, thereby fulfilling the WAFL read/write requirements.

However, because of the 63-sector offset implemented by the Windows and Linux operating systems, the partitions will still not be aligned at the guest OS level. Therefore, you must manually align the .vmdks at the guest OS level for VMFS and NFS datastores.

Cause of this problem

Partial writes occur when using VMFS filesystem or NFS based VMDKs on ESX.

This issue is not unique to NetApp storage. Any storage vendor or host platform may exhibit this problem. You can determine if partial writes are occurring by looking at the wp.partial_write setting in perfstat. wp.partial_write is a block counter of misaligned I/O. In Data ONTAP 7.2.1 and subsequent 7G versions, read/write_align_histo.XX and read/write_partial_blocks.XX are also available in the stats stop -I perfstat_lun section of a Perfstat

Aligning your partitions to a 4K boundary in both the VMDK and the LUN is a recommended bast practice (see TR3428 for this and other ESX on NetApp Best Practices).

RDMs are not affected by partial writes as long as the LUN type is set to the RDM OS type.

IF you need more details and fixing this issue using mbralign
NETAPP Knowledge Base

NETAPP Knowledge Base

Tuesday, June 29, 2010

Monitoring NetApp

Below are some basic OID's you should be monitoring on your Netapp Filers and always better to enable the snmptrap on it so you are aware of the system generated threshold . Use these OID's to create datasource on zenoss and you can generate graphs out of these. I will writing more on how you can trouble shoot issue's on a SAN environment in my next article next month.

CacheAge : 1.3.6.1.4.1.789.1.2.2.23.0
cifsops : 1.3.6.1.4.1.789.1.7.3.1.1.1.0
cifsopsHigh : 1.3.6.1.4.1.789.1.2.2.7.0
cifsopsLow : 1.3.6.1.4.1.789.1.2.2.8.0
cpuBusyTimePerCent : 1.3.6.1.4.1.789.1.2.1.3.0
diskFailedCount : 1.3.6.1.4.1.789.1.6.4.7.0
envOverTemperature : 1.3.6.1.4.1.789.1.2.4.1.0
failedFanCount : 1.3.6.1.4.1.789.1.2.4.2.0
failedPowerSupply : 1.3.6.1.4.1.789.1.2.4.4.0
fcHighops : 1.3.6.1.4.1.789.1.17.13.0
fcopslow : 1.3.6.1.4.1.789.1.17.14.0
fcpHighReadBytes : 1.3.6.1.4.1.789.1.17.4.0
fcpHighWriteBytes : 1.3.6.1.4.1.789.1.17.6.0
fcpLowReadBytes : 1.3.6.1.4.1.789.1.17.3.0
fcpLowWriteBytes : 1.3.6.1.4.1.789.1.17.5.0
lunHighErrors : 1.3.6.1.4.1.789.1.17.15.2.1.15.1
lunHighOps : 1.3.6.1.4.1.789.1.17.15.2.1.9.1
lunHighOtherOps : 1.3.6.1.4.1.789.1.17.15.2.1.26.1
lunHighReadBytes : 1.3.6.1.4.1.789.1.17.15.2.1.11.1
lunHighReadOps : 1.3.6.1.4.1.789.1.17.15.2.1.22.1
lunHighWriteBytes : 1.3.6.1.4.1.789.1.17.15.2.1.13.1
lunHighWriteOps : 1.3.6.1.4.1.789.1.17.15.2.1.24.1
lunLowErrors : 1.3.6.1.4.1.789.1.17.15.2.1.16.1
lunLowOps : 1.3.6.1.4.1.789.1.17.15.2.1.10.1
lunLowOtherOps : 1.3.6.1.4.1.789.1.17.15.2.1.27.1
lunLowReadBytes : 1.3.6.1.4.1.789.1.17.15.2.1.12.1
lunLowReadOps : 1.3.6.1.4.1.789.1.17.15.2.1.23.1
lunLowWriteBytes : 1.3.6.1.4.1.789.1.17.15.2.1.14.1
lunLowWriteOps : 1.3.6.1.4.1.789.1.17.15.2.1.25.1
miscHighDiskReadBytes : 1.3.6.1.4.1.789.1.2.2.15.0
miscLowDiskReadBytes : 1.3.6.1.4.1.789.1.2.2.16.0
nfsops : 1.3.6.1.4.1.789.1.2.2.1.0
nfsopsHigh : 1.3.6.1.4.1.789.1.2.2.5.0
nfsopsLow : 1.3.6.1.4.1.789.1.2.2.6.0
sysUpTime : 1.3.6.1.2.1.1.3.0

NetApp Storage Commonly Used Commands

NetApp Storage Commonly Used Commands

Below are the list of commands that will be mostly used and will be helpful when managing or monitoring or troubleshooting a Netapp filer.

sysconfig -a : shows hardware configuration with more verbose information
sysconfig -d : shows information of the disk attached to the filer
version : shows the netapp Ontap OS version.
uptime : shows the filer uptime
dns info : this shows the dns resolvers, the no of hits and misses and other info
nis info : this shows the nis domain name, yp servers etc.
rdfile : read contents of text files/.
wrfile : Creates/Overwrites a file.
aggr status : Shows the aggregate status.
aggr status -r : Shows the raid configuration, reconstruction information of the disks in filer
aggr show_space : Shows the disk usage of the aggreate, WAFL reserve, overheads etc.
vol status : Shows the volume information
vol status -s : Displays the spare disks on the filer
vol status -f : Displays the failed disks on the filer
vol status -r : Shows the raid configuration, reconstruction information of the disks
df -h : Displays volume disk usage
df -i : Shows the inode counts of all the volumes
df -Ah : Shows "df" information of the aggregate
license : Displays/add/removes license on a netapp filer
maxfiles : Displays and adds more inodes to a volume
aggr create : Creates aggregate
vol create : Creates volume in an aggregate
vol offline : Offlines a volume
vol online : Onlines a volume
vol destroy : Destroys and removes an volume
vol size [+|-] : Resize a volume in netapp filer
vol options : Displays/Changes volume options in a netapp filer
qtree create : Creates qtree
qtree status : Displays the status of qtrees
quota on : Enables quota on a netapp filer
quota off : Disables quota
quota resize : Resizes quota
quota report : Reports the quota and usage
snap list : Displays all snapshots on a volume
snap create : Create snapshot
snap sched : Schedule snapshot creation
snap reserve : Display/set snapshot reserve space in volume
/etc/exports : File that manages the NFS exports
rdfile /etc/exports : Read the NFS exports file
wrfile /etc/exports : Write to NFS exports file
exportfs -a : Exports all the filesystems listed in /etc/exports
cifs setup : Setup cifs
cifs shares : Create/displays cifs shares
cifs access : Changes access of cifs shares
lun create : Creates iscsi or fcp luns on a netapp filer
lun map : Maps lun to an igroup
lun show : Show all the luns on a filer
igroup create : Creates netapp igroup
lun stats : Show lun I/O statistics
disk show : Shows all the disk on the filer
disk zero spares : Zeros the spare disks
disk_fw_update : Upgrades the disk firmware on all disks
options : Display/Set options on netapp filer
options nfs : Display/Set NFS options
options timed : Display/Set NTP options on netapp.
options autosupport : Display/Set autosupport options
options cifs : Display/Set cifs options
options tcp : Display/Set TCP options
options net : Display/Set network options
ndmpcopy : Initiates ndmpcopy
ndmpd status : Displays status of ndmpd
ndmpd killall : Terminates all the ndmpd processes.
ifconfig : Displays/Sets IP address on a network/vif interface
vif create : Creates a VIF (bonding/trunking/teaming)
vif status : Displays status of a vif
netstat : Displays network statistics
sysstat -us 1 : begins a 1 second sample of the filer's current utilization (crtl - c to end)
nfsstat : Shows nfs statistics
nfsstat -l : Displays nfs stats per client
nfs_hist : Displays nfs historgram
statit : beings/ends a performance workload sampling [-b starts / -e ends]
stats : Displays stats for every counter on netapp. Read stats man page for more info
ifstat : Displays Network interface stats
qtree stats : displays I/O stats of qtree
environment : display environment status on shelves and chassis of the filer
storage show : Shows storage component details
snapmirror intialize : Initialize a snapmirror relation
snapmirror update : Manually Update snapmirror relation
snapmirror resync : Resyns a broken snapmirror
snapmirror quiesce : Quiesces a snapmirror bond
snapmirror break : Breakes a snapmirror relation
snapmirror abort : Abort a running snapmirror
snapmirror status : Shows snapmirror status
lock status -h : Displays locks held by filer
sm_mon : Manage the locks
storage download shelf : Installs the shelf firmware
software get : Download the Netapp OS software
software install : Installs OS
download : Updates the installed OS
cf status : Displays cluster status
cf takeover : Takes over the cluster partner
cf giveback : Gives back control to the cluster partner
reboot : Reboots a filer

Sunday, May 16, 2010

Zoning Brocade switches

Zoning Brocade switches

This tutorial provides a quick walk-through of setting up zoning on a Brocade switch.

Zoning provides a way to logically group together the components of a SAN. Ports, interfaces and even switches themselves can be grouped together into configurations that work together to make SANs more orderly and less daunting.

All zoning in the Brocade environment is done within configurations. A configuration contains aliases and zones.

An alias is a tool to simplify repetitive port numbers or WWN entries into an easy-to-remember name. For instance: rather than typing in the WWN "50:00:0e:10:00:00:00:17" in zoning operations, one could use an alias to identify the WWN as being "DF350_intfc_0". Aliases can also be used to identify multiple ports or WWNs by a single name. All zoning commands accept aliases as valid parameters.

A zone is a set of devices that access one another. All devices connected to a Fabric may be configured into one or more zones. Devices that are in the same zone can see each other, devices that are in different zones can not.

alicreate : Creates new zone aliases. Assigns a name to a list of alias members. Alias members can include port numbers (for example; 1,2 indicates switch 1, port 2) or WorldWide? names. If there are multiple alias members, all members must be separated by semicolons within the list of alias members.

example : alicreate "df350_intfc_0", "50:00:0e:10:00:00:00:17"

zonecreate : Groups a list of zone members under a zone name. Zone members can include port numbers, WorldWide? names, or aliases created by the alicreate command. Multiple zone members must be separated by semicolons within the list of zone members.

example : zonecreate "c2zone", "snowtop_c2; df350_intfc_1"

cfgcreate : Assigns a configuration name to a list of configuration members. The configuration members are all zones Multiple configuration members are separated by semicolons.

example : cfgcreate "c2config", "c2zone"

cfgenable : Checks a specified configuration for errors and makes it the active configuration of the switch. Note: No zoning is applied to the switch until the cfgenable command completes successfully. If there is already an active configuration, cfgenable will replace the active configuration with the specified configuration.

example : cfgenable "c2config"

cfgdisable : Deactivates a specified configuration

example : cfgdisable "c2config"

cfgsave : Saves zoning information to switch's flash memory. Configuration will not survive a reboot of the switch until the configuration is saved.

cfgclear : Deactivates and removes all zoning information from active memory. To remove a configuration from flash memory, run cfgsave after cfgclear.

zoneshow : Shows zoning configuration.

switchshow : Shows overall configuration of switch. WWNs, login types (F-port, L-Port etc.) port status and some general switch info show up in switchshow.

Setting up a zoning configuration

The following example sets up a switch so that the LUNs presented on controller 0 of a DF350 Fibre unit are presented either to controller 2 or controller 3 of a Sun Solaris host depending on which configuration is activated.

Please note : If ANY ports on a switch are in an active zone configuration, ALL ports on the switch MUST be zoned in order to be useable. Since this example only uses ports 4-7 of the switch, ports 0-3 would not be useable until they were included in the active zoning configuration.

'Another note : Usually it is best to zone by WWN, rather than by port number. That way, if a port goes bad the user just has to move the affected interface cable to a different port on the switch and the zoning should still be in place.

login: admin
Password:

sw2400_68:admin> switchshow
switchName: sw2400_68
switchType: 3.2
switchState: Online
switchRole: Principal
switchDomain: 1
switchId: fffc01
switchWwn: 10:00:00:60:69:20:13:c0
port 0: sw No_Light
port 1: sw No_Light
port 2: sw No_Light
port 3: sw No_Light
port 4: sw Online F-Port 50:00:0e:10:00:00:00:5d
port 5: sw Online F-Port 50:00:0e:10:00:00:00:17
port 6: sw Online F-Port 20:00:00:e0:69:c0:08:23
port 7: sw Online F-Port 20:00:00:e0:69:c0:08:45
sw2400_68:admin> alicreate "df350_intfc_0", "50:00:0e:10:00:00:00:17"
sw2400_68:admin> alicreate "df350_intfc_1", "50:00:0e:10:00:00:00:5d"
sw2400_68:admin> alicreate "snowtop_c2", "20:00:00:e0:69:c0:08:45"
sw2400_68:admin> alicreate "snowtop_c3", "20:00:00:e0:69:c0:08:23"
sw2400_68:admin> zoneshow
Defined configuration:
alias: df350_intfc_0
50:00:0e:10:00:00:00:17
alias: df350_intfc_1
50:00:0e:10:00:00:00:5d
alias: snowtop_c2
20:00:00:e0:69:c0:08:45
alias: snowtop_c3
20:00:00:e0:69:c0:08:23

Effective configuration:
no configuration in effect

sw2400_68:admin> zonecreate "c2zone", "snowtop_c2; df350_intfc_1"
sw2400_68:admin> zonecreate "c3zone", "snowtop_c3; df350_intfc_1"
sw2400_68:admin> zoneshow
Defined configuration:
zone: c2zone snowtop_c2; df350_intfc_1
zone: c3zone snowtop_c3; df350_intfc_1
alias: df350_intfc_0
50:00:0e:10:00:00:00:17
alias: df350_intfc_1
50:00:0e:10:00:00:00:5d
alias: snowtop_c2
20:00:00:e0:69:c0:08:45
alias: snowtop_c3
20:00:00:e0:69:c0:08:23

Effective configuration:
no configuration in effect

sw2400_68:admin> cfgcreate "c2config", "c2zone"
sw2400_68:admin> cfgcreate "c3config", "c3zone"
sw2400_68:admin> zoneshow
Defined configuration:
cfg: c2config
c2zone
cfg: c3config
c3zone
zone: c2zone snowtop_c2; df350_intfc_1
zone: c3zone snowtop_c3; df350_intfc_1
alias: df350_intfc_0
50:00:0e:10:00:00:00:17
alias: df350_intfc_1
50:00:0e:10:00:00:00:5d
alias: snowtop_c2
20:00:00:e0:69:c0:08:45
alias: snowtop_c3
20:00:00:e0:69:c0:08:23

Effective configuration:
no configuration in effect

sw2400_68:admin> cfgenable "c2zone"
error: "c2zone" is not a configuration
sw2400_68:admin> cfgenable "c2config"
zone config "c2config" is in effect
sw2400_68:admin> zoneshow
Defined configuration:
cfg: c2config
c2zone
cfg: c3config
c3zone
zone: c2zone snowtop_c2; df350_intfc_1
zone: c3zone snowtop_c3; df350_intfc_1
alias: df350_intfc_0
50:00:0e:10:00:00:00:17
alias: df350_intfc_1
50:00:0e:10:00:00:00:5d
alias: snowtop_c2
20:00:00:e0:69:c0:08:45
alias: snowtop_c3
20:00:00:e0:69:c0:08:23

Effective configuration:
cfg: c2config
zone: c2zone 20:00:00:e0:69:c0:08:45
50:00:0e:10:00:00:00:5d

What does this configuration look like on the Sun Solaris host?

After a reconfiguration boot, this is what the host sees when the " c2config " configuration is used on the switch.

# format
Searching for disks...done

c2t0d1: configured with capacity of 32.45GB
c2t0d2: configured with capacity of 15.51GB

AVAILABLE DISK SELECTIONS:
0. c0t0d0
/pci@1f,4000/scsi@3/sd@0,0
1. c2t0d0
/pci@6,4000/fibre-channel@2/sd@0,0
2. c2t0d1
/pci@6,4000/fibre-channel@2/sd@0,1
3. c2t0d2
/pci@6,4000/fibre-channel@2/sd@0,2

Changing the configuration

To change the configuration, simply log into the switch and activate the " c3config " configuration that we created earlier.

sw2400_68:admin> cfgenable "c3config"
zone config "c3config" is in effect

After a reconfiguration boot, the Sun Solaris host now sees the new configuration. The LUNs that used to be presented to controller 2 are now presented to controller 3:

# format
Searching for disks...done

c3t0d1: configured with capacity of 32.45GB
c3t0d2: configured with capacity of 15.51GB

AVAILABLE DISK SELECTIONS:
0. c0t0d0
/pci@1f,4000/scsi@3/sd@0,0
1. c3t0d0
/pci@6,4000/fibre-channel@3/sd@0,0
2. c3t0d1
/pci@6,4000/fibre-channel@3/sd@0,1
3. c3t0d2
/pci@6,4000/fibre-channel@3/sd@0,2