DB2 9.1 installation on RHEL 5.1 or CentOS 5.1

Wednesday, February 25, 2009 |

Just thought of adding a post since DB2 popbuilder don't have a clear cut installation steps for DB2 installation for Linux hosts. I am trying this on a RHEL 5.1 machine. I am just starting on DB2 stuff so you can expect more on DB2 in future posts. Everything is self explanatory as I am just copy pasting the logs console logs from bash.

Don't get confused.. my installation directory is /home/db2.

1. Downloaded the package DB2_ESE_V913_LNXX86.tar from IBM Site. I have downloaded this one since I am running a 32bit RHEL 5.1 on top of VMware ESX.

2. Dependency : libstdc++.so.5

3. Used the whatprovides switch to find the appropriate package from my local yum repository

[root@basil-db1]# yum whatprovides libstdc++.so.5
Loading "installonlyn" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up repositories
ClusterStorage 100% |=========================| 1.1 kB 00:00
VT 100% |=========================| 1.1 kB 00:00
Server 100% |=========================| 1.1 kB 00:00
Cluster 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files

compat-libstdc++-33.i386 3.2.3-61 Server
Matched from:
libstdc++.so.5
Importing additional filelist information
Exiting on user cancel
[root@basil-db1 db2install]

4. [root@basil-db1]# yum install compat-libstdc++*
-- snipped--
Running Transaction
Installing: compat-libstdc++-296 ######################### [1/2]
Installing: compat-libstdc++-33 ######################### [2/2]

Installed: compat-libstdc++-296.i386 0:2.96-138 compat-libstdc++-33.i386 0:3.2.3-61
Complete!
[root@basil-db1]#


5. Unzipped package folder looks like this.

[root@basil-db1 db2install]# ls
db2 DB2_ESE_V913_LNXX86.tar db2_install db2prereqcheck db2setup doc installFixPack
[root@basil-db1 db2install]#

6. I choose to install db2 on /home/db2 since I dont have enough space on the default location /opt/ibm/db2/V9.1


[root@basil-db1 db2install]# mkdir /home/db2
[root@basil-db1 db2install]# ./db2_install

Default directory for installation of products - /opt/ibm/db2/V9.1

***********************************************************
Do you want to choose a different directory to install [yes/no] ?
yes
Enter full path name for the install directory -

------------------------------------------------
/home/db2


Specify one or more of the following keywords,
separated by spaces, to install DB2 products.

CLIENT
RTCL
ESE

Enter "help" to redisplay product names.

Enter "quit" to exit.

***********************************************************
ESE
DB2 installation is being initialized.

Total number of tasks to be performed: 46
Total estimated time for all tasks to be performed: 808

..... snipped ....

Task #46 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #46 end

The execution completed successfully.

For more information see the DB2 installation log at
"/tmp/db2_install.log.5657".
[root@basil-db1 db2install]#

7. Verify /tmp/db2_install.log.5657 to check for errors

8. Next is creation of groups and users.

[root@basil-db1 db2install]# groupadd -g 999 db2iadm1
[root@basil-db1 db2install]# groupadd -g 998 db2fadm1
[root@basil-db1 db2install]# groupadd -g 997 db2asgr

[root@basil-db1 db2install]# useradd -g db2iadm1 -m db2inst1 -p password
[root@basil-db1 db2install]# useradd -g db2fadm1 -m db2fenc1 -p password
[root@basil-db1 db2install]# useradd -g db2fadm1 -m db2fenc1 -p password

Can use a good password than my conventional cheeky 'password' ;)

9. Create DB2 administration server (DAS)

[root@basil-db1 instance]# pwd
/home/db2/instance
[root@basil-db1 instance]#
[root@basil-db1 instance]# ./dascrt -u db2as
SQL4409W The DB2 Administration Server is already active.
DBI1070I Program dascrt completed successfully.
[root@basil-db1 instance]#

10. Create DB2 instances for the added users

[root@basil-db1 instance]# ./db2icrt -u db2fenc1 db2inst1
DBI1070I Program db2icrt completed successfully.

[root@basil-db1 instance]#

11. Applying license


[root@basil-db1 license]# /home/db2/adm/db2licm -a /home/db2install/db2/license/db2ese.lic

LIC1402I License added successfully.

