Getting HBA / Fabric statistics on Solaris 10

You can use iostat (ignoring the disks, md (mirros) and nfs)

# iostat -xdmzC 1 10 | egrep -v "sd|md|nfs"

How to find HBA WWN Solaris 10

To get a WWN HBA on Solaris 10 you can use the fcinfo

# fcinfo hba-port | grep -i wwn

Identify ethN correspondent to physical interface – Red Hat Enterprise Linux

Many times is necessary identify who eth (eth0, eth1, eth2, … , ethN) correspond to physical interface.

For this you can use the ethtool

ethtool -p ethN

example:

ethtool -p eth0

One or more LEDs on the specific physical ethernet port are blinking now.

Using authorized keys on SSH without password – Red Hat Enterprise Linux (works with others Unix)

Remember this is a very intrusive configuration.
Look your security policies with atention.

1. Make de keys using ssh-keygen

On the “Enter passphrase” question leave black and enter.

# ssh-keygen -t dsa -f ~/.ssh/id_dsa
Generating public/private dsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/user1/.ssh/id_dsa.
Your public key has been saved in /home/user1/.ssh/id_dsa.pub.
The key fingerprint is:
87:52:b6:ec:c9:1f:f2:ce:be:d7:33:e9:1b:2b:33:dd user1@myserver1

2. Copy the public key for the server you want to have direct access.

# scp .ssh/id_dsa.pub user1@myserver2:~/.ssh/authorized_keys_temp

On myserver2 increse autorized_keys

# cat ~/.ssh/authorized_keys_temp >> ~/.ssh/authorized_keys

Remove temporary authorized_keys

# rm ~/.ssh/authorized_keys_temp

TIP: On RHEL 5 You can use ssh-copy-id

# ssh-copy-id -i ~user1/.ssh/id_dsa.pub user1@myserver2

Enabling rlogin, rexec and rcp (rsh-server) on Red Hat

On this example I´m using two servers named of myserver1 and myserve2 and the user is user1.

1. Install rsh-server

# yum install rsh-server -y
Loaded plugins: rhnplugin, security
Repository 'RHEL5LocalRepository' is missing name in configuration, using id
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package rsh-server.x86_64 0:0.17-40.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================
Package               Arch              Version                 Repository                       Size
=======================================================================================================
Installing:
rsh-server            x86_64            0.17-40.el5             RHEL5LocalRepository             40 k

Transaction Summary
=======================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 40 k
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing     : rsh-server                                                                      1/1

Installed:
rsh-server.x86_64 0:0.17-40.el5

Complete!

2. Enable services

# chkconfig rsh on
# chkconfig rlogin on
# chkconfig rexec on
# chkconfig nscd on
# chkconfig xinetd on

3. Reestart xinetd and  nscd

# /etc/init.d/xinetd restart
Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]

# /etc/init.d/nscd restart
Stopping nscd:                                             [  OK  ]
Starting nscd:                                             [  OK  ]

4. Edit /etc/securetty and add rsh, rlogin and rexec

# vi /etc/securetty

Put on end of file:

rsh
rlogin
rexec

5. Create file ~user1/.rhosts (user1 is my user example)

# vi ~user1/.rhosts

Put on end of file:

myserver2 user1

Change the permission of file

# chmod 600 ~user1/.rhost

6. Testing

On myserver2 with user1 create a file testing.file

# touch testing.file

Uses the rcp:

# rcp testing.file myserver1:tested.file

Look if file are created using the rexec

# rsh myserver1 ls -l ~user1

Identify QLogic WWN on Red Hat Enterprise Linux 5 and 4 (RHEL)

How to identify/get QLogic WWN on Red Hat Enterprise Linux 5 (RHEL5).

First identify your installed or recognized

# lspci | grep -i fibre
04:00.0 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
04:00.1 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
05:00.0 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)
05:00.1 Fibre Channel: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA (rev 03)

On Red Hat Enterprise Linux 5 (5.x) is on /sys/class/fc_host/hostX/port_name

(X is your device 1,2,3,…N)

For get use:

cat /sys/class/fc_host/hostX/port_name

Sample with multiple HBA (Fibre) QLogic

