Archive for October, 2010

Updated packages of varnish-2.1.4

Friday, October 29th, 2010

Varnish is a state of the art HTTP accelerator, used to keep sites like Twitter, Wikia and Facebook up to speed.

Varnish version 2.1.4 was released the other day. Users of RHEL5 and clones may now use Varnish Software’s own repo directly.

I have done a few improvements over the specfile in the released version. They will be synced upstream soon. I have built updated packages for Fedora Rawhide, 14, 13, and epel6. You can find them in their respective testing repos from where they will eventually trickle down to stable. I have also built updated packages for el4 and el5. You can find them at http://users.linpro.no/ingvar/varnish

If you use Varnish Software’s own repo for rhel5, the only changes to these newer packages are related to documentation and the building process, and there is no need to upgrade to these packages for stability or bugfix reasons.

Knut Hamsun: Victoria

Friday, October 29th, 2010

Hamsuns udødelige og ulykkelig stormfulle kjærlighetsdrama. Det er ikke spesielt overraskende lesing. Det er neppe nyskapende i handling eller utforming. Men sinnsykt bra, det er det.

Mange har sagt mangt om Victoria. Det er neppe nødvendig å si mer her. Alle bør lese denne boka.

Tom Egeland: Sirkelens Ende

Friday, October 29th, 2010

Den første boka om Bjørn Beltø, en saktmodig amanuensis i arkeologi ved Universitetet i Oslo. Som observatør ved en utenlandsk sponset utgraving ved Værne kloster i Østfold blir det funnet et verdifullt skrin. Overraskende nok blir skrinet fjernet i hui og hast av de utenlandske forskerne som leder utgravingen, uten at nødvendige prosedyrer blir fulgt, eller myndighetene varslet. Bjørn reagerer instinktivt, og forsøker å berge funnet.

For å løse mysteriet med skrinet må Bjørn ut å reise. Han drar Europa rundt, treffer vakre kvinner, blir forfulgt og kidnappet, og fordyper seg like mye i sin egen fortid som i skrinets hemmelighet.

Det er to ting som facinerer meg med denne boka. Det ene er den nesten frenetisk froydske forholdet Beltø har til sin mor og sin stefar. Det er så det nærmer seg et ødipuskompleks. Dette påvirker selvsagt forholdet til andre kvinner i livet hans. Historien kunne levd på dette temaet alene. Den hadde kanskje til og med blitt bedre. Det andre er selvsagt at boka kom ut før DaVinci-koden, men innehar elementer som en alibino i en av hovedrollene, reising rundt i Europa på jakt etter sannheten om Jesu død og oppstandelse og etterfølgerne hans, og hovedpersonen i boka på flukt fra farlige forfølgere. Som forfatteren selv sier i etterordet til boka, hadde det vært omvendt kunne han fort ha blitt anklaget for plagiat.

Fremstillingen av løsningen på gåten er mer lavmælt og stille en action-thrilleren fra Dan Browns hånd. Det gjør den ikke særlig mer overbevisende, men litt artig er det jo.

How to extend a volume on an IBM DS3400

Wednesday, October 20th, 2010

Among other hardware in our SAN, we have one of these nice and small, entry level SAN boxes from IBM. It’s called DS3400. It blends well into the rest of the SAN fabric, and seems to work quite well. So far, so good.

Today, I had to extend one of the volumes hosted on that box. So I started up the expected tool, the “IBM System Storage DS Storage Manager (Enterprise Management)” *pant*, found the box, the correct array, and volume (“Logical drive”), and expected to just right click and add capacity.

Not so.

Okay, so I looked at the “Modify” menu, which would let me “Add free capacity”, but in terms of disks to an array, not free space to a volume. After a bit of searching, I concluded that this fancy GUI does actually not let me grow a volume. How “Enterprise” is that?

After some extensive googling, I found that this was certainly right, it’s not possible to do this by the GUI. There is a CLI tool, available from the shell, or as a script editor in the GUI, and I should be able to grow a volume from that. Now, all I had to do was to find the correct syntax. I searched through the local help pages. There were no exciting hits for “expanding”, “extending” or “grow”. There were no matching entries in the FAQ. The script editor had a command reference, but without already knowing the correct command, it was useless. After even a bit more googling, I got the correct command line. It’s something like this, note the space and the semicolon at the end.


set logicaldrive ["MyVolumeName"] addCapacity=100 GB;

Or even from the shell:

# SMcli 10.11.12.13 -n our_nice_ibm_box -p secret_password \
  -c 'set logicaldrive ["MyVolumeName"] addCapacity=100 GB;'

Trivial when you know it, right? Why on Earth did they not implement a function in the GUI to support this?

For fun, I searched through the online manuals, and finally found a small note at page 96 in “IBM System Storage DS Storage Manager 10, Installation and Support Guide” mentioning the command among best practices using the cli.

No bonus points to IBM. It’s almost as one would think they did it on purpose.

