Archive for June, 2007

Melburn-Roobaix 2007

Saturday, June 30th, 2007

Adding a physical disk to LVM in Redhat/CentOS

Friday, June 29th, 2007

Posted here for googlers and for my own future reference. Documentation pulled together from about 4 different sites. Could possibly be sub-titled: “Holy crap, the disk in my VMware installation is too small – it’s split up into 2GB files and using vmware to resize it seems like voodoo”

Problem:

My computer only has 20GB of disk space. I just have 1 partition. I want to add another disk (40GB). I don’t want to add another partition (and I really don’t want to reinstall the whole system), I want to increase the size of the root partition to 60GB. i.e. I want the root partition to span across two physical disks.

Solution:

  1. Add new physical disk. Boot.
  2. # pvscan

    This will show you the current physical volumes.

  3. # fdisk /dev/sdb

    Add the disk to your machine as a primary partition. Partition type: “8e (LVM)”. Obviously /dev/sdb may be different on your system.

  4. # pvcreate /dev/sdb1

    This creates a new physical LVM volume on our new disk.

  5. # vgextend VolGroup00 /dev/sdb1

    Add our new physical volume to the volume group: VolGroup00. Again, this group name may by different for you, but this is what Redhat & CentOS assigns by default when you install your system.

  6. # pvscan

    You should see the new physical volume assigned to VolGroup00.

  7. # lvextend -L+40G /dev/VolGroup00/LogVol00

    This increases the size of the logical volume our root partition resides in. Change the -L flag as appropriate.

We’ve just added 40GB to the logical volume used by the root partition. Sweet as. Now we need to resize the file system to utilize the additional space.

  1. Reboot into rescue mode using your CentOS CDROM.

    From memory this involves typing linux rescue as your boot option.

  2. When prompted, skip the mounting of system partitions.
  3. # lvm vgchange -a y

    This command makes your LVM volumes accessible.

  4. # e2fsck -f /dev/VolGroup00/LogVol00

    Run a file system check, the -f flag seems necessary. No idea what we do if the returns an error?

  5. # resize2fs /dev/VolGroup00/LogVol00

    Without any parameters resize2fs will just increase the file system to the max space available.

Reboot and your root partition is now 40GB lager, spanning multiple disks. Yay.

Speedy iCal Events & To Dos with Quicksilver

Friday, June 8th, 2007

Karl bought a MacBook recently. He asked me if there was a way to quickly add events/appointments into Quicksilver. He gets lots of emails with dates for gigs and wants to be able to quickly add them to his calendar without manually adding them in iCal.

So the idea is that you should be able to copy any semi-sanely formatted date/time and quickly add it to the iCal calendar of your choice and provide an event title.

There are some instructions around, but they’re a little incomplete. They omit the first step which I’m posting here for googlers. Here it is:

Enable iCal Plugin

  1. Invoke Quicksilver, go to Preferences.
  2. Check “Enable advanced features” an relaunch Quicksilver when prompted.
  3. Invoke Quicksilver, go to Preferences -> Plugins. Click “All Plug-ins” on the left, select “Calendar”, then check the “iCal Module”.
  4. Optional Step. After enabling this plugin I was able to disable advanced features and the plugin seemed to remain active.

Now we have the ability to use iCal actions. Sweet. Onto the good stuff.

Creating a New iCal Event

  1. Invoke Quicksilver
  2. Type “.” to invoke text mode.
  3. Type “[date] — [ event_name ]“. e.g:

    Next Friday 1PM -- Beer!

    Note that the double-dash (--) is really important here.

  4. Use the “Create iCal Event” action. (i.e. Hit [tab] to go to the “action” field – then type “event”).
  5. Select the Calendar you want to add the event to. (again, hit [tab] to get to this field).

Creating a New iCal To Do

Exactly the same process as above, but choose the “Create iCal To Do” action.

Date Formats

According to the Quicksilver docs for the iCal plugin, the date can be in the following formats:

2/4/07 3pm (default format)
2007-02-04 (note long year number)
feb 4 (english month names are understood)
friday 12pm (english day names are ok)
next wednesday 13:00 (use next because today is wednesday)
15.2.07 (feb 15th 2007, cause 15 can’t be a month)
3.2.07 (march 2nd 2007!!)