LIC1426I This product is now licensed for use as specified in the License Agreement and License Information documents pertaining to the licensed copy of this product. USE OF THE PRODUCT CONSTITUTES ACCEPTANCE OF THE TERMS OF THE IBM LICENSE AGREEMENT AND LICENSE INFORMATION DOCUMENTS, LOCATED IN THE FOLLOWING DIRECTORY: "/home/db2/license/en_US.iso88591"
[root@basil-db1 license]#

12. Creating sample Database

[root@basil-db1 adm]# su - db2inst1
[db2inst1@basil-db1 ~]$
[db2inst1@basil-db1 ~]$ cd /home/db2/adm/
[db2inst1@basil-db1 adm]$
[db2inst1@basil-db1 adm]$ db2sampl

Creating database "SAMPLE"...
Connecting to database "SAMPLE"...
Creating tables and data in schema "DB2INST1"...

'db2sampl' processing complete.

[db2inst1@basil-db1 adm]$ db2 list database directory

System Database Directory

Number of entries in the directory = 1

Database 1 entry:

Database alias = SAMPLE
Database name = SAMPLE
Local database directory = /home/db2inst1
Database release level = b.00
Comment = A sample database
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =

[db2inst1@basil-db1 adm]$

13. Connecting to DB2 sample Database:

[db2inst1@basil-db1 adm]$ db2 connect to sample

Database Connection Information

Database server = DB2/LINUX 9.1.3
SQL authorization ID = DB2INST1
Local database alias = SAMPLE

[db2inst1@basil-db1 adm]$

14. Set the profile in the /etc/profile to get proper path to binaries.
Add the below line to /etc/profiles

. /home/db2inst1/sqllib/db2profile

15. You are done with DB2 setup. Make sure that your firewall is not blocking DB2 ports in the host level.


[root@basil-db1 adm]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@basil-db1 adm]#

VMware Guest OS Problem - Ubuntu 8.10

Thursday, February 19, 2009 |

Today my guest OSs started showing some weired problems after the upgrade of ubuntu from 8.04 to 8.10. The delete, arrow, home, end, insert stopped working. But the guest os were just fine.

If you are using latest VM player do the following step to fix. Make sure to reload the VM guest after the change.

vi /etc/vmware/config
xkeymap.nokeycodeMap = true

Some Excellent SED usages

Monday, February 16, 2009 |


Some Excellent SED usages
**************************
SED - Stream Editor. See some good usages of SED.

http://www.megalinux.net/archives/643.html
http://sed.sourceforge.net/local/docs/emulating_unix.txt
http://sed.sourceforge.net/local/docs/An_introduction_to_sed.html

Monitoring

|


Monitoring
***********

http://www.ubuntugeek.com/bandwidth-monitoring-tools-for-ubuntu-users.html
http://www.slac.stanford.edu/xorg/nmtf/nmtf-tools.html
http://www.debianhelp.co.uk/tools.htm

Logical Volume Manager (lvm)

|


Quick LVM setup on a Debian/Ubunutu box
****************************************

puttalu:~# apt-get install lvm2 dmsetup

puttalu:~# fdisk -l


Disk /dev/sda: 80.0 GB, 80032038912 bytes

255 heads, 63 sectors/track, 9730 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes


Device Boot Start End Blocks Id System

/dev/sda1 1 12 96358+ 83 Linux

/dev/sda2 13 498 3903795 82 Linux swap / Solaris

/dev/sda3 499 1471 7815622+ 83 Linux

/dev/sda4 1472 9730 66340417+ 5 Extended

/dev/sda5 1472 9730 66340386 8e Linux LVM

puttalu:~#


puttalu:~# pvcreate /dev/sda5

Physical volume "/dev/sda5" successfully created

puttalu:~#


puttalu:~# vgcreate vg0 /dev/sda5

Volume group "vg0" successfully created

puttalu:~# pvdisplay /dev/sda5

--- Physical volume ---

PV Name /dev/sda5

VG Name vg0

PV Size 63.27 GB / not usable 0

Allocatable yes

PE Size (KByte) 4096

Total PE 16196

Free PE 16196

Allocated PE 0

PV UUID xwuXvV-1DYA-SuhM-87c9-QRju-PuRa-tlPf30


puttalu:~#

puttalu:~# lvcreate -L20G -nusrlv vg0

Logical volume "usrlv" created

puttalu:~#

puttalu:~# lvdisplay

--- Logical volume ---

LV Name /dev/vg0/usrlv

VG Name vg0

LV UUID FJu6pi-qOzW-1Pwf-Fz6u-PtUb-FWb4-w23LM7

