Moving an existing Linux into an LVM

Solution 1:

Here's a description of a process. They used a large swap partition to host root filesystem during the change. You do not need this trick, because you have 2nd HDD.

A trick question: does your server support booting from the 2nd HDD? Can you set it up to boot from 2hd HDD? I think you could simplify the solution and not change the /boot partition. Bootloaders do not like LVM yet, so you still need a regular partition to host your /boot. Leaving /boot be and only changing the root file system location simplifies the process. You can have 2 entries in grub.conf mid-migration: with root in the old place and on LVM. In case something goes awry, you can boot to the rescue image, change the default entry and have another go at the migration.

And yes, I wholeheartedly agree with poige. Test in a virtual environment before you start playing with real system.

Solution 2:

Some deeds are easier to accomplish then explain how to do that. :-) LVM-able initrd is the main key point I think. And you'd better verify that before trying booting. Nowadays such tests are easily done with soft like VirtualBox, for e. g..