A homecoming planned

Many moons ago, we booked tickets for Canada, leaving Perth 24 June 2009, returning 17 Feb 2010. We couldn’t book them for the exact period of time we wanted.. plans were to stick around for a year, so we thought we’d just change dates.

Well.. erm. We like it here. So we’re going to take the tickets home, clean up some loose ends then head back here again in early/mid March, probably on a return ticket that would have us back in Perth during Christmas 2010/ NY 2011.

Plans for our time in Perth include dinner at Utopia (firstly probably on the 18th), then O-Day on the 19th of Feb. We’re also heading up to Karratha to visit family on the long weekend of Feb 26-Mar 1. I’ve never been there before, so that should be fun.

Not entirely sure where we’re going to be staying while we’re in Perth, since both of our parents are talking about renting out their homes, but eh, that’s part of the excitement :)

Qantas’s bicycle plane

Was going through some old digital photos (2002 :P) and came across one of a Qantas 767 with a white tail (instead of a red one). Did some reading up on it. They operated a couple of them after Ansett’s collapse in 2001.

One in particular was frame 27909/591, built in 1995.

Turns out this plane gets around a bit. Since 1995, it has been operated by:

  • Lauda Air
  • Vietnam Airlines (with Australian registration..)
  • back to Lauda
  • untitled with US reg
  • Kenya Airways (again with Australian reg)
  • Qantas
  • back to untitled with US reg
  • back to Vietnam Airlines (with Vietnam reg)
  • Air China
  • Varig
  • and now with Ethiopian Airlines

I think I’d be worried about hull thickness with the number of times this has been stripped and repainted :P

Canadian Working Holiday for Australians

It occurs to me that this may be of interest to some people. My wife Elizabeth and I are currently in Canada on a working holiday, and have been for the last 6 months. Much like in Australia, I’m currently working in IT for a University, which is a lot of fun and gives me fun toys to play with. Elizabeth was working for a software company, but they’ve moved out of town, so she’s on.. erm.. home duties right now.

If you’re someone from the Internet, or someone I know, and interested in doing a working holiday in either Australia or Canada, feel free to email me – whp@splash.theducks.rog (correct the typo) and I’m happy to answer any questions you might have.

The basic process:

  • Apply for WHP Visa via http://www.whpcanada.org.au
  • Once approved, book plane tickets
  • Sell/store/give away all of your stuff
  • Tidy up paperwork for things at home (Power bills, car rego, etc)
  • Start looking for a job in Canada
  • Book initial accommodation
  • Make your way to Canada, with proof you have $4000 to support yourself. We weren’t asked, but you might be. We took a C$5000 bank draft from our Australian bank to a Canadian bank plus bank statements
  • As soon as you get there, sort out an address to get things posted to
  • Apply for Social Insurance Number + Card. This gives a piece of government notarised paper with your address on. They mail out the card in a week or two
  • Open bank account
  • Get a cellphone account (you can use a Canadian SIM in an unlocked Australian phone)
  • Get job, get paid
  • Optional steps: Get driver’s licence by passing a knowledge test, then a practical driving test. Easy hints – cyclists are assumed to be insane (and are), and the yellow line down the middle of the road means it’s 50km/hour limit)
  • Have fun!