# ls /sys/class/fc_host/
host3  host4  host5  host6
# cat /sys/class/fc_host/host[3-6]/port_name
0x2100001b32936e24
0x2101001b32b36e24
0x2100001b32932821
0x2101001b32b32821

On Red Hat Enterprise Linux 4 (AS/ES) is on /proc/scsi/qla2xxx/1 (1,2,3,..N)

Sample:

# egrep [node|port] /proc/scsi/qlx2xxx/0
scsi-qla0-adapter-node=200000e08b1c19f2;
scsi-qla0-adapter-port=210000e08b1c19f2;

NMON for Solaris? Yes, you can use SARMON

SARMON, NMON for Solaris

Searching about NMON I find the SARMON. This is a great solution for reports of capacity on Solaris.

If you know the NMON (website) for AIX e Linux and need for Solaris you can use the SARMON (website)

For reports you can use the original tool

The installation is very ease

1. Get the .zip file

2. Save on /var/tmp

3. Unzip the .zip

# unzip sarmon_v1.01.bin_sparc.zip

4. Make backup of original files

# cp /usr/bin/sar /usr/bin/sar.orig
# cp /usr/bin/timex /usr/bin/timex.orig
# cp /usr/lib/sa/sadc /usr/lib/sa/sadc.orig

5. Move the sarmon to /usr/local

# mv /var/tmp/sarmon_v1.01.bin_sparc /usr/local/sarmon

6. Copy files

# cp /usr/local/sarmon/sar /usr/bin/sar
# cp /usr/local/sarmon/timex /usr/bin/timex
# cp /usr/local/sarmon/sadc /usr/lib/sa/sadc

7. Edit the crontab and put the entry for collect

0 0 * * * /usr/local/sarmon/sa1 300 288 &

This start collect every day at 00:00

The files generated are in /var/adm/sa/ (day-by-day)

How to identify ssd devices on Solaris (MX000 Servers only)

How to identify ssd devices on Solaris (MX000 Servers only)

1. Open one SSH on XSCF

Last login: Tue Mar 23 12:22:37 2010 from XXX.YYY.ZZZ.KKKK
XSCF>

2. Open on SSH session on your Solaris Server

Last login: Tue Mar 23 11:35:06 2010 from XXX.YYY.ZZZ.KKKK
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
You have new mail.
[root@MYSERVER ]#

3. Verify your top disks I/O with iostat

Sample:

[root@MYSERVER ]#  iostat -xM | grep ssd
ssd0        0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0
ssd43       0.0    0.0    0.0    0.0  0.0  0.0    0.9   0   0
ssd50       0.0    0.0    0.0    0.0  0.0  0.0    0.2   0   0
ssd61       0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0
ssd62       0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0
ssd148      0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0
ssd159      0.3    0.6    0.0    0.0  0.0  0.0    2.0   0   0
ssd160      0.1    0.3    0.0    0.0  0.0  0.0    2.4   0   0
ssd201      0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0
ssd202      0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0
ssd203      0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0
ssd296      0.0    0.0    0.0    0.0  0.0  0.0    0.1   0   0
ssd333      0.0    0.0    0.0    0.0  0.0  0.0    0.1   0   0

4. Verify the SSD Devices on XSCF of respective domain of server.

Sample:

# showdevices -v -d 01
01  01-2      ssd201  /dev/dsk/c4t500009740809C55Cd42s2Device being used by VxVM
01  01-2      ssd202  /dev/dsk/c4t500009740809C55Cd41s2Device being used by VxVM

Veritas Volume Manager (VxVM) – Disk Group DG Rename

Veritas Volume Manager (VxVM) – DG (Disk Group) Rename

1. Umount all filesystems used

# umount /myfilesystem1
# umount /myfilesystem2

2. Stop all volumes of Disk Group (DG)

# vxdg -g DG_APPS stopall

3. Deport the Disk Group (DG)

# vxdg deport DG_APPS

4. Import Disk Group with new name

# vxdg -n DG_DB import DG_APPs

SUN T2000 Firmware update

SUN T2000 firmware update

Pré-requesite: You need a SUN Solaris installed on the hardware.

1. Go to sunsolve.sun.com and make login

2. Access: SunSystem Handbook > Select Category: Servers > (Servers) Select a Product: Sun Fire T2000

