Harry

Almost a Blog

Month: April, 2007

Delete /dev/md0

If ever you make a mistake with software raid and you want to start from scratch by removing /dev/md0, the following command is a good place to start.

mdadm -S /dev/md0

Then create the array again as normal using something like
mdadm –create /dev/md0 –level=5 –raid-devices=3 /dev/sd[abc]1

Advertisements

Test::Harness Confused test output

If ever you get this error when using Test::Harness check to make sure that you are not printing anything that is interfering with it. See:
Test Anything Protocol

Test/Item/m_find_using_term_ids….ok 2/90Confused test output: test 2 answered after test 2
Test/Item/m_find_using_term_ids….ok 3/90Confused test output: test 3 answered after test 3
Test/Item/m_find_using_term_ids….ok 4/90Confused test output: test 4 answered after test 4

DegradedArray event

If you ever get one of these, count your lucky stars and get the array fixed. In my case I have lost one of the drives.

This is an automatically generated mail message from mdadm
running on debian
A DegradedArray event had been detected on md device /dev/md0.
Faithfully yours, etc.
P.S. The /proc/mdstat file currently contains the following:
Personalities : [linear] [raid1]
md0 : active raid1 hdc1[1]
78148096 blocks [2/1] [_U]
unused devices:

Debian NO_PUBKEY

If you ever get an error like this.

W: GPG error: http://non-us.debian.org stable/non-US Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY F1D53D8C4F368D5D
W: You may want to run apt-get update to correct these problems

The way I solved it was as follows. As root…

# apt-get install gnupg
# gpg –keyserver wwwkeys.eu.pgp.net –recv-keys F1D53D8C4F368D5D
# gpg –armor –export F1D53D8C4F368D5D | apt-key add –
# gpg –export F1D53D8C4F368D5D >> /etc/apt/trusted.gpg
# gpg –list-keys

Yahoo Slurp

Not sure if anyone else has noticed recently but Slurp has been doing a lot of of Spidering lately. I actually took extreme measures today and added a crawl delay to the site.

WWW::Mechanize Fun

I have been writing a test suite for a website recently and came upon the following error.

Illegal value ‘GBR’ for field ‘country_iso’ at /usr/local/share/perl/5.8.4/WWW/Mechanize.pm line 1232

This seemed strange to me at first but when I thought about it I was using the following code

$mech->select(“country_iso”, ‘GBR’ );

If the value i.e. “GBR” in my case is not a valid select option then obviously WWW::Mechanize or rather HTML::Form will throw an error. It was actually HTML::Form::ListInput that the error came from but this is a package declared in the HTML/Form.pm module.