Friday, April 23, 2010

35TB Tape!

More big tape tech 20-50TB The cost of High Availability (HA) with Oracle The cost of High Availability (HA) with Oracle

Thursday, April 22, 2010

Oracle 11gR2 on JeOS

I wanna play with Oracle 11gR2 (and swingbench) stuff so Im going to use Oracle Enterprise Linux JeOS in Sun Virtual Box....
...more to come - unless I get bored or sidetracked

OK it would not even boot - shi7

new virtual box is out now v3.2.0b1 - renamed to Oracle Virtual Box
  • Experimental support for Mac OS X guests
  • Memory ballooning to dynamically in- or decrease the amount of RAM used by a VM (64-bit hosts only) (see the manual for more information)
  • CPU hot-plugging for Linux (hot-add and hot-remove) and certain Windows guests (hot-add only) (see the manual for more information)
  • New Hypervisor features: with both VT-x/AMD-V on 64-bit hosts, using large pages can improve performance (see the manual for more information); also, on VT-x, unrestricted guest execution is now supported (if nested paging is enabled with VT-x, real mode and protected mode without paging code runs faster, which mainly speeds up guest OS booting)
  • Support for deleting snapshots while the VM is running
  • Support for multi-monitor guest setups in the GUI (see the manual for more information)
  • USB tablet/keyboard emulation for improved user experience if no Guest Additions are available
  • LsiLogic SAS controller emulation
  • RDP video acceleration
  • NAT engine configuration via API and VBoxManage

MS data mashup tool

Microsoft PowerPivot for Excel - a free tool to download up to 100 million rows of data from different sources

Wednesday, April 21, 2010

Script to draw a circle

$seq 60|awk '{x=int(20+10*cos($1/9));y=int(40+20*sin($1/9));system("tput cup "x" "y";echo X")}'

If you do not have seq you can use #yes|head -99|cat -n

install SSH 5 on AIX 5.3 (get openssl need an IBM login)

#zcat openssl. | tar -xvf -
#zcat openssh-5.0_tcpwrap.tar.Z | tar -xvf -
# /usr/lib/instl/sm_inst installp_cmd -aQd /tmp/openssl. -f _all_latest -cNgXGY

geninstall -I "a -cgNQqwXY -J" -Z -d /tmp/openssl. -f File 2>&1


Pre-installation Verification...
Verifying selections...done
Verifying requisites...done

Filesets listed in this section passed pre-installation verification
and will be installed.

Selected Filesets
openssl.base # Open Secure Socket Layer
openssl.license # Open Secure Socket License # Open Secure Socket Layer


BUILDDATE Verification ...
Verifying build dates...done
3 Selected to be installed, of which:
3 Passed pre-installation verification
3 Total to be installed

Installing Software...

installp: APPLYING software for:
------------------------------------------------------------------------------- USR APPLY SUCCESS
openssl.license USR APPLY SUCCESS
openssl.base USR APPLY SUCCESS

# /usr/lib/instl/sm_inst installp_cmd -aQd /tmp/openssh-5.0_tcpwrap -f _all_latest -cNgXGY

geninstall -I "a -cgNQqwXY -J" -Z -d /tmp/openssh-5.0_tcpwrap -f File 2>&1

openssh.base.client USR APPLY SUCCESS
openssh.base.server USR APPLY SUCCESS
openssh.base.client ROOT APPLY SUCCESS
openssh.base.server ROOT APPLY SUCCESS

File /etc/group has been modified.
File /etc/passwd has been modified.

One or more of the files listed in /etc/check_config.files have changed.
See /var/adm/ras/config.diff for details
# openssl version
OpenSSL 0.9.8h 28 May 2008
# ssh -V
OpenSSH_5.0p1, OpenSSL 0.9.8h 28 May 2008
# ps -ef|grep ssh
root 159882 270364 0 15:57:06 pts/1 0:00 grep ssh
root 250034 131178 0 15:54:01 - 0:00 /usr/sbin/sshd

# lssrc -s sshd
Subsystem Group PID Status
sshd ssh 250034 active

How to replace dead hard disk in Solaris using SVM/SDS

For this example, consider the following 2 disks

# format < /dev/null

Searching for disks...done

0. c1t0d0
1. c1t1d0

Specify disk (enter its number):

