Thursday, June 4, 2009

detailed statistics on the HBA

shows some detailed statistics on the HBA.

New fcinfo
--------------

(root)> fcinfo hba-port -l
HBA Port WWN: 210100e08ba0147a
OS Device Name: /dev/cfg/c4
Manufacturer: QLogic Corp.
Model: 375-3108-xx
Firmware Version: 3.3.26
FCode/BIOS Version: fcode: 1.13;
Type: N-port
State: online
Supported Speeds: 1Gb 2Gb
Current Speed: 2Gb
Node WWN: 200100e08ba0147a
Link Error Statistics:
Link Failure Count: 0
Loss of Sync Count: 0
Loss of Signal Count: 0
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 0
Invalid CRC Count: 0

With the WWN of the HBA, we can query the remote port information…

(root)> fcinfo remote-port -p 210100e08ba0147a
Remote Port WWN: 50060482d52d2e76
Active FC4 Types: SCSI
SCSI Target: yes
Node WWN: 50060482d52d2e76
Remote Port WWN: 50060e8004769000
Active FC4 Types: SCSI
SCSI Target: yes
Node WWN: 50060e8004769000

Check it out! Its the same 50060482d52d2e76 we saw twice before with the WWN of the port we’re plugged into the fabric with.

Throw in a -s, and it’ll return all SCSI targets with their LUN Number.

(root)> fcinfo remote-port -p 210100e08ba0147a -s
Remote Port WWN: 50060482d52d2e76
Active FC4 Types: SCSI
SCSI Target: yes
Node WWN: 50060482d52d2e76
LUN: 0
Vendor: EMC
Product: SYMMETRIX
OS Device Name: /dev/rdsk/c4t50060482D52D2E76d0s2
LUN: 69
Vendor: EMC
Product: SYMMETRIX
OS Device Name: /dev/rdsk/c20t60060480000190100665533030344539d0s2
LUN: 70
Vendor: EMC
Product: SYMMETRIX
OS Device Name: /dev/rdsk/c20t60060480000190100665533030344639d0s2
LUN: 71
Vendor: EMC
Product: SYMMETRIX
OS Device Name: /dev/rdsk/c20t60060480000190100665533030353039d0s2
LUN: 72
Vendor: EMC
Product: SYMMETRIX
OS Device Name: /dev/rdsk/c20t60060480000190100665533030353139d0s2
LUN: 73
Vendor: EMC
Product: SYMMETRIX
OS Device Name: /dev/rdsk/c20t60060480000190100665533030353239d0s2


Old commands
--------------

To find HBA WWPN/WWN:
1) luxadm –e port
2) luxadm –e dump_map /dev/pci@6,400/SUNW,qlc@2/fp@0,0:devctl
3) grep qlc /etc/path_to_instgrep 6,400
4) cfgadm –al
5) cfgadm –al –o show_FCP_dev

Tuesday, May 12, 2009

steps to resize vxfs,ufs file systems on Veritas volumes

You resize a Veritas File System by using the fsadm command
-----------------------------------------------------------
fsadm -F vxfs [-b newsize] [-r rawdev] mount_point


1. Verify free space on underlying device:
# vxdg -g "datavol" free
2. Expand the volume using vxassist:
# vxassist -g "datadg" growto "myvol" "newsize"
example: #vxassist -g testdg growto datavol 1024000
3. Expand the file system using fsadm:
# fsadm -F vxfs -b "newsize" \-r /dev/vx/rdsk/testdg/datavol /datavol
4. Verify that the file system was resized by using df:
# df -k /datavol

for ufs: file system growing

-------------------------------------------------------
# vxresize -b -F ufs -g "name_dg" "volume" +"MB"


example:
# vxresize -b -F ufs -g rootdg rootvol1 +20000m
# vxresize -g mitdg -F ufs myvol1 +1g

Tuesday, March 24, 2009

Steps to configure SSL for Sun Java Enterprise System (messaging and web servers)

Make SSL for pop/imap - Sun Java Messaging Server ###################################################
Generate CSR for messaging server
--------------------------------------------------------------------------------------------
/jes/opt/SUNWmsgsr/sbin/msgcert request-cert --name netra.millenniumit.com --org millenniumit --org-unit eng_dept --city colombo --country LK -F ascii -o /tmp/27-06-08-request-cert

Add New Cert [ Eg:- Take netscape --> apache from the go-daddy or Thawate or any other CA ]
--------------------------------------------------------------------------------------------
/jes/opt/SUNWmsgsr/sbin/msgcert add-cert -C Server-Cert /mit/do_config_here/SSL_Certs_Godaddy/msg/2008/netra.millenniumit.com.crt

Make SSL for Sun Java Webserver
###################################################
Go to the admin-server http://host.domain.com:

then renew cert there oR you can add new cert matching old CSR OR you can generate a new CSR for new cert and then install it

