Plain and simple of how to extend a volumn group in RHEL
Amusing you already added a Virtual disk and its presented to the server . If not check my this post.
[root@aurhel05 ~]# fdisk /dev/sdb
The number of cylinders for this disk is set to 3916.
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/sdb: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-3916, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-3916, default 3916):
Using default value 3916
Command (m for help): p
Disk /dev/sdb: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 3916 31455238+ 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@aurhel05 ~]# fdisk -l
Disk /dev/sda: 32.2 GB, 32259548160 bytes
255 heads, 63 sectors/track, 3922 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 131 1052226 83 Linux
/dev/sda2 132 784 5245222+ 83 Linux
/dev/sda3 785 1437 5245222+ 83 Linux
/dev/sda4 1438 3918 19928632+ 5 Extended
/dev/sda5 1438 1698 2096451 83 Linux
/dev/sda6 1699 1959 2096451 82 Linux swap / Solaris
/dev/sda7 1960 2220 2096451 82 Linux swap / Solaris
/dev/sda8 2221 2481 2096451 83 Linux
/dev/sda9 2482 2612 1052226 83 Linux
/dev/sda10 2613 3918 10490413+ 83 Linux
Disk /dev/sdb: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 3916 31455238+ 83 Linux
[root@aurhel05 ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
3932160 inodes, 7863809 blocks
393190 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
240 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
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 25 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Extending the Volume VolGroup00-mysqldb by another 30GB :
1. Create a physical volume from a free disk or partition (e.g. /dev/sdb1 as a partition)
# pvcreate /dev/sdb1
2. Extend the volume group
# vgextend VolGroup00 /dev/sdb1
3. Extend the logical volume
# lvextend -L +30G /dev/mapper/VolGroup00-mysqldb
4. Extend an ext2/3/4 filesystem on the logical volume.
# resize2fs /dev/mapper/VolGroup00-mysqldb