# metastat -p
d300 -m d310 d320 1
d310 1 1 c3t1d0s0
d320 1 1 c3t2d0s0
d3 -m d13 d23 1
d13 1 1 c1t0d0s3
d23 1 1 c1t1d0s3
d5 -m d15 d25 1
d15 1 1 c1t0d0s5
d25 1 1 c1t1d0s5
d1 -m d11 d21 1
d11 1 1 c1t0d0s1
d21 1 1 c1t1d0s1
d0 -m d10 d20 1
d10 1 1 c1t0d0s0
d20 1 1 c1t1d0s0

The failed disk for this example will be c1t1d0 which is a mirrored copy of c1t0d0. The first thing we need to do is determine if this disk had any metadb replicas on it:

# metadb -i

flags first blk block count
a m p luo 16 8192 /dev/dsk/c1t0d0s6
a p luo 8208 8192 /dev/dsk/c1t0d0s6
a p luo 16 8192 /dev/dsk/c1t0d0s7
a p luo 8208 8192 /dev/dsk/c1t0d0s7
a p luo 16 8192 /dev/dsk/c1t1d0s6
a p luo 8208 8192 /dev/dsk/c1t1d0s6
a p luo 16 8192 /dev/dsk/c1t1d0s7
a p luo 8208 8192 /dev/dsk/c1t1d0s7

There are 2 metadb’s on the failed disk slices s6 & s7. We can delete these records.

# metadb -d /dev/dsk/c1t1d0s6 /dev/dsk/c1t1d0s7

The metadb records should now be deleted off the failed disk.(this is not actually deleting them off the disk - the disk is busted - its just saying they dont live there anymore)

# metadb -i
flags first blk block count
a m p luo 16 8192 /dev/dsk/c1t0d0s6
a p luo 8208 8192 /dev/dsk/c1t0d0s6
a p luo 16 8192 /dev/dsk/c1t0d0s7
a p luo 8208 8192 /dev/dsk/c1t0d0s7

Next we need to unconfigure the device to do this run a ‘cfgadm –al’

# cfgadm -al | grep c1t1d0
c1::dsk/c1t1d0 disk connected configured unknown

# cfgadm -c unconfigure c1::dsk/c1t1d0

The disk should now be unconfigured from the system

# cfgadm -al | grep c1t1d0

c1::dsk/c1t1d0 disk connected unconfigured unknown

You can go ahead with the physical replace of the drive.

Now, we will need to configure the drive.

# cfgadm -c configure c1::dsk/c1t1d0

To check it has been configured run:

# cfgadm -al | grep c1t1d0
c1::dsk/c1t1d0 disk connected configured unknown

now copy the partition table (VTOC) across from the working disk to the new disk. Prvtvtoc will print the VTOC to fmthard that will format the new disk

#prtvtoc /dev/rdsk/c1t0d0s2 |fmthard -s - /dev/rdsk/c1t1d0s2

The next step is to run metareplace on all the meta devices which lay on the dead disk c1t1d0. To identify these you can run ‘metastat -p’ again

# metastat -p
d300 -m d310 d320 1
d310 1 1 c3t1d0s0
d320 1 1 c3t2d0s0
d3 -m d13 d23 1
d13 1 1 c1t0d0s3
d23 1 1 c1t1d0s3 <-----HERE
d5 -m d15 d25 1
d15 1 1 c1t0d0s5
d25 1 1 c1t1d0s5 <-----HERE
d1 -m d11 d21 1
d11 1 1 c1t0d0s1
d21 1 1 c1t1d0s1 <-----HERE
d0 -m d10 d20 1
d10 1 1 c1t0d0s0
d20 1 1 c1t1d0s0 <----and HERE

As you can see from the above, c1t1d0 had mirrors in d0, d1, d3 and d5.

Do the following:

# metareplace -e d0 c1t1d0s0
# metareplace -e d1 c1t1d0s1
# metareplace -e d3 c1t1d0s3
# metareplace -e d5 c1t1d0s5

The disks should now start resyncronising, when this is complete all of the devices will be in the OK state.

#while :; do metastat -p | grep -i stale; sleep 5; done

hand and finger workout

went indoor rock climbing here last night for a couple of hours - taxes the fingers and hands pretty hard- its fair cardio too
The guys from my work who go are so much better than me its good motivation to try harder

HMCs for power7

