Unixmore’s Blog

bertinidak sekarang atau tertindas selamanya

a few my Log about solaris 10

IPADDR:
/etc/hosts
/etc/defaultrouter
/etc/netmask
/etc/inet/ipnodes

IPMP:
hostname.bnx0

hostname group groupname up

hostname.qfe4
group groupname up

controller create type=logicaldrive raid=1+0 drives=1,2,3,4

SLM01: 98:4B:E1:73:9B:6C
SLM02: 98:4B:E1:6F:2E:BC
SLM03: 98:4B:E1:73:EB:6C

-bash-3.00# ../bin/make_template -T SLM01 -E 98:4B:E1:6F:2E:BC SLM02
-bash-3.00# ../bin/make_template -T SLM01 -E 98:4B:E1:73:EB:6C SLM03

10.251.163.40   PAS01
10.251.163.41   PAS02
10.251.163.42   PAS03
10.251.163.43   PAS04
10.251.163.44   PAS05
10.251.163.45   PAS06
10.251.163.46   PAS07
10.251.163.47   PAS08
10.251.163.48   PAS09
10.251.163.49   PAS10
10.251.163.50   PAS11

../bin/make_template -T SLM01 -E  98:4B:E1:6F:3E:F8 PAS01
98 4B E1 6F 3E F8

../bin/make_template -T PAS01 -E  98:4B:E1:73:6C:74 PAS02 base_config
../bin/make_template -T PAS01 -E  98:4B:E1:6F:6E:98 PAS03 base_config
../bin/make_template -T PAS01 -E  98:4B:E1:6F:69:70 PAS04 base_config *** SKIP
../bin/make_template -T PAS01 -E  98:4B:E1:73:CB:D0 PAS05 base_config
../bin/make_template -T PAS05 -E  98:4B:E1:6F:0A:E4 PAS06 base_config
../bin/make_template -T PAS06 -E  98:4B:E1:73:1B:F4 PAS07 base_config
../bin/make_template -T PAS07 -E  98:4B:E1:6F:1C:28 PAS08 base_config
../bin/make_template -T PAS08 -E  98:4B:E1:6F:1C:6C PAS09 base_config
../bin/make_template -T PAS09 -E  98:4B:E1:6F:4E:C4 PAS10 base_config
../bin/make_template -T PAS10 -E  98:4B:E1:73:CB:8C PAS11 base_config

sed -e “s/PermitRoot.*/PermitRootLogin yes/” /etc/ssh/sshd_config > tmp.sshd_config
mv tmp.sshd_config  /etc/ssh/sshd_config
svcadm restart ssh

IPMP:
bash-3.00# cat /etc/hostname.bnx0
SLM01/24 broadcast + group TSEL01 up
bash-3.00# cat /etc/hostname.bnx1
group TSEL01 standby up

#### PAS01
printf “10.251.164.33\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” >> /etc/hostname.bnx2
printf “group TSEL02 standby up\n” >> /etc/hostname.bnx3

#### PAS02
printf “10.251.164.34\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” >> /etc/hostname.bnx2
printf “group TSEL02 standby up\n” >> /etc/hostname.bnx3

#### PAS03
printf “10.251.164.35\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” >> /etc/hostname.bnx2
printf “group TSEL02 standby up\n” >> /etc/hostname.bnx3

#### PAS04
printf “10.251.164.36\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” >> /etc/hostname.bnx2
printf “group TSEL02 standby up\n” >> /etc/hostname.bnx3

#### PAS05
printf “10.251.164.37\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” >> /etc/hostname.bnx2
printf “group TSEL02 standby up\n” >> /etc/hostname.bnx3

#### PAS06
printf “10.251.164.38\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” >> /etc/hostname.bnx2
printf “group TSEL02 standby up\n” >> /etc/hostname.bnx3

#### PAS07
printf “10.251.164.39\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” >> /etc/hostname.bnx2
printf “group TSEL02 standby up\n” >> /etc/hostname.bnx3

#### PAS08
printf “10.251.164.40\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” >> /etc/hostname.bnx2
printf “group TSEL02 standby up\n” >> /etc/hostname.bnx3