Some things to know about banking in Canada as a newcomer

  • If your Australian bank card has a Cirrus or Maestro logo on it, you can use it in an Canadian bank machine (they call ATMs ABMs – Automatic Bank Machine). You should assume you will be doing this for about a month, even if you get a job
  • Some banks, I’m looking at you HSBC, won’t give you an account if you don’t have a job (or if you didn’t have an account with them in another country).
  • Best bet is probably the one your Australian bank drew the draft on. Deposit the bank draft, and some cash withdrawn from your Australian card to cover bank fees
  • Most banks will also put a 7 day quarantine on your account for the first month, meaning it takes 7 days for any deposits to be validated
  • Most banks in Canada don’t personalise Automated Bank Machine (ABM) cards, so you’ll probably get one of those straight away. As well as some more official looking paperwork with your name + address on them.
  • You might even get a few counter cheques, but of course, don’t use them until your draft has cleared, or until you start getting paid and your pay has cleared.
  • Once you’ve had a job for about a month, and two pay cheques, there’s a good chance you could apply for a Canadian credit card, which is helpful for paying bills over the phone, etc
  • If you’re not sharing a house with a Canadian, you will probably need a cheque book ($30-40) for rent, bill payments etc. In comparison to the Australian BSB/Account details to enable easy peer-to-peer transfers into accounts only, the equivalent numbers for Canadian accounts allow withdrawals, so aren’t used much

Some things about applying for jobs in Canada:

  • Canadian employers are required to say “Canadians and permanent residents of Canada will be given priority”. My understanding is that generally they mean it.
  • So unless you have a pre-arranged job, or a reasonable amount of experience, or prepared to work for minimum wage ($8/hour in BC) maybe this isn’t the place to come.
  • For more professionally oriented jobs, instead of addressing selection criteria specifically, you cover it more generally in a cover letter

I’ll update this post as I think of more to include…

Boeing Tour

A preface.. a week or two ago, Boeing rolled out the first 787-8f. I wasn’t a fan of the livery, and said so on twitter. The twitter rep for Boeing’s Future of Flight noticed this, and invited me down to have a look at it in person, and take the tour of the factory, for free *Squee* :D

So we rented a car, and and her parents and I headed off down there.

Well, back up a second. I rented a Red, 3.5L V6 Dodge Charger. It was a freakin’ awesome car, with only 2400kms on the clock (we did another 380kms). Shame it was raining most of the day. Second hand prices aren’t too bad either. Hmm! :D

I went on the tour in 1999 with my mum, but I didn’t have the plane-nerd background I do now, so I knew this was going to be different. Also, we almost got crashed into in a high speed car chase back in 1999, which fortunately didn’t happen this time. The whole concept of being able to drive to another country for a day trip is cool. Back in 1999, they had a small shop in the middle of a parking lot. They now have a huge exhibition center + store. The exhibition center has all sorts of cool stuff to walk up to and touch and feel, such as a 747 tail, GE90 engine, a 787 carbon fibre re-enforced plastic section 41-43 or so and a 727 cockpit.

The tour starts in the 747 assembly hall, where they were making line number 2 – 6 of the 747-8f. I was reminded once again just how amazingly complex building a plane is. And that building is something else.. it’s huge, and contains a mix of offices and assembly areas and cafeterias. I’d kind of like to work there, much in the same way that as a concept, working in an Apple store would be cool. You then hop back in the bus and go onto the 777/787 production area. Also interesting to see.

All up on the tour, I saw:

  • N787EX – First 787 (as well as the next 12 or so in production)
  • N7808A – First 747 Dreamlifter
  • N747EX – First 747-8f (as well as the next 6 in various stages of production)
  • A6-ECX – New 777-300 delivery flight for Emirates
  • .. and some other stuff

So I’ve now seen the first 737, 747, 757 and 787. The first 727 is also at the Paine Field Airport, but I didn’t see it. Eventually I’ll see it and the first 707..

All up, good fun. Thanks so much to Sandy for the invite :)

Expanding LVM Partitions in VMware, on the fly

In my previous post on the subject, I expanded Filesystems on LVM without rebooting, by adding more partitions. As pointed out by Zanchey, there is a much cleaner way to do this, by just resizing existing partitions being used by LVM.

# fdisk /dev/sda

The number of cylinders for this disk is set to 9790.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 80.5 GB, 80530636800 bytes
255 heads, 63 sectors/track, 9790 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 14 104391 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 14 4178 33450007+ 8e Linux LVM
/dev/sda3 4178 8354 33549073+ 8e Linux LVM
/dev/sda4 8355 9137 6289447+ 8e Linux LVM