IBM pSeries power7 hardware needs at least a CR3 HMC . CR5 (7042-CR5) is recommended - because it the most expensive?? - IBMs job (like almost all company's) is to make money - consulting, systems and software are just the tools to do that job is as far as CR2's can go
7.710 is what you need to manage power7

Sparks and fire - eruptions with lighting

How fugen weird are these, I had to check snopes to see if they were BS -as best as I can tell they were taken by a guy called Lucas Jackson

Friday, April 16, 2010

scary hands!

Do an image search for Russian arm wrestler Denis Cyplenkov, look at those paws

mkdvd vs mksysb in AIX for bare metal restore

mksys is a good tool but is a hangover from tape days, these days we like dvds and images - most machine dont even come with a tape drive (eg DAT) anymore but they do have DVDRAMs or DVD RO of some type
mkdvd is a wrapper for mksysb that will make a DVD image of your mksysb eg

#mkdvd -SI /dvd_backup_images/

This will create the image file into /dvd_backup_images/ with a name like cd_image_*
then you can use something like

#cdrecord -dao -speed=2 -dev=/dev/dvd /dvd_backup_images/cd_image_*
#burn_cd -d /dev/cd0 /dvd_backup_images/cd_image_*

(really you should NIM this shi7 but this is a stand alone example say)

wakko aix/pssp terms

smitty skulker efence worm hats hags supper

don't forget amd(fan) , ipl (boot) ,dasd(disk), purr and spurr

this list will grow as I remember stuff

Thursday, April 15, 2010

Old skool scripting

In this world of HTML5/CSS3 and python sometimes I forget the power of the simple 2 letter UNIX utilities like dd,od,tr..

this one saved me today..saved me time that is ;)
tr [:upper:] [:lower:] ....too easy!

deadlift bench press descending super set experiment

My gym membership ran out last month so I paid for a casual today and I wanted to do a lot as I may only exercise once this month!

Did a deadlift/bench press descending super set, Ive tryed a squat deadlift super set and just died - too much work and hits the same posterior chain too hard so I gave DL+BP a go, BP does not tax me too much
Went ok started the deadlifts at 405lbs x3(I got 5 in me for that) and benchpress about 290 (x5) and keept dropping down to 100kg on both (DL stiff leg)

Lets see if I'm sore tomorrow it was a good time-economical workout

Tuesday, April 13, 2010


AIX 7 is coming!

.......more generally

$echo AIX $(($(date +"%Y")-2003)) on POWER $(($(date +"%Y")-2003))

I saw on that NCSA/IBM dont run AIX on there biggest POWER7 HPC cluster systems anymore, eg Blue Waters


A client is looking at moving from Oracle 10g on AIX5.3, all JFS2 file systems to ASM. The SAN is HDS: USP-V fronting USP and AMS arrays. HDS supports Thin provisioning with Oracle ASM based storage so it would be nice to have for migrations,they wont need to have all of the storage up front and according to Oracle its OK Page 22 is a little worrying based on Oracle's testing, there is a potential of 8-25% adverse performance impact when thin provisioning is used. I guess thats when ASM is striping AND HDS is striping in the background too - ASM must be told external RAID is being used basically.

As long as they do as recommended, ie all RAID Groups and Parity Groups in a pool are taken from multiple/different back end adapters, same disk size/speed, same RAID levels they should hit the performance statistics mentioned under "ASM on HDP - Recommended configuration".

RAID Groups and Parity Groups are just terminology for the group of disks configured in a RAID set in HDS Modular(AMS) & Enterprise(USP) arrays respectively.

Saturday, April 10, 2010

Stamp collecting is a hobby,"not stamp collecting" is not

Richard Feynman on doubt, uncertainty: the "everything is possibly wrong" statement that Feynman says is a tenant of scientific thinking resonates with me and got me thinking about about what I fundamentally believe, not what I've been told but what are my core beliefs based on experience and my own thinking

1) A truth [and all true things] can be questioned and when you have A truth no matter which line of questioning you approach it from a truth will be re-enforced.
2) Its wrong to do something to someone else you would not want done to yourself
3) Question authority

Have you ever been wrong about something? [everyone - yes!]
Could you possibly be wrong about this?[only reasonable answer from a critical thinker is 'yes' - 'no' shows up an irrational thinker]

which got me thinking about Pascal's wager which lead me to this great vid

mounting CDROMs,ISOs and windows share in un*xs

In general its the mount command then some option for what the cdrom (or other) filesystem then some read-only option, then the device, then the mount point

mount -v cdrfs -o ro /dev/cd0 /mnt/cdrom
##### mount an .iso image ####128M PPs on hdisk2
mklv -y cdlv -s n -L /dev/cdlv vg00 $(du -m dvd1.iso|awk '{print int($1+128)"M"}') hdisk2 ; dd if=dvd.iso of=/dev/cdlv ; mount -v cdrfs -o ro /dev/cdlv /mnt/iso

