Monday, April 13, 2009

Solaris FC

List of FC/HBA Commands for Solaris:-
- fcinfo (Solaris 10 only). e.g. fcinfo hba-port
- scli -i
- luxadm
- prtconf

World Wide Name (WWN) are unique 8 byte (64-bit) identifiers in SCSI or fibre channel similar to that of MAC Addresses on a Network Interface Card (NIC).

Talking about the WWN names, there are also

World Wide port Name (WWpN), a WWN assigned to a port on a Fabric which is what you would be looking for most of the time.

World Wide node Name (WWnN), a WWN assigned to a node/device on a Fibre Channel fabric.

############

root@host1 # fcinfo hba-port
HBA Port WWN: 210000e08b9328af
OS Device Name: /dev/cfg/c1
Manufacturer: QLogic Corp.
Model: 375-3363-xx
Firmware Version: 3.03.27
FCode/BIOS Version: fcode: 1.13;
Type: N-port
State: online
Supported Speeds: 1Gb 2Gb
Current Speed: 2Gb
Node WWN: 200000e08b9328af
HBA Port WWN: 210100e08bb328af
OS Device Name: /dev/cfg/c2
Manufacturer: QLogic Corp.
Model: 375-3363-xx
Firmware Version: 3.03.27
FCode/BIOS Version: fcode: 1.13;
Type: N-port
State: online
Supported Speeds: 1Gb 2Gb
Current Speed: 2Gb
Node WWN: 200100e08bb328af



Sunday, December 21, 2008

Solaris iSCSI Initiator Setup

root@s01# svcs -a | grep iscsi
disabled 19:16:32 svc:/network/iscsi_initiator:default
disabled 19:17:41 svc:/system/iscsitgt:default

root@s01# svcadm enable network/iscsi_initiator
root@s01# svcs -a | grep iscsi
disabled 19:17:41 svc:/system/iscsitgt:default
online 19:29:26 svc:/network/iscsi_initiator:default

root@s01# iscsiadm add discovery-address 192.168.2.2:3260

root@s01# iscsiadm modify discovery -t enable
root@s01# format
Searching for disks...

The device does not support mode page 3 or page 4,
or the reported geometry info is invalid.
WARNING: Disk geometry is based on capacity data.

The current rpm value 0 is invalid, adjusting it to 3600

The device does not support mode page 3 or page 4,
or the reported geometry info is invalid.
WARNING: Disk geometry is based on capacity data.

The current rpm value 0 is invalid, adjusting it to 3600
done

c3t3d0: configured with capacity of 18.00MB
c3t4d0: configured with capacity of 98.00MB


AVAILABLE DISK SELECTIONS:
0. c0d0
/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
1. c3t1d0
/iscsi/disk@0000iqn.1994-04.org.netbsd.iscsi-target%3Atarget30001,0
2. c3t2d0
/iscsi/disk@0000iqn.1994-04.org.netbsd.iscsi-target%3Atarget20001,0
3. c3t3d0
/iscsi/disk@0000iqn.1994-04.org.netbsd.iscsi-target%3Atarget10001,0
4. c3t4d0
/iscsi/disk@0000iqn.1994-04.org.netbsd.iscsi-target%3Atarget00001,0
Specify disk (enter its number): c^C
root@s01#

Solarix X server

Disable CDE/Java Desktop
svcadm disable svc:/application/graphical-login/cde-login:default

Enable CDE/Java Desktop
svcadm enable svc:/application/graphical-login/cde-login:default

Disable login server
# /usr/dt/bin/dtconfig -d

Stop login server
# /usr/dt/bin/dtconfig -kill

nable login server
# /usr/dt/bin/dtconfig -e

Thursday, December 11, 2008

Flickr

This is a test post from flickr, a fancy photo sharing thing.

Friday, November 28, 2008

dmadm command - Solaris

dladm - configure data-link interfaces


# dladm show-dev

bge0 link: up speed: 1000 Mbps duplex: full
bge1 link: down speed: 0 Mbps duplex: unknown
bge2 link: unknown speed: 0 Mbps duplex: unknown
bge3 link: unknown speed: 0 Mbps duplex: unknown
# ifconfig bge2 plumb
# dladm show-dev
bge0 link: up speed: 1000 Mbps duplex: full
bge1 link: down speed: 0 Mbps duplex: unknown
bge2 link: up speed: 1000 Mbps duplex: full
bge3 link: unknown speed: 0 Mbps duplex: unknown

Network Troubleshooting Tips for the Solaris 9 OS

http://www.sun.com/bigadmin/content/submitted/troubleshoot_network.jsp

Ross Moffatt, December 2006

Contents

Overview

This How-To covers some basic networking setup and troubleshooting on the Solaris 9 OS.

