jump to navigation

New HDD, enlarging Red Hat/Centos ext3/lvm partition 16 December 2007

Posted by Maulvi Bakar in : Home,Linux,System , trackback

Hmmm,

Suddenly, I’ve run out of space on one of my servers at home. Solution, add a new harddisk, extend existing partition onto the new harddisk.. Simple right? Right…

Firstly, fix the new harddisk onto the machine. Fdisk it like thus –

# fdisk /dev/sdb

Create a new ‘sdb1’ partition using type 8e, which is Linux LVM.

Next, we need to create a Physical Volume within the newly created sdb1 partition.

# pvcreate /dev/sdb1

After that we will extend the existing volume ‘VolGroup00’ onto the newly created physical volume.

# vgextend VolGroup00 /dev/sdb1

Once done, the next step is to extend the Logical Volume within the volume group to use the free space newly made available when you extend the volume group previously.

# lvextend -L 40G /dev/VolGroup00/LogVol00

And finally, we’ll enlarge the ext3 partition to make use of the newly available free space in the logical volume.

# resize2fs /dev/VolGroup00/LogVol00

Enjoy!

Typo error since fixed as advised! Thank you!

Comments»

1. pendita_gila - 24 May 2009

its good to have explanation in “video teaching” and finally shows the result..but this is a good explanation..well done boss…i will try

2. Creating a new Linux RAID1 device and extending an existing LVM Volume onto it. RHEL/Centos 5 | Doomlands of the Lunatics - 13 June 2009

[…] the available space is another matter.  This is actually an extension of my previous posting – New HDD, enlarging Red Hat/Centos ext3/lvm partition, but there’s another factor in the equation, RAID1 (Mirroring) […]

3. yannails - 22 November 2011

type 8
type 8e


Challenge *

π