[CentOS] Upgrading to larger HD with LVM

Thu Dec 21 03:51:46 UTC 2006
Paul <unix at bikesn4x4s.com>

What's the easiest way to transition to a larger HD when using LVM2?  I'm
running Centos 4.4.  I'm going from a 20gb HD to a 40gb HD.  I've already
DD'd it to the 40gb HD.  So now I have 20gb of unused space.  Ideally, I'd
like to make it one big physical space for the logical space instead of
making another physical partition to expand the logical.  Here is what I
have now with the system on hda, and with another HD of hdb for moving
data if i need to:

# fdisk -l

Disk /dev/hda: 41.1 GB, 41174138880 bytes
255 heads, 63 sectors/track, 5005 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          13      104391   83  Linux
/dev/hda2              14        2501    19984860   8e  Linux LVM

Disk /dev/hdb: 15.3 GB, 15361597440 bytes
255 heads, 63 sectors/track, 1867 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1        1867    14996646   83  Linux