LV Write Access read/write

LV Status available

# open 0

LV Size 20.00 GB

Current LE 5120

Segments 1

Allocation inherit

Read ahead sectors 0

Block device 254:0


puttalu:~# mkdir /usr/back

puttalu:~# mount -t ext3 /dev/vg0/usrlv /usr/back

puttalu:~#

puttalu:~# lvcreate -L40G -nvarlv vg0

Logical volume "varlv" created

puttalu:~#

puttalu:~# mkfs.ext3 /dev/vg0/varlv

mke2fs 1.40-WIP (14-Nov-2006)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

5242880 inodes, 10485760 blocks

524288 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=0

320 block groups

32768 blocks per group, 32768 fragments per group

16384 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,

4096000, 7962624


Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 39 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

puttalu:~# mkdir /var/image

puttalu:~# mount -t ext3 /dev/vg0/varlv /var/image

puttalu:~#

puttalu:~# lvdisplay

--- Logical volume ---

LV Name /dev/vg0/usrlv

VG Name vg0

LV UUID FJu6pi-qOzW-1Pwf-Fz6u-PtUb-FWb4-w23LM7

LV Write Access read/write

LV Status available

# open 1

LV Size 20.00 GB

Current LE 5120

Segments 1

Allocation inherit

Read ahead sectors 0

Block device 254:0


--- Logical volume ---

LV Name /dev/vg0/varlv

VG Name vg0

LV UUID 0V2BDl-Sra5-GFgI-6zGN-Uy7u-pzAs-7ZDfVC

LV Write Access read/write

LV Status available

# open 1

LV Size 40.00 GB

Current LE 10240

Segments 1

Allocation inherit

Read ahead sectors 0

Block device 254:1


puttalu:~# df -h /var/image

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/vg0-varlv

40G 177M 38G 1% /var/image

/dev/mapper/vg0-usrlv

20G 173M 19G 1% /usr/back

puttalu:~#

Network Clonning

|




Tired of bulk deployment of desktops and servers(hybrid network of both windows and linux)??. Couple of good Sysadmin packages to make your life easy.

http://unattended.sourceforge.net/

http://clonezilla.sourceforge.net/

Curl Tricks

|

Curl Tricks

Noticed some good curl usages...Worth copying to one more page on internet.

Original Article : http://www.linux.com/articles/57715


One of cURL's most useful features is a kind of URL "glob" support, which lets you specify a pattern as part of the URL to match multiple URLs. You can give a character range in brackets, such as [A-Z] or [0-9], and you can also give a list of alternatives in braces, such as {about,blog,news}. The only trick is that if you're saving to files with the -O option, you have to give that option as many times as files you match. For example, suppose you want to grab all three versions of a manual. You'd need a command like:

$ curl -O -O -O http://example.com/docs/manual.{html,pdf,tar.gz}

For HTTP requests, you can specify HTTP 1.1 byte ranges instead of entire files -- if the server has byte ranges enabled, this option returns only the specified bytes instead of the whole file. 0 represents the beginning of the file. For example, to grab the first 100 bytes:

$ curl -r 0-99 http://example.com/

Ranges don't have to begin with zero. To get bytes 100 through 200:

$ curl -r 100-200 http://example.com/

Negative values alone work from the end of the document. To grab the last eight bytes:

$ curl -r -8 http://example.com/

The -i option precedes a given URL by the server headers. Alternately, -I outputs only the headers, which is useful for seeing the OS and Web server software that a specified site is running. It also shows the date and time of the request, content length, and type of the given URL. When the -I option is used on a FILE or FTP URL, you'll get the file size and modification time.

You can upload files by specifying them as arguments to the -T option. It supports the same kind of globbing as the URL argument:

$ curl -T index-{01-99}.html ftp://ftp.example.com/pub/incoming/

By default, file uploads are given the same name as the source files, but you can specify a new name by including it in the target URL:

$ curl -T index-mine.html ftp://ftp.example.com/pub/incoming/index-yours.html

If you need to specify a username and password, give them as arguments to the -u option, separated by a colon. To upload standard input, use the hyphen as an argument:

$ some-long-pipeline | curl -u bob:secret -T - ftp://ftp.example.com/pub/bob/results.txt

Get server metrics

cURL supports built-in runtime variables that you can use to perform ad hoc diagnostics and benchmarking, or to gather statistics about the accessibility of a given URL, site, or server (all times are given in seconds, and all sizes are in bytes):

