[lug] Migration from raw partitoins to LVM2 (hopefully)

Lee Woodworth blug-mail at duboulder.com
Fri Jan 26 19:19:48 MST 2007


D. Frye wrote:
> 
> All,
> 
> I'm upgrading my dual boot laptop to a larger hard drive where there is 
> currently no LVM in place. So far, I haven't found any FAQ or HOWTO that 
> addresses this and I'm looking for someone with either experience or 
> more information that I currently have to complete this.
> 
> Basic steps include leaving /boot, the XP, and common FAT partitions on 
> raw disk slices, and then create a single physical volume on the last 
> partition with the rest of the available disk. Then the plan is to use 
> SystemRescueCd and partimage to restore the partition images to the new 
> LVM logical volumes before mucking around with initrd and grub.
> 
> Odds are pretty good that I can fumble through this on my own, but I'd 
> prefer to avoid the frustration if I can find a source that has 
> performed this work already.
If your main XP partition is NTFS, I'd check to see if the BIOS reports the
same SPT and no. of heads for both disks. I just shrank an NTFS system
partition for a laptop and the native boot didn't work until I specified
the correct SPT and heads to ntfsresize. My reading of ntfsresize's docs
suggests that the XP boot code depends on the SPT and heads values written
in the parition's boot area.

A possible gotcha is when your distro does the vgscan and vgchange commands
during boot. You can't mount the LVM volumes until that happens. The
partition you use for the LVM physical volume should be marked as type 8e
using fdisk. This might not be strictly necessary, but it can help the PV get
automatically recognized. You also have to make sure the device-mapper is
in-kernel or loaded before any LVM operations are attempted. BTW, unless
you are using an initrd/initramfs the root fs can't be on an LVM volume.

> 
> Any information or other suggestions for such a migration would be 
> greatly appreciated.
> 
> Thanks,
> David
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug




More information about the LUG mailing list