NB: pretty bad eh and you need enough space on disk2 to copy it to, and it takes ages. I wrote this 1 liner in a post to usenet and I see its all over the net now as the way to mount in AIX 5.3 eg

I guess you should really do it from the VIO server these days

or like this

or in AIX6 like this
loopmount -i cdrom.iso -o "-V cdrfs -o ro" -m /mnt

mount -t iso9660 -r /dev/hdb /mnt/cdrom
##### mount an .iso image ####
mount -o loop dvd.iso /mnt/iso

mount -F hsfs -r /dev/dsk/c0t6d0s2 /mnt/cdrom
##### mount an .iso image ####
lofiadm -a dvd.iso; mkdir /mnt/sol ; mount -t hfs /dev/lofi/1 /mnt/iso
mount -t cdfs -o ro /dev/dsk/cqd1s0 /mnt/cdrom

Windows!!! you can mount SMB/(Windows shares) to Linux with just the mount command:
### Linux
mount -t smbfs -o username=billy,password=apple22,workgroup=CORP //fileserver/fileshare /mnt/windowsdrive

### AIX

root@[scatst]/>mount -v cifs -n scadc01/temp02/temp02 -o wrkgrp=sca01,uid=205,fmode=750 /Sapinterface /scadc01

This basically says put the CIFS(windows SMB) share /Sapinterface from node scadc01 with login user=temp02 and password=temp02 with domain=sca01 on the AIX box as /scadc01 with read, write and execute permission for the user with UID=205

The Microsoft Services for Unix (SFU) help has all of this information and step by step howtos but basically on your side you need to:-

Log on as a member of the Domain Admins group of the server's domain
Install Server for NFS Authentication (and SFU etc)
[Server for NFS Authentication must be installed on every domain
controller in any domain containing users who will access files
through Server for NFS]
Log on as a member of the (local) Administrators group.
Install Server for NFS
Configure user authentication. Install "User Name Mapping" on at least
one server in the network and then specify the User Name Mapping
server that Server for NFS should use for authentication.

Check Server for NFS service, is running
On windows Services For unix shell:-
nfsshare scadev=C:/sharefolder root=

Then on AIX we can:-
mount -v nfs3 -n /share /mnt/share

wont go into samba - its all over the net and

Thursday, April 8, 2010

All new power7 p770s

We bought 3 3CEC IBM pSeries p770s a few weeks back- first in Australia me thinks

Its the end of model run out sale!!

Upgrading power5 p595s to power6+ 5Ghz ,power 595s (9119-FHA ) has got to be a great bang for buck upgrade.

P595's have no end of life against them yet and the power6+ processor books have dropped in price almost 50% (eg ) and a 64 core p595 upgraded with 5GHz p6+'s is about as powerful as a new power7 3.5Ghz 64 core p770
System Name SPECint_rate20063 SPECfp_rate2006
IBM Power 595 2160 2180
IBM Power 770 2013 1689

(so you can still consolidate a lot more eggs into the same basket if thats your aim) and p595 has better RAS eg no single p5ioc chip handling both GX++ ports ie loosing the wron p5ioc kills all IO on the CEC - this was the case with the p570's too)

power6+ can do all the multiple shared pools(oracle savings), VIO, AIX6.1, WPAR, live partition mobility, micropatitoning, active memory sharing (not active memory expansion(Trade CPU for RAM) or max/turbo/intelli core that all sound a bit multimedia cdrom come MMX technology to me)

p595s can be upgraded to power 595s with just new power6+ books - no need to change anything else its what Auspost did - just by adding the new power6+ books you can free up lots of space (consolidating) and gain all of the good power7 features without increasing your footprint 1RU (Chris Gibsons experience)


I've been thinking about how well meaning IT architect/designer types [such as myself] over engineer solutions because we are propeller heads at heart.
At the end of the day most solutions/system are just filing cabinets - sure they are huge and relational and have business-logic and stuff in there but at the end of the day a query comes from a user or web and some data comes back, or goes in - you get the picture - Its a records system - focus on that more than the technology(CPU/OS/DB/Stroage/ETC) that the filing cabent is composed of

ANYWHO I see so much downtime due to over engineering features to reduce downtime so I started trying to write basic rules on how to design simple systems and keep propeller tendencies in-check. I personally think we should try and find non IT solutions to problems some - seriously it would be cheaper to use filing cabinets and clerks sometimes that some 'enterprise ready HA CRM/ERP system etc metats perhaps? How old is the NE555 IC or BC546 transitor - they have their place

Unless otherwise absolutely unavoidable...