* content_type: the Content-Type value of the file
* http_code: HTTP(S) code in the page
* http_connect: HTTP code in the proxy response
* num_connects: number of new connections made in the transfer
* num_redirects: number of redirection operations that were made
* size_download: total size of downloaded data
* size_header: total size of the headers
* size_request: total size of the request
* size_upload: total size of uploaded data
* speed_download: average download speed
* speed_upload: average upload speed
* time_connect: time from the start until the remote host connection was made
* time_namelookup: time from the start of the command until name resolution was finished
* time_pretransfer: time from the start until the file transfer was about to begin
* time_redirect: time for all redirection operations
* time_starttransfer: all pretransfer time plus the time needed to calculate the result
* time_total: time for the complete operation (to the millisecond)
* url_effective: the last URL fetched

Output any of these variables with the -w option ("write-out"), giving the variables in the format %{name} as part of a quoted string. You can include any other text as part of that string, and do simple formatting by using \n for a newline or \t for a tab. For example:
$ curl -w '\nLookup time:\t%{time_namelookup}\nConnect time:\t%{time_connect}\nPreXfer time:\t%{time_pretransfer}\nStartXfer time:\t%{time_starttransfer}\n\nTotal time:\t%{time_total}\n' -o /dev/null -s http://linux.com/

Lookup time: 0.038
Connect time: 0.038
PreXfer time: 0.039
StartXfer time: 0.039

Total time: 0.039
$

To get the amount of time between when a connection is established and when the data actually begins to be transferred, subtract the value of time_pretransfer from time_starttransfer. You can automate this by sending the output to bc with echo:

$ echo "`curl -s -o /dev/null -w '%{time_starttransfer}-%{time_pretransfer}' http://linux.com/`"|bc

cURL offers other important options you'll want to use to check for timeouts or to control the transfer speed -- it has more than 100 options in total. By specifying huge URL ranges or calling curl from a loop, you can use the commands to do simple server load testing, or check for various failures by reading the variable output -- and since curl handles forms, you can even use it to test Web application speed.

dmidecode

|

Hardware/Bios Info - Dmidecode July 09, 2008
Dmidecode helps to read biosdecode data in a human-readable format


dmidecode --type {KEYWORD / Number }

Common Keywords:

* bios
* system
* baseboard
* chassis
* processor
* memory
* cache
* connector
* slot


# Type Short Description
0 BIOS
1 System
2 Base Board
3 Chassis
4 Processor
5 Memory Controller
6 Memory Module
7 Cache
8 Port Connector
9 System Slots
10 On Board Devices
11 OEM Strings
12 System Configuration Options
13 BIOS Language
14 Group Associations
15 System Event Log
16 Physical Memory Array
17 Memory Device
18 32-bit Memory Error
19 Memory Array Mapped Address
20 Memory Device Mapped Address
21 Built-in Pointing Device
22 Portable Battery
23 System Reset
24 Hardware Security
25 System Power Controls
26 Voltage Probe
27 Cooling Device
28 Temperature Probe
29 Electrical Current Probe
30 Out-of-band Remote Access
31 Boot Integrity Services
32 System Boot
33 64-bit Memory Error
34 Management Device
35 Management Device Component
36 Management Device Threshold Data
37 Memory Channel
38 IPMI Device
39 Power Supply

Eg:

root@luttappi:~# dmidecode --type 16
# dmidecode 2.8
SMBIOS 2.4 present.

Handle 0x0029, DMI type 16, 15 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 2 GB
Error Information Handle: Not Provided
Number Of Devices: 2

root@luttappi:~#

Smokeping

|


SMOKE PING



For Debian/Ubuntu system it is more than easy to configure a Smokeping
http://www.howtoforge.com/monitoring_network_latency_smokeping_debian_etch

Big thanks to the Opensource devels Tobi Oetiker and Niko Tyni for this awsome project. The tools associated with smokeping are fping and rrd tool.

Installation/Configuration on CentOS/Redhat Based machines:


rrdtool
**********
yum install rrdtool

perl-CGI-SpeedyCGI
********************
yum install perl-CGI-SpeedyCGI

If not available on the yum repository, manually push it by downloading the rpm.
http://dag.wieers.com/rpm/packages/perl-CGI-SpeedyCGI/

