omconfig storage controller action=importforeignconfig controller=x
9/433
Uncategorized
offline and online a cpu
If you want to disable a cpu in opensolaris:
root@cluster1:~# psradm -f 1
root@cluster1:~# psrinfo -v
Status of virtual processor 0 as of: 08/13/2009 10:10:45
on-line since 08/12/2009 04:00:42.
The i386 processor operates at 2993 MHz,
and has an i387 compatible floating point processor.
Status of virtual processor 1 as of: 08/13/2009 10:10:45
off-line since 08/13/2009 10:10:42.
The i386 processor operates at 2993 MHz,
and has an i387 compatible floating point processor.
And if you want to reenable it
root@cluster1:~# psradm -n 1
root@cluster1:~# psrinfo -v
Status of virtual processor 0 as of: 08/13/2009 10:11:35
on-line since 08/12/2009 04:00:42.
The i386 processor operates at 2993 MHz,
and has an i387 compatible floating point processor.
Status of virtual processor 1 as of: 08/13/2009 10:11:35
on-line since 08/13/2009 10:11:32.
The i386 processor operates at 2993 MHz,
and has an i387 compatible floating point processor.
71/433
Stats script based on top for Solaris
you can do this
(date “+%d %m %H %M %S %Y”
/usr/local/bin/top -b | head -4) >> /tmp/top.txt
Then parse and collect:
echo “date,time,loadavg1,loadavg5,loadavg10,processes,sleeping processes,on cpu,cpu idle,cpu user,cpu
kernel,cpu iowait,swap,memory,free mem,total swap,free swap”
cat /tmp/top.txt |nawk ‘ORS=NR%5?” “:”n”‘ | tr -d ‘[:alpha:]’| sed ‘s/;//g;s/:/ /g;s/,//g’ | awk ‘{ print
$1″/”$2″/”$6″,”$3″:”$4″:”$5″,”$8″,”$9″,”$10″,”$17″,”$18″,”$19″,”$20″,”$21″,”$22″,”$23″,”$24″,”$25″,”$26″,”$27”,”$28
}’
this builds a csv you can import in a spreadsheet
7/433
Configure the VCS hagui service
for those who feel comfortable with the hagui in Veritas Cluster, and cannot use it because you don’t have the daemon
running, you must add this section to your /etc/VRTSvcs/conf/config/main.cf:
group ClusterService (
SystemList = { hst101 = 0, hst102 = 1 }
AutoStartList = { hst101, hst102 }
OnlineRetryLimit = 3
Tag = CSG
)
IP webip (
Device = eth0
Address = “172.20.162.15”
NetMask = “255.255.254.0”
)
Where you need to change “hst101” and “hst102” to the hostnames of your nodes, and configure your
network interface accordingly.
Edit VCS main.cf using vi
Sometimes you need to edit your veritas cluster configuration file “main.cf” and you feel the urge to do it using vi, here’s
how to do it:
hastop -all
cp main.cf main.cf.copy
vi main.cf
hacf -verify /etc/VRTSvcs/conf/config
hacf -generate /etc/VRTSvcs/conf/config
hastart
262/433
is your solaris running on 64bit or/and 32bit?
Just type
# isainfo -v
Print only process numbers from a fuser output
bash-2.03# fuser -c / 2>&1| tr -d ‘[:alpha:]’ | sed ‘s//://g’
21567 21566 21523 21507 21476 21397 20978 20711 20608 20598 19955 19921 19912 19873
19872 19871 19870 19869 19868 19867 19860 19859 19750 19743 19512 19187 19186 19185
19184 19183 18779 18357 18346 18048 17566 17224 17220 17218 17198 17035 17033 17031
17029 17014 16990 16964 16584 16582 15883 15881 15739 15327 15325 15320
72/433
Change timezone in solaris
Edit /etc/TIMEZONE and use one of the typical:
US/Eastern
US/Central
US/Mountain
US/Pacific
or look for an appropriate timezone in /usr/share/lib/zoneinfo
After this reboot your server with shutdown or init.
237/433
Raid Manager commands
Got these from elsewhere:
Term/Cmd Description Command / File
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
SUNWosafw Open Storage Array Firmware
SUNWosamn Open Storage Array Man Pages
SUNWosar Open Storage Array (Root)
SUNWosau Open Storage Array (Usr)
arraymon Array monitor daemon < /usr/lib/osa/bin/rdaemon 28 140 > in background
rdaemon Redundant Controller Resolution Daemon < /usr/lib/osa/bin/arraymon > in background
rm6 Raid Manager GUI
# /usr/lib/osa/bin/rm6 &
raidutil RAID Management Configuration Utility
# raidutil -c c6t5d0s2 -A 65 1 -T 99 1 -f 1 1-C off 1 -m off 1 -p disable -S 8
raidutil Create new lun
# raidutil -c (raid controller) -g (disks) -l (raid level) -n (number of LUN) -s (capacity)
raidutil Create RAID5 lun 0
# raidutil -c c3t4d1s0 -s 1000 -n 0 -l 5 -g 11,21,31,41,51
raidutil Create RAID1 lun 2 (18g)
# raidutil -c c2t5d0s0 -l 1 -n 2 -r fast -s 17234 -g 50,11
raidutil Create Hot Spare
# raidutil -c (raid controller) -h (disk)
raidutil -c c2t5d0s0 -h 213
raidutil Delete a LUN
# raidutil -c (raid controller) -D (LUN number)
raidutil Delete lun 0
# raidutil -c c3t4d1s0 -D 0
raidutil Delete Hot Spare
# raidutil -c (raid controller) -H (disk)
raidutil -c c3t4d1s0 -H 113 (row,column 113=1,13)
lad List Array Devices
# lad
healthck perform a health check on RAID Modules # healthck -a
healthck Get raid module specifier
# healthck -a (ex: da103_001: Optimal)
drivutil Display Drives associated with groups
# drivutil -d
drivutil Fail a Drive
269/433
# drivutil -f 01
drivutil Report Status or reconstruction status
# drivutil -p
drivutil Unfail a drive and recontruct data
# drivutil -U
log Log file /usr/lib/osa/rmlog.log
logutil Log format utility – View log # logutil
rmparams Parameters file /usr/lib/osa/rmparams
rdacctl Correct problem of LUNS on different
# rm /dev/rdsk/c3*,/dev/rdsk/c5*,/dev/dsk/c3*
controllers on shared A3500 in cluster
# rm /dev/dsk/c5*,/dev/osa/dev/dsk,rdsk c5* c3*
# rdacctl config;drvconfig -i sd, disks
kraftek.html POSTS rescue rescued.html rescued.txt x y z BEGIN RAID Manager addition
kraftek.html POSTS rescue rescued.html rescued.txt x y z DO NOT EDIT from BEGIN above to END below…
forceload: drv/sd
forceload: drv/rdnexus
forceload: drv/rdriver
kraftek.html POSTS rescue rescued.html rescued.txt x y z END RAID Manager addition
270/433
Lighttpd reverse proxy
Whenever you visit http://website/cam, you get connected to http://192.168.0.168:80
$HTTP["url"] =~ "(^/cam/)" {
proxy.server = ( "" => (
"192.168.0.168:80" => # name
( "host" => "127.0.0.1",
"port" => 82
)
)
)
}
# URL Rewriting Proxy
#
$SERVER["socket"] == ":82" {
url.rewrite-once = ( "^/cam/(.*)$" => "/$1" )
proxy.server = ( "" => (
"192.168.0.168:82" => # name
( "host" => "192.168.0.168", # Set the IP address of 192.168.0.168
"port" => 80
)
)
)
}