Direct link: http://sunsolve.sun.com/handbook_private/validateUser.do?target=Systems/SunFireT2000/SunFireT2000

3. Download the latest Flash PROM Patch (Version used on this note at 11/03/2010: 6.7.8)

4. Create dir /tmp/images

mkdir -p /tmp/images

5. Save the file 139434-05.zip on /tmp/images

6. Unzip the 139434-05.zip file

# unzip 139434-05.zip
Archive:  139434-05.zip
creating: 139434-05/
inflating: 139434-05/sysfw670_README_docs.css
inflating: 139434-05/Sun_System_Firmware-6_7_6-SPARC_Enterprise_T2000.bin
inflating: 139434-05/Sun_System_Firmware-6_7_6-Sun_Fire_T2000.bin
inflating: 139434-05/sysfwdownload.README
inflating: 139434-05/Sun_System_Firmware-6_7-download_SLA_and_Entitlement.txt
inflating: 139434-05/sysfw670_README_docs.html
inflating: 139434-05/sysfwdownload
inflating: 139434-05/Install.info
inflating: 139434-05/README.139434-05
inflating: 139434-05/copyright
inflating: 139434-05/LEGAL_LICENSE.TXT

6. Use the sysfwdownload to download the firmware to the System Controller

# ./sysfwdownload Sun_System_Firmware-6_7_6-Sun_Fire_T2000.bin
.......... (9%).......... (18%).......... (27%).......... (37%).......... (46%).......... (55%).......... (64%).......... (74%).......... (83%).......... (92%)......... (100%)

Download completed successfully.

7. Shutdown the Solaris OS

# shutdown -i0

8. Go to sc (use the #.)

9. Verify the actual version

sc> showhost
Sun-Fire-T2000 System Firmware 6.6.4  2008/07/01 01:59
Host flash versions:
OBP 4.28.9 2008/06/30 21:26
Hypervisor 1.6.4 2008/06/06 04:57
POST 4.28.6 2008/05/23 12:30
sc> showsc -v version
Advanced Lights Out Manager CMT v1.6.4
SC Firmware version: CMT 1.6.4
SC Bootmon version: CMT 1.6.4
VBSC 1.6.4.a
VBSC firmware built Jun  6 2008, 05:01:03
SC Bootmon Build Release: 01
SC bootmon checksum: 4D3BA6C7
SC Bootmon built Jun  6 2008, 05:11:28
SC Build Release: 01
SC firmware checksum: 91C164C1
SC firmware built Jun  6 2008, 16:52:21
SC firmware flashupdate SAT AUG 30 01:53:14 2008
SC System Memory Size: 32 MB
SC NVRAM Version = 14
SC hardware type: 4
FPGA Version: 4.1.10.7

10. Make the flash update
sc> flashupdate -s 127.0.0.1
SC Alert: System poweron is disabled.
......................................................................................................................................................................................
Update complete. Reset device to use new software.

SC Alert: SC firmware was reloaded

11. Reboot the sc

sc> resetsc
Are you sure you want to reset the SC [y/n]?  s
Are you sure you want to reset the SC [y/n]?  y
User Requested SC Shutdown

12. Now, check the actual version

sc> showsc
Sun-Fire-T2000 System Firmware 6.7.6  2009/10/29 16:06
Host flash versions:
OBP 4.30.4 2009/08/19 07:24
Hypervisor 1.7.3.a 2009/10/29 15:50
POST 4.30.4 2009/08/19 07:47
sc> showsc -v version
Advanced Lights Out Manager CMT v1.7.6
SC Firmware version: CMT 1.7.6
SC Bootmon version: CMT 1.7.6
VBSC 1.7.3.a
VBSC firmware built Oct 29 2009, 15:55:58
SC Bootmon Build Release: 01
SC bootmon checksum: B262D0C1
SC Bootmon built Oct 29 2009, 16:05:00
SC Build Release: 01
SC firmware checksum: 8BCE9F20
SC firmware built Oct 29 2009, 16:05:12
SC firmware flashupdate FRI FEB 26 20:18:50 2010
SC System Memory Size: 32 MB
SC NVRAM Version = 14
SC hardware type: 4
FPGA Version: 4.1.10.7