Two Tips for Network Performance Checking

a. Use FTP to copy a large file between hosts. Make sure you copy the file in both directions, as network performance problems can be directional. A possible cause of performance issues is autonegotiation being enabled at either the host or the router/switch. (See the Checking Network Settings section of this article for more details.)

b. Use ping with small (1Kbyte) and large (10K) packet sizes: Sometime routers in the network can have issues depending upon the size of the packet, as some use different queues within the router depending upon packet size.

Network Connectivity Troubleshooting

Here is a checklist to help you locate and resolve network connectivity problems.

1. Use ifconfig -a to check that interfaces are plumbed; that is, that they exist in the output. Also, check the network address and netmask of the interface.

To plumb an interface, run the command ifconfig plumb, for example:

# ifconfig ce1 plumb

Use ifconfig to see if the interface now exists.

# ifconfig -a
lo0: 
flags=1000849 
mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
ce0: 
flags=1000843 
mtu 1500 index 2
        inet 444.555.666.7 netmask ffffff00 broadcast 
444.555.666.255
        ether 5:3:de:de:de:de
ce1: 
flags=1000842 
mtu 1500 index 6
        inet 0.0.0.0 netmask 0
        ether 3:4:aa:bb:cc:dd

Give the interface its ipaddress and netmask.

ifconfig ce1 555.66.77.88 netmask 255.255.255.0 up

2. Ping the interface address; it should work!

3. Ping your router/switch. If you see => fail, then check your network settings. (See the Checking Network Settings section of this article.)

4. Ping a host on another network. If that doesn't work, check the routing table. (See the Checking Routing Settings section of this document.)

Checking Network Settings

You can check or set the status and configuration of a network interface with the ndd command. To use the ndd command, you first need to use the ifconfig command to find out what the device file is for the network interface in which you are interested.

# ifconfig -a
lo0: 
flags=1000849 
mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
ce0: 
flags=1000843 
mtu 1500 index 2
        inet 444.555.666.7 netmask ffffff00 broadcast 
444.555.666.255
        ether 5:3:de:de:de:de

This example shows only one interface plumbed, ce0, so the interface type is ce, and it is instance 0.

Now sometimes the ndd command uses a generic device file, e.g. /dev/ce, and you need to set the instance number first to know which instance is being interrogated. Otherwise, an instance-specific device file, e.g. /dev/bge0, is used. You can use ls -ld /dev/* to see if instance-specific device files exist, for example, ls -ld /dev/ce*.

# ls -l /dev/ce*
lrwxrwxrwx 1 root root 28 Mar 3 2006 /dev/ce ->
.../devices/pseudo/clone@0:ce

or

# ls -ld /dev/bge*
lrwxrwxrwx 1 root root 29 Oct 14 2005 /dev/bge ->
.../devices/pseudo/clone@0:bge
lrwxrwxrwx 1 root root 39 Oct 14 2005 /dev/bge0 ->
.../devices/pci@1f,700000/network@2:bge0
lrwxrwxrwx 1 root root 41 Oct 14 2005 /dev/bge1 ->
.../devices/pci@1f,700000/network@2,1:bge1
lrwxrwxrwx 1 root root 39 Oct 14 2005 /dev/bge2 ->
.../devices/pci@1d,700000/network@2:bge2
lrwxrwxrwx 1 root root 41 Oct 14 2005 /dev/bge3 ->
.../devices/pci@1d,700000/network@2,1:bge3

The following scripts print out all variables available via ndd. One is for a generic device file, and the other is for an instance-specific device file. The script is run with the instance required as a command-line option, that is, 0. You would need to change the script to have the correct interface device type. For example, you may need to replace ce with eri if your interface device file is /dev/eri.

#!/bin/sh
# ndd generic device script
ndd -set /dev/ce instance $1
for p in `ndd /dev/ce \\? | awk '{print $1}' | grep -v \\?`
do echo \"$p: `ndd /dev/ce $p`\"
done
 
Output.
# ./script 0
"instance: 0"
"adv_autoneg_cap: 0"
"adv_1000fdx_cap: 0"
"adv_1000hdx_cap: 0"
"adv_100T4_cap: 0"
"adv_100fdx_cap: 1"
"adv_100hdx_cap: 0"
"adv_10fdx_cap: 0"
"adv_10hdx_cap: 0"
"adv_asmpause_cap: 0"
"adv_pause_cap: 0"
"master_cfg_enable: 0"
"master_cfg_value: 0"
"use_int_xcvr: 0"
"enable_ipg0: 1"
"ipg0: 8"
"ipg1: 8"
"ipg2: 4"
"rx_intr_pkts: 8"
"rx_intr_time: 3"
"red_dv4to6k: 0"
"red_dv6to8k: 0"
"red_dv8to10k: 0"
"red_dv10to12k: 0"
"tx_dma_weight: 0"
"rx_dma_weight: 0"
"infinite_burst: 1"
"disable_64bit: 0"
"accept_jumbo: 0"
"laggr_multistream: 0"
 
 
 
#!/bin/sh
# ndd specific device script
for p in `ndd /dev/bge$1 \\? | awk '{print $1}' | grep -v \\?`
do echo \"$p: `ndd /dev/bge$1 $p`\"
done
 
Output.
# ./script 0
"autoneg_cap: 0"
"pause_cap: 1"
"asym_pause_cap: 1"
"1000fdx_cap: 0"
"1000hdx_cap: 0"
"100T4_cap: 0"
"100fdx_cap: 1"
"100hdx_cap: 0"
"10fdx_cap: 0"
"10hdx_cap: 0"
"adv_autoneg_cap: 0"
"adv_pause_cap: 1"
"adv_asym_pause_cap: 1"
"adv_1000fdx_cap: 0"
"adv_1000hdx_cap: 0"
"adv_100T4_cap: 0"
"adv_100fdx_cap: 1"
"adv_100hdx_cap: 0"
"adv_10fdx_cap: 0"
"adv_10hdx_cap: 0"
"lp_autoneg_cap: 0"
"lp_pause_cap: 0"
"lp_asym_pause_cap: 0"
"lp_1000fdx_cap: 0"
"lp_1000hdx_cap: 0"
"lp_100T4_cap: 0"
"lp_100fdx_cap: 0"
"lp_100hdx_cap: 0"
"lp_10fdx_cap: 0"
"lp_10hdx_cap: 0"
"link_status: 1"
"link_speed: 100"
"link_duplex: 1"
"link_autoneg: 0"
"link_rx_pause: 1"
"link_tx_pause: 0"
"loop_mode: 0"

I have found it best to set the network devices to disable autonegotiation on both the host and the router to which the host is connected. This is done by setting the following parameters: autoneg_cap, 1000fdx_cap, 1000hdx_cap, 100T4_cap, 100fdx_cap, 100hdx_cap, 10fdx_cap, 10hdx_cap, and adv_autoneg_cap.

I use this script in the /etc/rc2 directory to set the network parameters.

smart1 # more /etc/rc2.d/S95net_tune
#!/sbin/sh
PATH=$PATH:/usr/sbin;export PATH
case "$1" in
'start')
        /usr/sbin/ndd -set /dev/bge0 adv_1000fdx_cap 0
        /usr/sbin/ndd -set /dev/bge0 adv_1000hdx_cap 0
        /usr/sbin/ndd -set /dev/bge0 adv_100fdx_cap 1
        /usr/sbin/ndd -set /dev/bge0 adv_100hdx_cap 0
        /usr/sbin/ndd -set /dev/bge0 adv_10fdx_cap 0
        /usr/sbin/ndd -set /dev/bge0 adv_10hdx_cap 0
        /usr/sbin/ndd -set /dev/bge0 adv_autoneg_cap 0
        ;;
 
'stop')
        ;;
 
*)
        echo "Usage: $0 { start | stop }"
        exit 1
        ;;
esac
exit 0

The bge interface shows you the currently running status with the following parameters: link_status, link_speed, and link_duplex.

For information on interface device drivers, look in the man pages, in Section 7: Devices and Network Interfaces.

Checking Routing Settings

To see your current routing configuration, use netstat -r, and add the -n option depending on whether you want to see DNS names or IP addresses. For example:

smart1 # netstat -rn
Routing Table: IPv4
  Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
222.333.444.0 222.333.444.21 U 1 104943 bge0
default 222.333.444.1 UG 163805900
127.0.0.1 127.0.0.1 UH 538851300 lo0
smart1 # netstat -r
 
Routing Table: IPv4
  Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
222.333.444.0 myhost U 1 104943 bge0
default router UG 163805927
localhost localhost UH 538851327 lo0

If the default route is missing, then use the ifconfig command to add it on the fly:

ifconfg add default 222.333.444.1

Changing the IP Address

The following startup files need to be modified to change a host's IP address.

/etc/inet/hosts: Change the IP address, file format, IPhostname.

/etc/inet/netmasks: Add a new netmask, file format, networknetmask.

/etc/defaultrouter: Specify the new gateway for this subnet, file format, ipaddress.

About the Author

Ross Moffatt has been a UNIX System Administrator for more than 10 years. He can be contacted at ross.stuff@telstra.com.

Sunday, September 21, 2008

CSA: HP0-A01

21 Sept 2008.
No mood to study .. dunno why .. All seem missing ..

Must continue to fight ..!