Command (m for help): q

###
### Extend the VMDK in vCenter
###

# fdisk /dev/sda

The number of cylinders for this disk is set to 9790.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 80.5 GB, 80530636800 bytes
255 heads, 63 sectors/track, 9790 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 14 104391 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 14 4178 33450007+ 8e Linux LVM
/dev/sda3 4178 8354 33549073+ 8e Linux LVM
/dev/sda4 8355 9137 6289447+ 8e Linux LVM

Command (m for help): q

###
### Whuuuuuut? I can't see the extra space!
###

# echo '1' > /sys/class/scsi_disk/0\:0\:0\:0/device/rescan

###
### Rescan device geometry
###

# fdisk /dev/sda

The number of cylinders for this disk is set to 11096.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 91.2 GB, 91268055040 bytes
255 heads, 63 sectors/track, 11096 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 14 104391 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 14 4178 33450007+ 8e Linux LVM
/dev/sda3 4178 8354 33549073+ 8e Linux LVM
/dev/sda4 8355 9137 6289447+ 8e Linux LVM

###
### Ok, that's much better.
###

Command (m for help): d
Partition number (1-4): 4

###
### Delete partition 4
###

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Selected partition 4

###
### Now recreate it, so it starts in the same place, and ends at the end of the disk
###

First cylinder (8355-11096, default 8355):
Using default value 8355
Last cylinder or +size or +sizeM or +sizeK (8355-11096, default 11096):
Using default value 11096

Command (m for help): t
Partition number (1-4): 4
Hex code (type L to list codes): 8e
Changed system type of partition 4 to 8e (Linux LVM)

###
### Remember to change the partition type of Linux LVM. Or you'll be in trouble.
###

Command (m for help): p

Disk /dev/sda: 91.2 GB, 91268055040 bytes
255 heads, 63 sectors/track, 11096 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 14 104391 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 14 4178 33450007+ 8e Linux LVM
/dev/sda3 4178 8354 33549073+ 8e Linux LVM
/dev/sda4 8355 11096 22025115 8e Linux LVM

Command (m for help): w
The partition table has been altered!

###
### Write to disk and away we go
###

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
# partprobe -s
/dev/sda: msdos partitions 1 2 3 4

###
### Reprobe partition table
###

# pvresize /dev/sda4
Physical volume "/dev/sda4" changed
1 physical volume(s) resized / 0 physical volume(s) not resized

###
### Resize the "filesystem" of the LVM partition we've just extended in fdisk,
### Think of this kind of like resize2fs for LVM, but we'll still have to do that on the logical disks later
###

# vgdisplay
--- Volume group ---
VG Name VGroot
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 8
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 2
Max PV 0
Cur PV 3
Act PV 3
VG Size 84.84 GB
PE Size 32.00 MB
Total PE 2715
Alloc PE / Size 1660 / 51.88 GB
Free PE / Size 1055 / 32.97 GB
VG UUID tSuI0o-Z3mu-mldY-n4pS-qfSZ-g5UP-tXPZlR

###
### Confirm we can now see the extra space in the LVM group
###

# lvdisplay
--- Logical volume ---
LV Name /dev/VGroot/LVroot
VG Name VGroot
LV UUID HYQp9x-yA5H-RLJw-f033-pmEY-Lohg-loRhXa
LV Write Access read/write
LV Status available
# open 1
LV Size 7.88 GB
Current LE 252
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Name /dev/VGroot/LVswap
VG Name VGroot
LV UUID ZXCxs3-nZd4-jR5S-mkCf-zTJP-yVgp-dpq7Mg
LV Write Access read/write
LV Status available
# open 1
LV Size 4.00 GB
Current LE 128
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

--- Logical volume ---
LV Name /dev/VGroot/LVut01
VG Name VGroot
LV UUID VUv17I-QbdC-pkyr-bE25-f4MC-gLXq-2QKGr0
LV Write Access read/write
LV Status available
# open 1
LV Size 40.00 GB
Current LE 1280
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