#### PAS09
printf “10.251.164.41\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” >> /etc/hostname.bnx2
printf “group TSEL02 standby up\n” >> /etc/hostname.bnx3

#### PAS10
printf “10.251.164.42\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” >> /etc/hostname.bnx2
printf “group TSEL02 standby up\n” >> /etc/hostname.bnx3

#### PAS11
printf “10.251.164.43\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” >> /etc/hostname.bnx2
printf “group TSEL02 standby up\n” >> /etc/hostname.bnx3

#### SLM01
printf “10.251.164.19\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” >> /etc/hostname.bnx2
printf “group TSEL02 standby up\n” >> /etc/hostname.bnx3

#### SLM02
printf “10.251.164.20\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” >> /etc/hostname.bnx2
printf “group TSEL02 standby up\n” >> /etc/hostname.bnx3

#### SLM03
printf “`uname -n`-OM/24 broadcast + group TSEL01 up\n” >> /etc/hostname.bnx0
printf “group TSEL01 standby up\n” >> /etc/hostname.bnx1
printf “10.251.164.21\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” >> /etc/hostname.bnx2
printf “group TSEL02 standby up\n” >> /etc/hostname.bnx3

#### FrontUI01
printf “10.251.164.26\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” > /etc/hostname.bnx2
printf “group TSEL02 standby up\n” > /etc/hostname.bnx3
svcadm restart physical

#### FrontUI02 **** BAD
printf “10.251.164.27\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” > /etc/hostname.bnx2
printf “group TSEL02 standby up\n” > /etc/hostname.bnx3
svcadm restart physical

#### FrontUI03
printf “10.251.164.28\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” > /etc/hostname.bnx2
printf “group TSEL02 standby up\n” > /etc/hostname.bnx3
svcadm restart physical

#### FrontUI04
printf “10.251.164.29\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” > /etc/hostname.bnx2
printf “group TSEL02 standby up\n” > /etc/hostname.bnx3
svcadm restart physical

#### FrontUI05
printf “10.251.164.30\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” > /etc/hostname.bnx2
printf “group TSEL02 standby up\n” > /etc/hostname.bnx3
svcadm restart physical

#### FrontUI06  **** BAD
printf “10.251.164.31\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” > /etc/hostname.bnx2
printf “group TSEL02 standby up\n” > /etc/hostname.bnx3
svcadm restart physical

#### FrontUI07
printf “`uname -n`/24 broadcast + group TSEL01 up\n” > /etc/hostname.bnx0
printf “group TSEL01 standby up\n” > /etc/hostname.bnx1
printf “10.251.164.32\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” > /etc/hostname.bnx2
printf “group TSEL02 standby up\n” > /etc/hostname.bnx3
svcadm restart physical

#### InfraUI01
printf “10.251.164.4\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” > /etc/hostname.bnx2
printf “group TSEL02 standby up\n” > /etc/hostname.bnx3
svcadm restart physical

#### InfraUI02
printf “10.251.164.5\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” > /etc/hostname.bnx2
printf “group TSEL02 standby up\n” > /etc/hostname.bnx3
svcadm restart physical

#### InfraUI03
printf “10.251.164.6\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” > /etc/hostname.bnx2
printf “group TSEL02 standby up\n” > /etc/hostname.bnx3
svcadm restart physical

#### InfraUI04
printf “10.251.164.7\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” > /etc/hostname.bnx2
printf “group TSEL02 standby up\n” > /etc/hostname.bnx3
svcadm restart physical

#### InfraUI05
printf “10.251.164.8\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” > /etc/hostname.bnx2
printf “group TSEL02 standby up\n” > /etc/hostname.bnx3
svcadm restart physical

#### InfraUI06
printf “10.251.164.9\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” > /etc/hostname.bnx2
printf “group TSEL02 standby up\n” > /etc/hostname.bnx3
svcadm restart physical

#### InfraUI07
printf “10.251.164.10\t`uname -n`-OM\n” >> /etc/hosts
printf “`uname -n`-OM/24 broadcast + group TSEL02 up\n” > /etc/hostname.bnx2
printf “group TSEL02 standby up\n” > /etc/hostname.bnx3
svcadm restart physical

