[CentOS] steps to add a new physical disk to existing LVM setup in new centos box?

Jim Wildman jim at rossberry.com
Thu Sep 24 02:07:09 UTC 2009


On Wed, 23 Sep 2009, Jerry Queirolo wrote:

> The disk layout on the older one is a 2 partition (/boot and /) with /
> being a logical volume.  Laying out what I think I need to do looks like
> this :
>
> 1. yank old drive and cable up to newer system, expecting this 2nd drive
> to now be /dev/sdb on the new box
> 2. pvcreate /dev/sdb1
> 3. vgextend VolGroup00 /dev/sdb1 (VolGroup00 is the volume group name on
> both system, pretty much default installs in both cases)
> 3. lvextend -l+100% /dev/VolGroup00
> 4. resize2fs /

The biggest problems that I've had in similar situations are:
1) An entry in /etc/fstab that looks like 
LABEL=/boot     boot                   ext3    defaults 1 2
If the 'old' drive has a "/boot" lable, there may be issues.  Either
blow the old drive away or switch to a /dev/sda1 based fstab for the new
machine
2) vg names the same on the 2 drives.  Either rename them before moving
the drive, or blow them away first.

----------------------------------------------------------------------
Jim Wildman, CISSP, RHCE       jim at rossberry.com http://www.rossberry.com
"Society in every state is a blessing, but Government, even in its best
state, is a necessary evil; in its worst state, an intolerable one."
Thomas Paine



More information about the CentOS mailing list