Monday, 3 December 2007

Linux Games - The Fun Continues ...

Fresh on news of my success ( eventually ) with Windows Server 2003, I figured that it was time to finally move my demonstration environments to Linux.

After careful consideration, I chose Red Hat Enterprise Linux (RHEL) v4 ( nowt to do with the fact that a colleague had provided a pre-built RHEL VMware image for download ).

The one thing that kinda unsettled me was that the VMware image only had 2 GB of spare disk, and I knew I'd need more for unpacking and then installing the various IBM software products.

The VM had been built using the Unix Logical Volume Manager (LVM) so a bit of required reading ( aka required Googling ) was needed.

I ended up with a set of instructions that allowed me to create a new VMware virtual disk, and then allocate it to a Linux mount point of /spare.

Here's my script: -

a) Add the new virtual disk using VMware ( have assumed that new disk is 10 GB ): -

New disk should appear as /dev/sdb

b) Create a new partition of type 8e ( Linux LVM ): -

fdisk /dev/sdb

c) Create a new LVM Physical Volume on /dev/sdb1

pvcreate /dev/sdb1

Returns Physical volume "/dev/sdb1" successfully created

d) Extend the existing LVM Volume Group ( VolGroup00 ) to include this new device: -

vgextend VolGroup00 /dev/sdb1

Returns Volume group "VolGroup00" successfully extended

e) Create a new logical volume called spare in the newly extended VolGroup00 ( 320 extents == 10 GB ): -

lvcreate -n spare -l 320 VolGroup00

Returns Logical volume "spare" created

f) Create an EXT3 file system on the newly created logical volume spare: -

mkfs.ext3 /dev/VolGroup00/spare

Returns a message relating to i_size 4243456 and 8192 blocks

g) Create a directory called /spare to use as a mount point: -

mkdir /spare

h) Allow the newly created file system to automatically mount by adding the line: -

/dev/VolGroup00/spare /spare ext3 defaults

to /etc/fstab

i) Mount the newly created mount point: -

mount -a

j) Check the newly created mount point for size: -

df -km /spare

-> should return used = 55, available = 9513, use% = 1%

I ran through the instructions twice, and all seems well.


No comments: