FAQ
I have set up a migration between two drives. fIrst I got Centos 5
working how I wanted on this drive, then set about copying it to another
drive.

The Centos files on both drives are in sub-partitions in an LVM
partition on their respective drives.

I first did a minimum install on the new drive and saved all those files
to a separate directory.

The LVM partititons and sub-partitions all have unique names.

Well it has been a bit of a struggle to say it nicely. Seems the LVM
names are buried all over the place.


Of course I had to change /boot/grub/grub.conf, /boot/grub/menu.lst, and
/etc/fstab

But more than that was the contents of /etc/lvm So for those I just
restored what was created in the minimum install.

Still I cannot get the new drive to boot.

If I boot with the latest kernel (which I copied to the new drive), I
get a message finding the new LVM partition, could not find the old LVM
partition then:

Mount: could no find filesystem /dev/root

and a kernel panic.

If I get the boot menu and select the kernel installed with the minimum
install, it gets a little further.

It still tries to find the old LVM partition, cannot find
/lib/modules.dep in the /lib/modules directory for this kernel (forget
the whole filename), and then:

fsck.ext3 Unable to resolve 'label=/boot'

and then get dropped into a maintenance mode with the file system
mounted in readonly mode.


So what Have I Missed?

Or is this a lost cause and I should just do a full install on the new
drive and proceed from there????

Search Discussions

  • Barry L. Kline at Jun 19, 2007 at 9:13 pm

    Robert Moskowitz wrote:
    I have set up a migration between two drives. fIrst I got Centos 5
    working how I wanted on this drive, then set about copying it to another
    drive.
    Hi Robert.

    It's a little late now, but the way I'd do this kind of thing is to
    install on the first drive, creating a partition for /boot and a
    partition for LVM under which I'd carve up into my other partitions.

    Once I have installed to the first drive, I would add the second drive,
    and partition it so that there is a partition for /boot, which you'd
    then copy the data from the primary /boot to this one and then use
    'grub' to make the second drive bootable.

    Next, create a physical volume on the new disk's LVM partition and then
    add it into the existing volume group. Next, use the pvmove command to
    move the data from the pv on the first drive to the pv on the second
    drive. Once you've done that, you can pvremove the first pv (from the
    first drive) from the volume group. At this point, you should have all
    of your data on the second drive. Double-check that the LABEL on the
    /boot partition is correct and then shut down the computer. Remove the
    first drive and reboot.

    I'm writing this off the top of my head (having done is a couple of
    months ago to upgrade my laptop hard drive), and I may be missing some
    of the LVM incantations, but this should be close and get you started,
    anyway.

    Barry
  • Robert Moskowitz at Jun 20, 2007 at 1:30 pm

    Robert Story wrote:
    On Tue, 19 Jun 2007 14:28:44 -0400 Robert wrote:
    RM> I have set up a migration between two drives. fIrst I got Centos 5
    RM> working how I wanted on this drive, then set about copying it to another
    RM> drive.
    ...
    RM> Still I cannot get the new drive to boot.
    RM>
    RM> If I boot with the latest kernel (which I copied to the new drive), I
    RM> get a message finding the new LVM partition, could not find the old LVM
    RM> partition then:
    RM> ...
    RM> Mount: could no find filesystem /dev/root
    RM> ...
    RM> fsck.ext3 Unable to resolve 'label=/boot'

    You need to rebuild you initrd image.. See the mkinitrd man page..
    I kind of thought it would be something like that, but given that I
    could not boot up, I was not sure what to do.

    Last night I punted and did a clean, full, install on the new drive. Did
    the yum update, copied my data directory and I a now up with basic
    functions.

    I have also documented some of my starting setups, and am now ready to
    reboot and see if I got everything in for madwifi and sun's java jdk....

    Lessons learned and all that stuff. One major thing is that an OS
    migration is NOT so cut and dry...

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcentos @
categoriescentos
postedJun 19, '07 at 6:28p
activeJun 20, '07 at 1:30p
posts3
users2
websitecentos.org
irc#centos

People

Translate

site design / logo © 2021 Grokbase