Later today, I found another blog post, telling more or less the same as this one, and with a few noteworthy comments, like how to get a growing progress status – which of course is not visible in the GUI.

Edit: Memo to self:

sudo SMcli 10.11.12.13 -n ibm-box -p secretPassword \
-c 'show logicalDrive ["DataVolumeName"] actionProgress ;'

Henning Mankell: Den urolige mannen

Thursday, October 14th, 2010

Kriminaletterforsker Kurt Wallander har passert 60 år, og begynner å føle seg gammel. Han opplever også plutselige blackouts. Hvor var han? Hvor skulle han? Dette gjør ham bekymret og urolig. Samtidig får han oppleve den store glede bli bestefar.

I et selskap hos hans tilkommende svigersønns foreldre blir han betrodd en selsom historie fra en kalde krigen. Siden begynner folk å forsvinne. Kurt får en travel sommerferie.

Dette er en litt trist bok, som først og fremst handler om å bli gammel, og om hva som er viktig i livet. Wallander gjør regnskap for livet sitt. Det har ikke vært så ille. Men det er også savn. Som sekundærtema får vi litt om Sveriges rolle i den kalde krigen, og om dobbeltmoralen i det såkalte nøytrale Sveriges forsvar.

Anbefales, og ikke bare for krimelskerne.

Dette er den siste boka om Kurt Wallander. Vi kommer til å savne ham.

Fix a totally broken rpm database on rhel4

Tuesday, October 5th, 2010

RHEL4, while being old, is still widely in use. From time to time, on such old systems, the rpm database tends to break. It is just like that. The quick fix is

pkill -9 up2date
pkill -9 rpmq
pkill -9 rpm
rm /var/lib/rpm/__db.*
rpm --rebuilddb

Now, there are times when this is not enough. The package database is completely broken, and rebuilddb fails or leaves you with a broken database. Unless you can restore /var/lib/rpm from backup, the database is gone, and maintaining that system becomes … let’s just say … difficult. Now, if you are lucky, you discover this before /var/log/rpmpkgs.* are all rotated out. In the following, I assume that /var/log/rpmpkgs.1 is intact. If you have such a file, this approach may help:

First move the old database away and initialize a new one

mv /var/lib/rpm /var/lib/rpm.broken
rpm --initdb

Then manually download the correct redhat-release package from RHN, install it, and import the GPG key

rpm -ivh --nodeps redhat-release-4ES-9.i386.rpm
rpm --import /usr/share/doc/redhat-release-4ES/RPM-GPG-KEY

Now check if you are able to install a package

up2date --justdb --install bash

If your up2date cache is broken (may happen from time to time), scratch it

rm -rf /var/spool/up2date
mkdir /var/spool/up2date

If you had to clear out the cache, the next run of up2date must repopulate that cache, and may take a long time. I’ve seen systems using 15-20 minutes on this.

up2date --justdb --install bash

Now force install metadata for the kernel package and any other kernel related packages, as those are usually prohibited in the up2date config from being automatically dragged in by dependencies.

sed 's/\(.*\)-.*-.*/\1/' < /var/log/rpmpkgs.1 | grep ^kernel | sort -u | xargs up2date --justdb --install --force

If that went well, update the system with metadata from the repo, using the latest working rpmpkgs log file. Depending on your repos, network connection and system hardware, this may take a long time. Be patient.

sed 's/\(.*\)-.*-.*/\1/' < /var/log/rpmpkgs.1 | sort -u | xargs up2date --install --justdb

The scenario above fetched all packages from the active repos in /etc/sysconfig/rhn/sources. If the system has been broken over time, the packages in the repo may be newer than the content you have got on disk. That may lead to confusion, since you only updated the database with the latest versions, and not the actual package content. So finally, you must find and fix everything that went wrong

diff -u <(sort /var/log/rpmpkgs.1) <(rpm -qa --qf "%{name}-%{version}-%{release}.%{arch}.rpm\n" | sort)

If some newly installed packages are newer, you have to reinstall (--replacepkgs) them with content (without --justdb). Packages can be downloaded and reinstalled with

cd /var/spool/up2date
up2date --get packagename
rpm -Uvh --replacepkgs packagename-ver-rel.arch.rpm

Agatha Christie: Mord på Nilen

Friday, October 1st, 2010

Den unge, rike og svært vakre Linnet Ridgeway gifter seg med sin beste venninnes forlovede. Slikt blir det selvsagt bråk av. Bryllupsreisen går til Egypt, i båtreise på Nilen, og Poirot er heldigvis i nærheten når folk begynner å dø.

Klassisk “hvem gjorde det” i lukket miljø med begrenset persongalleri fra de øvre samfunnslag. Det mest imponerende i denne boka er ikke språk eller psykologi eller miljø eller annet litterært. Der imponerer den ikke. Men puslespillet; hvem gjorde det? Og hvordan? Det er temmelig intrikat. Hvor mange var egentlig innom denne lugaren i løpet av en natt?

De som sluker historier om Poirot har sikkert lest den allerede.