#svcadm restart physical

#netstat -ni | grep 10.251.163 | awk ‘{print $4}’ | awk ‘{ FS=”.”; print $1}’

scp /etc/hosts root@PAS02:/etc/hosts
scp /etc/hosts root@PAS03:/etc/hosts
scp /etc/hosts root@PAS04:/etc/hosts
scp /etc/hosts root@PAS05:/etc/hosts
scp /etc/hosts root@PAS06:/etc/hosts
scp /etc/hosts root@PAS07:/etc/hosts
scp /etc/hosts root@PAS08:/etc/hosts
scp /etc/hosts root@PAS09:/etc/hosts
scp /etc/hosts root@PAS10:/etc/hosts
scp /etc/hosts root@PAS11:/etc/hosts

mkdir -p /export/patches /export/pkgs
mount SLM01:/export/install/patches /export/patches/
cd /export/patches/10_x86_Recommended
./installcluster –s10cluster

mkdir -p /export/patches /export/pkgs
mount SLM01:/export/install/patches /export/patches/
mount SLM01:/export/install/pkgs /export/pkgs

printf “10.251.163.33\tFrontUI01\n” >> tmp.hosts
printf “10.251.163.34\tFrontUI02\n” >> tmp.hosts
printf “10.251.163.35\tFrontUI03\n” >> tmp.hosts
printf “10.251.163.36\tFrontUI04\n” >> tmp.hosts
printf “10.251.163.37\tFrontUI05\n” >> tmp.hosts
printf “10.251.163.38\tFrontUI06\n” >> tmp.hosts
printf “10.251.163.39\tFrontUI07\n” >> tmp.hosts
printf “10.251.163.3\tInfraUI01\n” >> tmp.hosts
printf “10.251.163.4\tInfraUI02\n” >> tmp.hosts
printf “10.251.163.5\tInfraUI03\n” >> tmp.hosts
printf “10.251.163.6\tInfraUI04\n” >> tmp.hosts
printf “10.251.163.7\tInfraUI05\n” >> tmp.hosts
printf “10.251.163.8\tInfraUI06\n” >> tmp.hosts
printf “10.251.163.9\tInfraUI07\n” >> tmp.hosts

cat /root/tmp/tmp.hosts | ssh root@FrontUI01 “cat >> /etc/hosts”

cat /root/tmp/tmp.hosts2 | ssh root@FrontUI01 “cat >> /etc/hosts”
##cat /root/tmp/tmp.hosts2 | ssh root@FrontUI02 “cat >> /etc/hosts”
cat /root/tmp/tmp.hosts2 | ssh root@FrontUI03 “cat >> /etc/hosts”
cat /root/tmp/tmp.hosts2 | ssh root@FrontUI04 “cat >> /etc/hosts”
cat /root/tmp/tmp.hosts2 | ssh root@FrontUI05 “cat >> /etc/hosts”
##cat /root/tmp/tmp.hosts2 | ssh root@FrontUI06 “cat >> /etc/hosts”
cat /root/tmp/tmp.hosts2 | ssh root@FrontUI07 “cat >> /etc/hosts”
cat /root/tmp/tmp.hosts2 | ssh root@InfraUI01 “cat >> /etc/hosts”
cat /root/tmp/tmp.hosts2 | ssh root@InfraUI02 “cat >> /etc/hosts”
cat /root/tmp/tmp.hosts2 | ssh root@InfraUI03 “cat >> /etc/hosts”
cat /root/tmp/tmp.hosts2 | ssh root@InfraUI04 “cat >> /etc/hosts”
cat /root/tmp/tmp.hosts2 | ssh root@InfraUI05 “cat >> /etc/hosts”
cat /root/tmp/tmp.hosts2 | ssh root@InfraUI06 “cat >> /etc/hosts”
cat /root/tmp/tmp.hosts2 | ssh root@InfraUI07 “cat >> /etc/hosts”

cat .ssh/id_dsa.pub | ssh root@SLM03 “mkdir .ssh && chmod 700 .ssh && cat >> .ssh/authorized_keys”