###
### Confirm how big our logical volumes are within our LVM pool
###

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VGroot-LVroot
7.7G 3.3G 4.0G 45% /
/dev/sda1 99M 24M 71M 26% /boot
tmpfs 1014M 0 1014M 0% /dev/shm
/dev/mapper/VGroot-LVut01
40G 177M 38G 1% /ut01

###
### Confirm amount of space seen on filesystems within the LVM Logical Volumes
###

# lvextend -L+5G /dev/VGroot/LVut01
Extending logical volume LVut01 to 45.00 GB
Logical volume LVut01 successfully resized

###
### Added 5Gb onto our Logical Volume, LVut01
###

# lvdisplay
--- Logical volume ---
LV Name /dev/VGroot/LVroot
VG Name VGroot
LV UUID HYQp9x-yA5H-RLJw-f033-pmEY-Lohg-loRhXa
LV Write Access read/write
LV Status available
# open 1
LV Size 7.88 GB
Current LE 252
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Name /dev/VGroot/LVswap
VG Name VGroot
LV UUID ZXCxs3-nZd4-jR5S-mkCf-zTJP-yVgp-dpq7Mg
LV Write Access read/write
LV Status available
# open 1
LV Size 4.00 GB
Current LE 128
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

--- Logical volume ---
LV Name /dev/VGroot/LVut01
VG Name VGroot
LV UUID VUv17I-QbdC-pkyr-bE25-f4MC-gLXq-2QKGr0
LV Write Access read/write
LV Status available
# open 1
LV Size 45.00 GB
Current LE 1440
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VGroot-LVroot
7.7G 3.3G 4.0G 45% /
/dev/sda1 99M 24M 71M 26% /boot
tmpfs 1014M 0 1014M 0% /dev/shm
/dev/mapper/VGroot-LVut01
40G 177M 38G 1% /ut01

###
### So the space is added to the Logical Volume, but the filesystem in the logical volume is not extended
###

# resize2fs /dev/VGroot/LVut01
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/VGroot/LVut01 is mounted on /ut01; on-line resizing required
Performing an on-line resize of /dev/VGroot/LVut01 to 11796480 (4k) blocks.
The filesystem on /dev/VGroot/LVut01 is now 11796480 blocks long.

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VGroot-LVroot
7.7G 3.3G 4.0G 45% /
/dev/sda1 99M 24M 71M 26% /boot
tmpfs 1014M 0 1014M 0% /dev/shm
/dev/mapper/VGroot-LVut01
45G 181M 42G 1% /ut01

###
### TADA! All done.
###

This will also work if your root filesystems (“/”) is on LVM, since most of the important stuff is loaded into memory.

Expanding LVM on Boot disk under VMWare 3.5 without rebooting

Edit 2009-11-16: Use these instructions instead – much cleaner way of doing it

In my day job, I help look after a pretty big VMware cluster (20 blades running 350+ servers, mix of Linux and Windows). On Linux, we use LVM for flexibility.

Conventional wisdom on the subject of growing seems to have said that after resizing your virtual disk, you had to reboot to see the extra space. This is probably not a bad idea, but sometimes you’re just a bit too impatient for that. Or I am anyway.

Let’s follow this through our layers of misdirection between the actual filesystem people can store files on, and the physical disks underneath it.

At the lowest level, we run a NetApp filer pair (well, several) with spinning disks, assembled into aggregates, then split into raid sets, then presented as virtual file systems over NFS to our VMware ESX boxes. Virtual Center stores the vmdks associated with VMs on there. These virtual file systems automatically grow, waffle, backup, etc, transparent to the VMs. It’s very cool.

Ok, growing the file system. The first step is to grow the size of the virtual disk in vCenter (Edit Settings -> Hard Drive 1 -> Resize). Wait for that to finish.

On your Linux VM, rescan the SCSI device:

# echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/rescan

Run fdisk, and verify that the disk is now seen as its new size:

# fdisk /dev/sda

The number of cylinders for this disk is set to 9137.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 75.1 GB, 75161927680 bytes
255 heads, 63 sectors/track, 9137 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 14 104391 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 14 4178 33450007+ 8e Linux LVM
/dev/sda3 4178 8354 33549073+ 8e Linux LVM

Create your new LVM partition in the free space:


Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Selected partition 4
First cylinder (8355-9137, default 8355):
Using default value 8355
Last cylinder or +size or +sizeM or +sizeK (8355-9137, default 9137):
Using default value 9137

Command (m for help): t
Partition number (1-4): 4
Hex code (type L to list codes): 8e

Print out the partition table (p) then write to disk (w) and exit (q).

FDISK will ominously warn:

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

And if you try to use this new partition, it won’t be seen.


# pvcreate /dev/sda4
Device /dev/sda4 not found (or ignored by filtering).

The step that every one of the otherwise fine sets of instructions I found online missed out was to rescan the partition table again:


# partprobe -s
/dev/sda: msdos partitions 1 2 3 4

And it works!


# pvcreate /dev/sda4
Physical volume "/dev/sda4" successfully created

And we can extend onto it..


# vgextend -v VGroot /dev/sda4
Checking for volume group "VGroot"
Archiving volume group "VGroot" metadata (seqno 6).
Wiping cache of LVM-capable devices
Adding physical volume '/dev/sda4' to volume group 'VGroot'
Volume group "VGroot" will be extended by 1 new physical volumes
Creating volume group backup "/etc/lvm/backup/VGroot" (seqno 7).
Volume group "VGroot" successfully extended

And create new filesystems, resize filesystems into it, etc. So there you go.

The secret life of ships

Following the armistice of 1918, the German Navy was moved to Scapa Flow, and moored there with their German crews while the greedy allies decided who would get what ships.

Ze Germans however, wanted nothing of this, so despite the armistice, scuttled the ships, an act of war in and of its own. Some of the ships were saved and scuttled as target practice in the 1920s, but most went to the bottom. Some were refloated, but again, most are still there. There’s a wikipedia article, but don’t read it right now..

Fast forward to the 1940s. The somewhat unfair settlement against the germans has lead (in part) to another world war, and the americans develop a massive weapon, the likes of which have never been seen before. The war in Europe finishes, and this new weapon brings about the end to the war in Asia. More of these mighty weapons are tested, and from the fallout, the world’s background radiation increases just a bit. So much so that most of the world’s steel refineries produce steel that contains trace levels of radiation (in some cases, not so trace..)

Anyway, this produces a problem. How do you compare radiation levels when everything is now radioactive, to a degree? Well, the easy way is to compare it to something you know is mostly non radioactive. So they grab steel that’s been under water since the 1920s, and thus shielded from most radiation. Remember the Kaiser’s ships? Yup, them.

The circle of life continues.

upgraded pc

A few weeks ago, I bought a Acer Aspire X1301 + LCD, since it was a great deal.. C$399 + tax + enviro fees.

I then sold the LCD for $50, leaving me with a C$349 computer.

The plucky little Acer had some problems.. its power for gaming was.. limited, to say the least, and it only took half height cards, which meant it would be difficult to actually get a good card in there. Then I opened it to check something and the power switch stopped working..

So being me, I bought a new case, PSU and a Radeon 4890 1GB graphics card, and .. erm.. upgraded it. I swapped in the motherboard + drives from the Acer, which meant Windows 7 didn’t need to reactivate, and then plugged in this grunty ATI giant of a card. And it works, I get 100+ fps in everything I’ve tried so far ;)

The only problem is that the graphic card doesn’t have HDMI (despite the box saying in big letters that it does have HDMI, and then having a small weasel statement about requiring an adapter), which means right now.. no sound or use VGA. But I have the adapter on its way, courtesy of eBay.