August 2009 Archives

Reading half a mirror

| No Comments

I have a disk holding half a RAID-1 (mdadm) mirrored ext3 partition bolted into an external enclosure. I wanted to read what was on it. I didn't want to mess up. (I'd lost the other half of the mirror.)

I'm moderately confident I could have created a new RAID device out of it; perhaps ...

mdadm -C /dev/md6 -l 1 -n 2 /dev/sdh6 missing

Or: perhaps I could have changed the partition type for /dev/sdh6 from fd (Linux RAID autodetect) to 83 (plain ol' Linux), and mounted the partition directly as an ext3 filesystem.

One of those could have gone wrong. (Not sure how, and didn't want to find out.) Instead, I took a copy of the partition...

dd if=/dev/sdh6 of=a-big-file-indeed.img bs=512

... and then played with my now-safe copy through a loopback mount:

mount -t ext3 -o loop,ro /d/a-big-file-indeed.img /mnt/old

This works, by the way, because RAID-1 partitions keep their RAID-y metadata at the end of the partition. Looking at the front of the partition, a Linux system just sees a plain filesystem. (Or so I'm told.)

Rsync's filter rules

| No Comments

I often claim that rsync is my favorite program. If bits need to be copied, it's somewhere between a decent and fantabulous choice.

Any rsync groupie will know about its --exclude option (to leave things out of the copy). For instance, '--exclude=*~' will avoid copying Emacs backup files.

What I only clocked to recently is that --exclude and friends are just a convenient interface to the real deal: rsync's filter rules. Here's a little bit of a file of 'em:

- *.iso
- /.beagle/
- /.lesshst
- _sc/linux_gcc-4.1.2/
- _temp/

The first line is exactly equivalent to '--exclude=*.iso'. The other lines show how to do "it has to be a directory" (trailing slash) and "it has to be rooted at the top of the copy" (leading slash).

If you plunk some rules in a file foo-filters, you suck them into rsync with '--filter= merge foo-filters'

There are other fiendish tricks I haven't used, e.g. per-directory files of filter rules ("When you get here, these are the rules to use.")

Where, oh where, is my VC501EA?

| No Comments

Yes, I love dull computers enough that I am toying with getting another.

A current cousin of my trusty HP dx5150 mini-tower is the dx2420. If you make your way to the dx2420 part of HP's web site and click on 'All Models', you will see about a dozen models... A couple of CPU speeds, a couple of hard-disk sizes, etc.

Over to the right (not a 'Featured Model'...) is the model VC501EA. It looks perfect for me -- a slightly faster CPU, the bigger (3MB) L2 cache, faster front-side bus, and a 320GB disk -- modest enough that I won't mind taking it out and replacing it with two bigger disks (to be RAIDed).

Best of all, the VC501EA comes with 'FreeDOS', in other words "no Windows". Which is precisely what I want (along with it being dull, dull, dull).

You can't buy a VC501EA direct from HP. (Well, I can't.) If I put the model number into Google, I get one page in what appears to be in Slovenian. (I don't even get the web pages I found just by clicking through the HP site.) Not a single online retailer -- really?

I called the HP sales telephone number listed next to the VC501EA. On the second try, I got someone who acknowledged that the product might exist.

I was given the numbers of three local companies who are HP "partners". What are my chances of them selling me a VC501EA? For less than a VC470EA (which has a bigger disk and two copies of Windows -- XP and Vista)? Wish me luck.

About this Archive

This page is an archive of entries from August 2009 listed from newest to oldest.

July 2009 is the previous archive.

September 2009 is the next archive.

Find recent content on the main index or look in the archives to find all content.