How to upgrade hard drive in a single drive (with LVM2) computer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



This one has me stumped and I'm sure I must be missing something 
trivial.  What is is eludes me.

I have a 20G drive that will be replaced with a 160G drive.  The /boot 
partition is just a standard type 83, and the swap is an 82.  The system 
root partition is in a LV, as is the /home partition.

I've upgraded hard drives dozens of times without incident, but never 
ona system with LVM.

I did this (booted into single-user mode):

1) Create the appropriate partitions on the new drive
2) Created an EXT3 partition and copies over /boot, ran GRUB to make it 
bootable.
3) did  the mkswap on the second partition.
4) did a pvcreate on the third partition on the new drive, then created 
th VG (vg1) and LV for the two paritions.
5) Mounted the new partitions under /mnt, then used tar to copy the 
files from the old to the new (excluding tmp mnt sys & proc)
6) Edited grub.conf (on the new drive) to point to VG1 instead of VG0 
for sysroot.  Edited /mnt/etc/fstab to point to the new locations (I 
changed the names of the logical volumes slightly.)
6) Disconnected the old drive, then booted.

The system booted, but got only as far as 'Red Hat nash' ...  then 
complained that it couldn't find vg0. (the volume group on the other 
disk).  I can't get into single-user mode when booting this single drive.

I'm trying to do this whole thing non-destructively so that the original 
drive is a backup, until we confirm that the new drive is behaving well.

Are these steps correct (and they should be without LVM) or is there 
something much easier and obvious that I'm missing?  I could, I suppose, 
add the new parition into the original volume group, and do the 'pvmove' 
dance to get things over (as explained briefly in the LVM-HOWTO on Red 
Hat's site) but it wouldn't leave a bootable system on the original drive.

Any suggestions would be greatly appreciated!

TIA,

Barry

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux