Wednesday, September 30, 2009

Secure and non secure item page

In our environment,
few pages were giving error "

"This page contains both secure and nonsecure items. Do you want to display the nonsecure items?"

after removing this tag <html:base /> the error went away.

Tuesday, September 29, 2009

configuring devices

AIX

Like panacea, just one command cfgmgr.




Solaris:
Either of the following commands

1 and 2 for newbies :)
  1. In Open Boot PROM, use: boot -r
  2. With your OS online, reboot your system with this flag:
    reboot -- -r
    (The system boots with the -r flag as it does with boot -r.)
  3. Execute these commands: drvconfig, devlinks, disks
view devices and status
 cfgadm -la
prtdiag

network management

I'll try to explain how to create link aggregation a.ka. Ether channe(AIX), Net-bond(Linux).

Before we create one, we have to know, how many interfaces are present in that system.

List network interfaces.

AIX

# lsparent -C -k ent
ent0 Available 03-08 10/100/1000 Base-TX PCI-X Adapter (14106902)
ent1 Available 03-09 10/100/1000 Base-TX PCI-X Adapter (14106902)



Linux

systool -c net
Class = "net"

Class Device = "bond0"
Device = "0000:02:01.0"

Class Device = "eth1"
Device = "0000:02:05.0"

Class Device = "lo"

Class Device = "sit0"


ip link show
1: lo: mtu 16436 qdisc noqueue


link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0c:29:81:c0:13 brd ff:ff:ff:ff:ff:ff
3: sit0: mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0

Solaris

# dladm show-dev
e1000g0 link: up speed: 1000 Mbps duplex: full
e1000g1 link: up speed: 1000 Mbps duplex: full

change NIC settings to full duplex/Autoneg

AIX

chdev -l 'ent0' -a media_speed='1000_Full_Duplex'

Linux
ethtool -s speed 1000 duplex full autoneg on
ethtool --change eth0 autoneg off speed 1000 duplex full

ethtool eth0 (same as entstat ent0 on AIX)

Solaris

http://www.sun.com/bigadmin/jsp/descFile.jsp?url=descAll/how_to_set_your_nic
http://sysunconfig.net/unixtips/set_nic_settings.txt


Etherchannel configuration




AIX

smitty etherchannel

very easy huh :)

Linux
# ls "$PWD/ifcfg-eth0"
/etc/sysconfig/network-scripts/ifcfg-eth0
# cat ifcfg-eth0

MASTER=bond0
DEVICE=eth0
SLAVE=yes
ONBOOT=yes
USERCTL=no
BOOTPROTO=none

#cat ifcfg-eth1

MASTER=bond0
DEVICE=eth1
SLAVE=yes
ONBOOT=yes
USERCTL=no
BOOTPROTO=none

add/append following lines to /etc/modprode.conf
alias bond0 bonding
options bond0 mode=balance-alb miimon=100

modprobe bonding (for loading bond module)

service network restart
less /proc/net/bonding/bond0
Output
Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)

Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0c:29:81:c0:13

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0c:29:81:c0:1d


Refer: http://www.linuxfoundation.org/en/Net:Bonding



Solaris





the last step changes the hostname on to aggr1 .
A reboot is required .

For setting jumboframes
edit MaxFrameSize /kernel/drv/e1000g.conf/hme.conf
edit AutoNegAdvertised for setting full duplex etc


# dladm show-aggr -s
key: 1 ipackets rbytes opackets obytes %ipkts %opkts
Total 3930 408207 2337 222124
e1000g0 3084 309475 1601 158419 78.5 68.5
e1000g1 846 98732 736 63705 21.5 31.5

Check below link for SOlaris dladm and ethtool comparison

http://hub.opensolaris.org/bin/view/Project+brussels/ethtool-dladm-comparison




Monday, September 28, 2009

db2 update

run following command after db2fix pack installation
# ./db2_08_01/instance/db2iupdt db2inst1
DBI1070I Program db2iupdt completed successfully.

Solaris VXVM prerequisites

pkgadd -d /mnt/Solaris_10/Product SUNWscpr SUNWscpu SUNWtoo

pkginfo -d /mnt/Solaris_10/Product SUNWtoo ( required for od)
Above packages are required for Veritas volume-manager installation.

# which od
/usr/bin/od
# pkgchk -l -p /usr/bin/od
Pathname: /usr/bin/od
Type: regular file
Expected mode: 0555
Expected owner: root
Expected group: bin
Expected file size (bytes): 19276
Expected sum(1) of contents: 34966
Expected last modification: Jan 22 21:13:49 2005
Referenced by the following packages:
SUNWtoo
Current status: installed

Wednesday, September 23, 2009

Solaris Disk management

List disks

printf "\0x1A" | format | grep DEFAULT

or

perl -e "print \"\\x1A\";" | format

0x1A is CTRL \D in ASCII
or
format < /dev/null

Size of a disk and partition/layout info

# prtvtoc /dev/dsk/c1t0d0s2
* /dev/dsk/c1t0d0s2 partition map
*
* Dimensions:
* 512 bytes/sector
* 32 sectors/track
* 128 tracks/cylinder
* 4096 sectors/cylinder
* 4094 cylinders
* 4092 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 1052672 9863168 10915839 /
1 3 01 4096 1048576 1052671
2 5 00 0 16760832 16760831
7 8 00 10915840 5844992 16760831 /export/home
8 1 01 0 4096 4095
# bc
4096*128*32*512 (cyclinders*tracks*sectors*512) -->for total number of bytes of disk space.
8589934592 BYTES
scale=4
8589934592/1024
8388608.0000 KB
8388608.0000/1024
8192.0000 MB
8192.0000/1024
8.0000 GB

scan for new luns /disks (devfsadm -c disk)

# printf "\0x1A" | format | grep DEFAULT
0. c1t0d0
# devfsadm -c disk
# printf "\0x1A" | format | grep DEFAULT
0. c1t0d0
1. c1t1d0

for SAN
devfsadm -C
cfgadm -al (to get a list of controllers)
cfgadm -c configure c2::500610003412EAB23141
cfgadm -c configure c4::500610003412EAB23142

vxdctl enable     (to tell veritas to look for new disks)
THEN
vea (to work with them)

Remove a disk drive (cfgadm)
# printf "\0x1A" | format | grep DEFAULT
0. c1t0d0
1. c1t1d0
# cfgadm -c unconfigure c1::dsk/c1t1d0
# printf "\0x1A" | format | grep DEFAULT
0. c1t0d0

http://www.utahsysadmin.com/2009/05/15/new-lun-solaris9-vxfs-powerpath/

update time using ntpdate

On Linux
# ntpdate -u 10.0.250.10
23 Sep 09:10:21 ntpdate[21154]: step time server 10.0.250.10 offset -68.557099 sec


on AIX
# /usr/sbin/ntpdate 10.0.250.10
23 Sep 09:10:59 ntpdate[442560]: step time server 10.0.250.10 offset 7.100248