cat ~/.ssh/id_dsa.pub | ssh root@FrontUI01 “mkdir -p .ssh && chmod 700 .ssh && cat >> .ssh/authorized_keys”

reboot

mkdir -p /export/patches /export/pkgs
mount SLM01:/export/install/patches /export/patches/
mount SLM01:/export/install/pkgs /export/pkgs
cd /export/pkgs
pkgadd -d HPQilo-1.3.3-solaris10-i386.pkg
pkgadd -d HPQhealth-3.2.0-solaris10-i386.pkg
pkgadd -d HPQacucli-3.1.0-solaris10-i386.pkg

open root/ftp access

sed -e “s/^root/#root/” /etc/ftpd/ftpusers > tmp.ftpusers
mv tmp.ftpusers /etc/ftpd/ftpusers
svcadm enable network/ftp:default

root

< base_config_ClientEther=98:4B:E1:6F:3E:F8

> base_config_ClientEther=98:4B:E1:73:6C:74
129c129
< base_config_sysidcfg_ip_address=10.251.163.40

> base_config_sysidcfg_ip_address=10.251.163.41
416c416
< base_config_profile_root=free

> base_config_profile_root=102400
429c429
< base_config_profile_s3_size=”102400″

> base_config_profile_s3_size=”free”
435c435
< base_config_profile_s5_size=”1024000″

> base_config_profile_s5_size=”512000″
546c546
< base_config_recpatch_passcode=”"

> base_config_recpatch_passcode=”s10cluster”
745c745
< base_config_ipmp_networkif_bnx0_bnx1=”TSEL01 sn 24 PAS01 10.251.163.40″

> base_config_ipmp_networkif_bnx0_bnx1=”TSEL01 sn 24 PAS02 10.251.163.41″

create Bonding interface LACP protocol

in below i put my script for creating a LACP protocol with three interface 1Gbit ether, before implementing these script makesure you already configuring L2 switch that connect to server interfaces, i put too a few configuration in switch L2, please see below :

interface Port-channel1
 description [FOR EZY-W-001]
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1,10,182
 switchport mode trunk

!

interface GigabitEthernet0/1
 description [connect to EZY-W-001_Eth1]
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1,10,182
 switchport mode trunk
 channel-protocol lacp
 channel-group 1 mode active
 spanning-tree portfast trunk

NOTE : repeat conf as much as an interface that want to configuring LACP

 

#conf on centOS machine#

#!/bin/bash

modprobe 8021q
modprobe bonding mode=0 miimon=100 –> if you create round-robin

modprobe bonding mode=4 miimon=80 –> LACP protocol
ifconfig eth0 down
ifconfig eth1 down
ifconfig eth2 down

ifconfig bond0 hw ether [<xx:xx:xx:xx:xx:xx>]
ifconfig bond0 [<ip addr>] up
ifenslave bond0 eth1
ifenslave bond0 eth0; ifenslave bond0 eth2
ifconfig bond0 0.0.0.0
ifconfig eth0 0.0.0.0
ifconfig eth1 0.0.0.0; ifconfig eth2 0.0.0.0

vconfig add bond0 10
vconfig add bond0 182
vconfig add bond0 103

ifconfig bond0.10 10.10.1.101 netmask 255.255.255.0 broadcast 10.10.1.255 up
ifconfig bond0.182 182.16.240.66 netmask 255.255.255.224 broadcast 182.16.240.94 up
ifconfig bond0.103 103.246.76.86 netmask 255.255.255.0 broadcast 103.246.76.255 up
cat /proc/sys/net/bond0
echo 1 > /proc/sys/net/ipv4/ip_forward

connect target SAN on oracle solaris 10

I already try to connect between oracle solaris 10 with freeNAS 8/ openfiler in my vmware ESX, first step for implementing SAN architecture within vmwarer ESX must be makesure an iniator and a target is working properly, for these step i put some script, please see in below :

#iscsiadm add discovery-address 192.168.1.200:3260
#iscsiadm modify discovery –sendtargets enable
#devfsadm -i iscsi

bandwidth management with delay pool