Thursday, February 12, 2009

Create a global file system using SVM in Sun cluster 3.2

Create a global file system using SVM in Sun cluster 3.2:
--------------------------------------------------------------
--------------------------------------------------------------
01 Create the metaset

--------------------------------------------------------
# metaset -s -a -h
Eg:-
# metaset -s app-dg -a -h phys-schost-1 phys-schost-2
# metaset -s
Eg:-
# metaset -s app-dg


02 Identify the disk device to add to metaset
--------------------------------------------------------
# cldevice show grep Device (or use # didadm -L)
Eg:-
# cldevice show grep Device
DID Device Name: /dev/did/rdsk/d1
Full Device Path: app-dg:/dev/rdsk/c0t0d0DID Device Name: /dev/did/rdsk/d2
Full Device Path: app-dg:/dev/rdsk/c0t6d0DID Device Name: /dev/did/rdsk/d3


03 Make sure just created metaset switches between nodes
---------------------------------------------------------
# cldegivegroup switch -n
Eg:-
# cldegivegroup switch -n phys-schost-1 app-dg
# cldegivegroup switch -n phys-schost-2 app-dg


04 Add just identified disk device to metaset
---------------------------------------------------------
# metaset -s -a
Eg:-
# metaset -s app-dg -a /dev/did/rdsk/d1 /dev/did/rdsk/d2
# metaset -s
Eg:-
# metaset -s app-dg


05 Add disk configuration for recording/creating purpose
----------------------------------------------------------
Eg:-
# vi /etc/lvm/md.tab (Edit in all nodes)
app-dg/d0 -m app-dg/d10 app-dg/d20app-dg/d10 1 1 /dev/did/rdsk/d1s0app-dg/d20 1 1 /dev/did/rdsk/d2s0


06 Create meta devices in the metaset
----------------------------------------------------------
Eg:-
# metainit -s app-dg -a


07 Add mediator hosts (if mediators required only)
----------------------------------------------------------
Eg:-
phys-schost# metaset -s app-dg -a -m phys-schost-1

phys-schost# metaset -s app-dg -a -m phys-schost-2

08 Create pxfs file system and mount
----------------------------------------------------------
Eg:-
phys-schost# newfs /dev/md/app-dg/rdsk/d1

...
phys-schost# mkdir -p /global/oracle (Make in all the nodes)
phys-schost# vi /etc/vfstab (Edit in all nodes)
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
/dev/md/app-dg/dsk/d1 /dev/md/app-dg/rdsk/d1 /global/oracle ufs 2 no global,logging
...
phys-schost# sccheck
phys-schost# mount /global/oracle
phys-schost# mount

Friday, January 23, 2009

Cluster Interconnect redundancy for Oracle RAC - Unix/Solaris OS

If the RAC nodes are also Sun Cluster nodes,

clprivnet0 interface can be used for RAC interconnects as well with inbuilt redundancy.

Eg:-

clprivnet0: flags=1009843 mtu 1500 index 9 inet 172.16.4.1 netmask fffffe00 broadcast 172.16.5.255

ether 0:0:0:0:0:1

# cat /etc/hosts

# Internet host table

#

::1 localhost

127.0.0.1 localhost

192.168.2.125 node1 node1.domain.lk loghost

192.168.2.126 node2 node2.domain.lk

# Oracle RAC Public

192.168.2.129 ora-vip-1

192.168.2.130 ora-vip-2

# Oracle RAC Interconnects

172.16.4.1 ora-prip-1

172.16.4.2 ora-prip-2

Else we have to use Solaris level network redundancy.


Simple rules for switches between interconnects

- Interconnect switches should be in a single fabric
- Dedicated VLAN for interconnects links
- Port fast should be enabled for all interconnect ports
Eg: -
Switch -A> (enable) set spantree portfast 2/1 enable

Configuration options for Solaris 10

- Option 1 : Link based IPMP
# cat /etc/hostname.e1000g0
ora-prip-1 group sc_ipmp0 up

# cat /etc/hostname.e1000g4
group sc_ipmp0 standby up

- Option 2 : Link aggregation (All links (below: - e1000g0 and e1000g4) of an aggregation should connect to a single switch)

# dladm show-dev
# dladm create-aggr -d e1000g0 -d e1000g4 1
# dladm show-aggr 1

Port Grouping and LCAP should be enabled in the switch

Eg:-

Switch Config:
# = Insert Integer
Configure a Port Group:
interface Port-channel#
switchport access vlan #
switchport mode access
exit
port-channel load-balance src-dst-ip
Please configure the ports you want in the channel (4 max) required as following:
# = Insert Integer
config term
interface INTERFACE
channel-group # mode passive
channel-protocol lacp
switchport access vlan #
switchport mode access
exit
end
show run (to verify)