Archive for the ‘techie’ Category

BIG SHARKS GET BIGGER … small fish get eaten

Thursday, January 17th, 2008

SUN buys MySQL for $1 Billion
Oracle buys BEA for $8.5 Billion

Capitalism, defined.

Not in the US? You’re “less human”!

Sunday, March 26th, 2006

This is somehow humiliating, yet I kid you not I often feel we deserve it. I don’t want to sound as extreme as Ghandi, but it if there is anything we need we better make it ourselves. Way to go.

US Onlt!
Don’t get me wrong, food and clothing have indeed a higher priority than an online ‘a $1 per CPU/hr grid computing account’!

LVM Anomalie

Saturday, March 25th, 2006

I walk in the office on a fine Sunday morning to find out electricity has gone down restarting all boxes. One of my Debians wouldn’t leave runlevel 1 because of a logical volume not being mapped. I started the a typical bottom up troubleshooting procedure and at the first step (forget the vgscan and lvm libraries loading) :

timon:~# pvdisplay
Couldn’t find device with uuid ‘CMXpz2-HQQw-RO4k-5K2J-0mO4-oxTY-WvkY7W’.

— Physical volume —
PV Name unknown device
VG Name data_vol_grp
PV Size 74.53 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 19079
Free PE 0
Allocated PE 19079
PV UUID CMXpz2-HQQw-RO4k-5K2J-0mO4-oxTY-WvkY7W

— Physical volume —
PV Name /dev/hdd
VG Name data_vol_grp
PV Size 37.27 GB / not usable 0
Allocatable yes (but full)

….
This was – of course – creepy, knowing the drive was brand new, seen by the BIOS and detectable with a simple `fdisk -l`! Also check out the contradiction in italic.

After an hour of playing around … given I know the device path all I had to do is a `pvdisplay /dev/hdc` to get a healthy listing right there :O

I carried on with a `vgchange -a y data_vol_grp` followed by a `fsck.reiserfs` and finally mounted the volume and all was good!

Just thought I’d save some time and ATP burning surprise fellow admins should you ever experience this, especially that (as sledomly as it happens) google wasn’t that helpful.

Happy Hacking

Freakin geeky culture

Wednesday, March 8th, 2006

So .. I’m on GTalk (the embedded one) talking to a fellow geek after a long day of work – which some of you know ends at 1 am for me. Conversing with a typical opener he asks how was I, and I immediately reply “shughol … too much of it” n his response was:

as long as you have enough caffiene at work,
ou betrawe7 to a loving machine at home,
kolo tamam

GOD … I think we’re just born like that … don’t get me wrong and think I dislike it ;)

Gotcha – Filenames with spaces and the Shell

Thursday, February 23rd, 2006

I had to write to a shell script that parses a bunch of files. The
problem was some of the file names contained spaces. Here is a sample
scenario and the resolution.

Let’s say you had files: “test 1″ and “test 2″ and you tried to do
something as trivial as:

#!/bin/bash

for f in `ls test*`
do

cat $f

done

the result would be:

cat: test: No such file or directory
cat: 1: No such file or directory
cat: test: No such file or directory
cat: 2: No such file or directory

The resolution would be:

#!/bin/bash

IFS=”

for f in `ls test*`
do

cat $f

done

The explanations is that the IFS (interfield seperator) in the shell
defaults to space tab or newline. The space is part of the filename in
our case which will result in two seperate files.
So what we do at the begining of the script is set the IFS variable to
newline only.