acl id_node src 192.168.10.0/24
acl x_time time MTWHFA 09:00-23:55

# Video
acl x_limit url_regex -i \.asf$ \.avi$ \.m1v$ \.mp2$ \.mp2v$ \.mpa$ \.flv$ \.mp4$
acl x_limit url_regex -i \.mpe$ \.mpeg$ \.mpg$ \.mpv2$ \.wmv$ \.dat$
acl x_limit url_regex -i \.div$ \.divx$ \.ac3$ \.dts$ \.vob$ \.dvr-ms$
acl x_limit url_regex -i \.m2v$ \.vro$ \.rm$ \.3gp$ \.ram$ \.raw$ \.qt$

# Audio
acl x_limit url_regex -i \.aif$ \.aifc$ \.aiff$ \.au$ \.mid$ \.midi$ \.mp3$
acl x_limit url_regex -i \.rmi$ \.snd$ \.wav$ \.wma$ \.vqf$

# Pics
acl x_limit url_regex -i \.srf$ \.tga$ \.tif$ \.tiff$ \.tif$ \.ttf$ \.hdf$
acl x_limit url_regex -i \.wbmp$ \.wmf$ \.x3f$ \.xbm$ \.xpm$ \.cr2$ \.crw$ \.dcr$
acl x_limit url_regex -i \.djvu$ \.emf$ \.eps$ \.fpx$ \.icl$ \.icn$
acl x_limit url_regex -i \.iff$ \.jp2$ \.jpc$ \.mrw$ \.nef$ \.orf$ \.pbm$
acl x_limit url_regex -i \.pcd$ \.pcx$ \.pef$ \.pgm$ \.pic$ \.pict$ \.plp$
acl x_limit url_regex -i \.ppm$ \.psd$ \.psp$ \.raf$ \.ras$ \.raw$ \.rs$ \.sgi$

# Archieve
acl x_limit url_regex -i \.ace$ \.arj$ \.bzip2$ \.cab$ \.gzip$ \.lzh$
acl x_limit url_regex -i \.lzw$ \.mim$ \.sef$ \.tar$ \.tbz$ \.gz$
acl x_limit url_regex -i \.tgz$ \.uue$ \.iso$ \.7-zip$ \.jar$
acl x_limit url_regex -i \.zip$ \.rar$ \.pdf$ \.doc$ \.ppt$ \.xls$

# program
acl x_limit url_regex -i \.exe$ \.msi$ \.rpm$ \.bin$ \.swf$
acl x_limit url_regex -i webcam.yahoo.com

# port limit
acl x_port port 5100

# limit background services program-program microsoft yang terkoneksi
acl online_update url_regex -i microsoft.com windowsupdate.com

# web gak di batasi
acl y_limit url_regex -i .com$ .co.id$ .org$ .ac.id$ .web.id$
acl y_limit url_regex -i .tk$ .net$ .net.id$ .web.id$ or.id$
acl y_limit url_regex -i .sch.id$ .go.id$ .mil.id$ .war.net.id$
acl y_limit url_regex -i .biz$ .edu$ .gov$ .int$ .jobs$ .name$ .asia$

# web di limit
acl x_limit url_regex -i download.com

# streaming
acl x_limit url_regex -i youtube.com
acl x_limit url_regex -i seleb.tv

delay_pools 5

delay_class 1 3
delay_parameters 1 -1/-1 -1/-1 5000/10000
delay_access 1 allow x_limit x_time
delay_access 1 deny all

delay_class 2 3
delay_parameters 2 -1/-1 -1/-1 5000/10000
delay_access 2 allow x_port x_time
delay_access 2 deny all

delay_class 3 3
delay_parameters 3 -1/-1 -1/-1 1/1
delay_access 3 allow online_update
delay_access 3 deny all

delay_class 4 3
delay_parameters 4 -1/-1 -1/-1 -1/-1
delay_access 4 allow y_limit
delay_access 4 deny all

delay_class 5 3
delay_parameters 5 -1/-1 -1/-1 -1/-1
delay_access 5 allow x_limit !x_time
delay_access 5 deny all

Follow

Get every new post delivered to your Inbox.