moving LVM to a new box
Quoted 4 lines
If I suppose you can install and boot you old disk in you new system together with the new disk, >you can do the following (I suppose the old disk is
/dev/hdawith a/dev/hda1partition, and new >one/dev/sdawith a/dev/sda1partition, I suppose your volume group is vg0):make backups ;-)
Quoted 8 lines
- pvcreate
/dev/sda1
- vgextend vg0/dev/sda1
- move all the lv data with pvmove/dev/hda1.
- vgreduce vg0/dev/hda2
- you will have to configure lilo/grub to install and point on your new disk.I've done such a way but it was not with lvm2. Maybe there are some pvmove issues with lvm2.
/dev/hda2->/dev/sda2
The new box booted correctly with the old disk.
Loading the necessary modules to be able to access SATA drive (ata_piix.ko). When I tried to move my PV to a new partition using
pvmove /dev/hda2
I got kernel panic. After reseting I have complitly lost my VG.
What did I wrong?
I forgot to say that my root partition was on the VG I tried to move to the new disk. Did this cause the problem?
Zoltan Sutto
Ps.: Installing/etc...