FPING
*****
yum install fping
Smokeping
wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.4.2.tar.gz
tar xvzf smokeping-2.4.2.tar.gz
mv smokeping-2.4.2 /usr/local/smokeping
chown -R root:root /usr/local/smokeping
(DON'T worry about the error "chown: cannot dereference `/usr/local/smokeping/qooxdoo/qooxdoolink': No such file or directory)

Copy and create new Configuration Files from the sample
cd /usr/local/smokeping/bin
for foo in *.dist; do cp $foo `basename $foo .dist`; done
cd /usr/local/smokeping/etc/
for foo in *.dist; do cp $foo `basename $foo .dist`; done
cd /usr/local/smokeping/htdocs
for foo in *.dist; do cp $foo `basename $foo .dist`; done
pico /usr/local/smokeping/bin/smokeping


Default New
#!/usr/sepp/bin/perl-5.8.4 -w #!/usr/bin/perl -w
or if a i386 system use
use libAdd a Link qw(/usr/pack/rrdtool-1.0.49-to/lib/perl); use lib qw(/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/RRDs);
use lib qw(lib); use lib qw(/usr/local/smokeping/lib);

use Smokeping 2.000008;
Smokeping::main("etc/config.dist"); Smokeping::main("/usr/local/smokeping/etc/config");
pico /usr/local/smokeping/htdocs/smokeping.cgi

Default New
#!/usr/sepp/bin/speedy -w #!/usr/bin/speedy -w

use lib qw(/usr/pack/rrdtool-1.0.33-to/lib/perl); use lib qw(/usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/auto/RRDs);
or if a i386 system use
use lib qw(/usr/pack/rrdtool-1.0.49-to/lib/perl); use lib qw(/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/RRDs);
use lib qw(/home/oetiker/data/projects/AADJ-smokeping/dist/lib); use lib qw(/usr/local/smokeping/lib);
use CGI::Carp qw(fatalsToBrowser);
use Smokeping 2.000008;

Smokeping::cgi("/home/oetiker/data/projects/AADJ-smokeping/dist/etc/config"); Smokeping::cgi("/usr/local/smokeping/etc/config");

cp /usr/local/smokeping/htdocs/smokeping.cgi /var/www/cgi-bin

pico /usr/local/smokeping/etc/config
etc/config

*** General ***
Default New
owner = Joe Random owner = Basil
contact = joe@some.place.xyz contact = basil@mindmatrix.in
mailhost = smtp.mailhost.abc mailhost =smtp.minmatrix
sendmail = /usr/lib/sendmail
imgcache = /home/oetiker/public_html/.simg imgcache = /var/www/html/smokeping/img
imgurl = ../.simg imgurl = http:///smokeping/img
datadir = /home/oetiker/data/projects/AADJ-smokeping/dist/var datadir = /usr/local/smokeping/var
piddir = /home/oetiker/data/projects/AADJ-smokeping/dist/var piddir = /usr/local/smokeping/var
cgiurl = http://people.ee.ethz.ch/~oetiker/smokeping/smokeping.cgi cgiurl = http:///cgi-bin/smokeping.cgi
smokemail = /home/oetiker/data/projects/AADJ-smokeping/dist/etc/smokemail.dist smokemail = /usr/local/smokeping/etc/smokemail
tmail = /home/oetiker/data/projects/AADJ-smokeping/dist/etc/tmail.dist tmail = /usr/local/smokeping/etc/tmail

syslogfacility = local0

*** Alerts ***
to = to = me@your.place
from = smokealert@ from = smokealert@your.smoke.server

*** Presentation ***
template = /home/oetiker/data/projects/AADJ-smokeping/dist/etc/basepage.html.dist template = /usr/local/smokeping/etc/basepage.html

*** Probes ***
binary = /usr/sepp/bin/fping binary = /usr/sbin/fping

*** Targets ***
+ World
menu = World Connectivity
title= World Connectivity

++ INTERNET
menu = INTERNET
title = INTERNET

+++ GOOGLE
menu = GOOGLE
title = GOOGLE.COM
host = www.google.com

Add The Img and PID directory and Change the Permission:

mkdir -p /var/www/html/smokeping/img
chown -R apache:apache /var/www/html/smokeping/img
mkdir /usr/local/smokeping/var
/usr/local/smokeping/bin/smokeping &

Add to rc.local to enable it in Startup.

mysql5 Ubuntu

|


MySQL: 5.0.45-Debian_1ubuntu3