No NIC shall be teamed/bonded/aggregated or trunked unless there is insufficient BW - added complexity and cost does not out weigh cheap simplicity

No servers shall be HA clustered within the same site, DR should be site by site

Choose vertical redundancy over horizontal redundancy i.e. in a muliti tired application rather than having multiple layers of multiple database, app and web servers have multiple servers but design so each server has database app and web- if possible

No software or OS shall be upgraded or patched if its working fine (bird in hand rule + if it isn't broke don't fix rule)

Never adopt the latest version of any software under any circumstance just to keep current

Invest design effort in quick restores after incidents, do not waste time trying to fix

In all security vs. functionally trade-offs functionality must win

In any hardware vs. skills trade-off for performance tuning go hardware as skills cost more than ram

No OS shall be customised or tweaked from default installation options for performance reasons, only for functionality

Purchase hardware that gives the best bang for buck, not absolute performance

For any system that requires HA or failover of some type - the failover mechanism should reside as high as possible up the hard/software stack(e.g. like dns - one host down try the next , application over RAC rack, RAC over OS level cluster)

Wednesday, April 7, 2010

Single threaded CPU benchmark

Every time I get on a new un*x/linux box I like to run this primes.c calculator, its no specint or swingbench but hey, its simple and I'M RUNNING IT - I like to see the results myself and encourage everyone to run there own tests - seldom trust web tests and never trust vendor tests!

I'm often surpised that the cheap commodity intel/amd cpus outperform the expensive enterprise RISC CPUs. Sure there are arguments about workload,cache,exacution pipelines,out of order execution and and holistic system balance (search usenet for my posts about this) but I would expect a $20,000.00 CPU to kick ass on a $2000.00 IN EVERY LOAD and it does not....

### THE TEST ###

cat <<> primes.c
main(int argc, char *argv[])
int I1 = 1;
int I2 = 100000;
int I3;
int I4;
int I5;
int I6 = 0;
int I7;
printf("N primes up to ");
printf("%d", I2);
printf(" is: ");
I3 = 2;
I4 = I1 / 2;
I5 = I1 % I3;
if (I5) {goto OK;}
goto NEXT;
if (I3 <= I4) {goto LOOP;}
I7 = I1;
if (I1 <= I2) {goto REDO;}
printf("%d\n", I6);
printf("last is: %d\n", I7);
return 0;
gcc primes.c -o primes
time ./primes
N primes up to 100000 is: 9592
last is: 99991

real 0m X
user 0m Y
sys 0m Z

#### THE RESULTS #####

UltraSPARC-2i 450Mhz
real 0m46.27s
user 0m46.24s
sys 0m0.01s
UltraSPARC-T1 1.2Ghz
real 0m32.13s
user 0m32.11s
sys 0m0.00s
POWER3 450Mhz
real 0m22.40s
user 0m22.30s
sys 0m0.00s

UltraSPARC-T2 1.2Ghz
time ./primes
N primes up to 100000 is: 9592
last is: 99991

real 0m16.81s
user 0m16.80s
sys 0m0.00s

sparcv9 processor operates at 1167 MHz
cc primes.c -o pri
time pri
N primes up to 100000 is: 9592
last is: 99991

real 0m17.62s
user 0m17.61s
sys 0m0.00s

POWER5 1.65Ghz
real 0m11.60s
user 0m10.57s
sys 0m0.00s
real 0m11.44s
user 0m8.71s
sys 0m0.00s
UltraSPARC-IV+ 1.95Gz
real 0m8.86s
user 0m8.85s
sys 0m0.00s
UltraSPARC-IV+ 2.1Ghz
real 0m8.22s
user 0m8.21s
sys 0m0.00s
real 0m7.97s
user 0m7.88s
sys 0m0.00s
Dual-Core AMD Opteron 2.8Ghz
real 0m3.729s
user 0m3.728s
sys 0m0.004s
Intel(R) P4 1.66GHz
real 0m2.879s
user 0m2.671s
sys 0m0.015s
Intel Pentium M 1.60GHz
real 0m2.710s
user 0m2.694s
sys 0m0.008s
Intel Quad 2.33Ghz
real 0m1.663s
user 0m1.662s
sys 0m0.002s
Intel(R) Core™2 Quad 2.4GHz
real 0m1.638s
user 0m1.625s
sys 0m0.010s
Intel Xeon(R) dual 3Ghz
real 0m1.325s
user 0m1.325s
sys 0m0.001s

Intel(R) Xeon(R) CPU E5450 @ 3.00GHz
real 0m0.82s
user 0m0.80s
sys 0m0.00s