Archive for September, 2007

PHP Development

Resizing Ubuntu Root with LVM

Ok, I needed to do this, and for some reason was having a difficult time figuring out exactly how to do it and after hours of searching one of my co-workers found a writeup for how to expand the root file system on Ubuntu if you add an additional drive and want to utilize LVM. The document was ok, and correct, but I wanted to write it down again in case some other person out there is looking for it. So this will be a cleaner more simplified version.

For this example, lets assume /dev/sdb is your new hard disk.

Step 1: Fdisk the new hard disk.
fdisk /dev/sdbi. Type “n” to create a new partition,
ii. then “p” to select to create a primary partition,
iii. then “1″ for the partition number,
iv. then “1″ to start from the first cylinder,
v. for the last cylinder I just pressed enter for the default max size. You can enter whatever you want here.
vi. Type “t” to set the partition’s system id. Then “8e” to set the partition for LVM.
Finally type “w” to write the changes to the disk.

Step 2: Fdisk to verify.
fdisk -l

Step 3: We create the physical volume (PV) for the new partition.
pvcreate /dev/sdb1

Step 4: I’m adding a PV to en existing Volume Group (VG), so I’ll just do a “vgextend”. My group name is Ubuntu, yours may be different.
vgextend Ubuntu /dev/sdb1

Step 5: Display so you can see how much free space you have, when you do this extend, be careful in the calculation of how much free space you think you have. You can calculate this by running vgdisplay and multiply FREE PE x PE SIZE. The following code displays the params, while lvextend actually extends the logical drive /dev/Ubunut/root by 145G.
vgdisplay
lvextend -L+145G /dev/Ubuntu/root

Step 6: Resize the filesystem. This gets a bit tricky, as you cannot resize the root file system because your mounted to it, and no you cant unmount the root so don’t ask. The trick is to boot Knoppix 5.1> from CD at the prompt type knoppix 2, which is to a command prompt. Knoppix does not mount LVM drives, so you will have to manually do this by following the commands listed below. vgchange -a y basically means change the attributes ‘availability’ to ‘yes’, and being you don’t specify which, it does it for them all.
vgchange -a y
resize2fs -f /dev/Ubuntu/root

Step 7: Reboot back into Ubuntu and your done.

Big thanks to Gerard Setho who posted the original version of this.

PHP Development

GIT > SVN && CVS ?

Had an interesting discussion today at work with a few of the guys from Sys-Dev about the GIT version control system. I have yet to try it, but would like to take the time to install it on my home box to validate it’s abilities. The Sys-Dev team was putting up the argument of CVS vs. SVN, SVN basically being built on the framework of CVS which is broken at best; and why would you build on top of a broken code base.

A discussion was raised as to whether or not GIT would be a service that should be provided by development websites like SourceForge. Linus Torvalds suggested that this would be a good match-up. “The git architecture is admirably suited to an _untrusted_ central server,” Linus explained, “ie exactly the SourceForge kind of setup.” He went on to explain, “with git, developers don’t have to trust SF, and if SF is down or something bad happens (disk crash, bad backups, whatever), you didn’t ‘lose’ anything – the real development wasn’t being done at SF anyway, it was a way to _connect_ the people who do real development.”

~Full Article

When I get a chance to install if i’ll find out for myself, more info on GIT here.

Indiscriminate Music

Mika – Grace Kelly

Mika - Grace KellyHad to listen to this song a few times before I could say I liked it. It’s one of those that grows on you.

So I dislike the way I randomly pick songs, which is basically spin the globe close my eyes and point. I have taken up the task of writing a batch script to randomly select a file in the music directory. That’s right I said “batch”, my music sits on a Windows box. Have no fear everything else is on Ubuntu, some redemption I hope.

Vexed Daily

New Ink

So the two things I have never wanted a tattoo of is a name of a person, or a significant date. Ink is forever and as I have learned in my life, not everything else is. The concept of a date only fits in one portion of my life, my daughters birthdate. It will never change and can never be attached to a memory that I don’t want to think about.

The concept is borrowed, but I liked it; which was her birthdate in Roman numerals. So I started doing some research as I wanted an accurate portrayal of a Roman date, and came up with two options.

  • V.XXVI.MMV
  • DIES IOVIS A.D. III ID. MAI. MMDCCLVIII A.U.C

The first clearly being a literal translation of the numbers that make up the date as we use it today.. (5.26.2005), and the 2nd being the actual “statement” if you will of the date. I have yet to make a decision.

« Prev - Next »