I have faced a strange issue on _1ubuntu3. The server was failing to listen on the allocated IP address eventhough it was listening on Localhost.

root@blackroot:~# telnet localhost 3306
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
H
5.0.45-Debian_1ubuntu3-logMJk]m1FO,9nB;@q;pA6*m^]
telnet> quit

[root@blackroot~]# telnet 192.168.5.10 3306
Trying 192.168.5.10...
telnet: connect to address 192.168.5.10: Connection refused
telnet: Unable to connect to remote host: Connection refused
[root@blackroot ~]#

After few minutes of investigation on system/network settings and firewall I had noticed a configuration on my.cnf which was blocking the connection to the IP address.

root@blackroot:/etc/mysql# grep bind-address my.cnf
bind-address = 127.0.0.1
root@blackroot:/etc/mysql#

Commented the line and restarted mysql. Bing... the machine started listening on IP address.
Yup..its a security feature but it killed my time.

root@blackroot:/etc/mysql# grep bind-address my.cnf
#bind-address = 127.0.0.1
root@blackroot:/etc/mysql#

PAE Kernel on Ubuntu 8

|


PAE kernel installation on Ubuntu machine

$ sudo apt-get update
$ sudo sudo apt-get install linux-headers-server linux-image-server linux-server

$ sudo reboot

$ free -m


From Wiki:

http://en.wikipedia.org/wiki/Physical_Address_Extension

In computing, Physical Address Extension (PAE) refers to a feature of x86 and x86-64[1] of physical memory to be used in 32-bitoperating system support. PAE is provided by Intel Pentium ProCPUs (including all later Pentium-series processors except the 400 MHz bus versions of the Pentium M), as well as by some compatible processors such as the Athlon and later models from AMD. processors that allows more than 4 Gigabytes systems, given appropriate and above

Xen Guest - Disk Extending

Sunday, February 15, 2009 |

Adding Disk on Xen Guest:


To resize the disk space of a xen DomU that is using Logical Volume Manager(LVM) is very easy. Below is step by step on how to do the resizing process.

1. Create a new image with the size that you require. Just give any meaningful name to the image. In this case I will use the name extended.img
# dd if=/dev/zero of=extended.img bs=1 count=1 seek=20G conv=notrunc
2. Add the new image to the configuration file of your DomU. In this example, the name of the domU is xen0
# vi /etc/xen/xen0
Add these line to it disk = [ 'tap:aio:/path/to/xen/xen0.img,xvda,w','file:/path/to/xen/extended.img,xvdb,w' ]
Save
3. Start your domU
# xm create xen0
4. Access your domU
# xm console xen0
5. Once inside, check whether the new image is detected
# fdisk -lu
6. After confirm that your new hard disk image is detected, it is time we have to work on the lvm
Create new physical volume (PV) using the new hard disk image
# pvcreate -v /dev/xvdb
Check that you have successfully added the PV
# pvdisplay
Extend your existing volume group (VG) to include the new PV
# vgextend -v VolGroup00 /dev/xvdb
Check that you have successfully add the PV into the VG
# vgdisplay
Extend your logical volume (LV)
# lvextend -L +20G -v /dev/VolGroup00/LogVol00
Check that the extension has been added
# lvdisplay
If all the steps are successfully done, you have to resize the / partition
# resize2fs /dev/mapper/VolGroup00-LogVol00
7. You are done. Check your new hard disk space :)
# df -lh

Bulk Deployment

|

Cut throat time lines are always a part of System/Network engineering deployments. And its a challenge to maintain the consistency of the deployments. I have come across few tools which are very handy in Bulk deployments especially in Data center environment.

1. EDA : This is a very good tool if you are playing with VMware ESX. The download is coming as a VM image of Ubuntu 8.04.
Just download the image, unzip on your VM box and do the basic configuration and you are ready to go!. It got some add on scripts to which can be incorporated for specific needs.

2. UDA : This is again a VM image of TFTP + DHCP Server. This can be used to deploy M$ and *nix systems. It may need some customization for match your OS needs. But still pretty handy one.

3. Conventional PXE boot server : Nowadays setting a PXE boot server is not a difficult job. Need to load TFTP,DHCP server and a file share server.
CentOS wiki got a straight forward 'How to' to setup a PXE boot server.
http://wiki.centos.org/HowTos/PXE/PXE_Setup

Note : Be careful while keeping these installation in production and corp environment since all these VM instances are running with a DHCP/TFTP server and this can give surprise to your corp users.