[TriLUG] LVM conversion?
bdmc at bdmcc-us.com
Fri Jul 15 12:50:26 EDT 2005
On Fri, Jul 15, 2005 at 12:28:52PM -0400, Hugh Crissman wrote:
> * Brian McCullough <bdmc at bdmcc-us.com> [2005-07-15 11:35:02]:
> > It is doable, but it is work.
> > Do you have free space on your disk, either as whole partitions, or good
> > sized chunks of existing partitions?
> > Do you have a "portable hard drive," perhaps USB-connected?
> > If the former, you might be able to do the "bootstrap" thing that I did
> > one one laptop, re-formatting free space as LVM, moving tree-parts to
> > that space, and repeating.
> > If the latter, do an rsync-backup to the PHD, reformat and restore.
> I do have some free space but no free partitions. Also, I do have rsync
> snapshot of the system. Your last sentence "reformat and restore", that
> is what I am trying to get a handle on. If I reformat and restore from
> the snapshot, how will the system know to use lvm vs. current partition
> scheme? I guess I am trying to figure out if a full restore would mess
> things up or not.
You are right. I did a bit of shorthand.
If you have enough free space, you can use a utility like "gparted" to
create new partitions from your free space. Those new partitions would
then be made into LVM partitions, and you go on from there.
The reformat and restore would probably involve using something like a
live CD ( or perhaps the RIP disk ( Recovery Is Possible )) to destroy
all of your existing partitions, creating the required "real" /boot
partition and then creating all of the other partition(s) as LVM. I
have done this several times on various machines. Once the partitions
exist, you need to allocate the appropriate space for each Volume Group
and Logical Volume within each group. My next step would probably
involve one of two:
If I was really paranoid, I would go ahead with a small installation (
perhaps something like TinySofa Enterprise Server ) to "set" the
partitions and get a kernel installed. Once that was done, I would
basically overwrite everything from your backup -- except /etc/fstab!
Then a vgscan, vgchange, vgcfgbackup, reboot should finish the job.
The other way would be to continue with the live CD, make sure that all
of your logical volumes were mounted properly ( the tree was whole ),
restore your backup, rewrite /etc/fstab, reboot, test. ( do a
vgcfgbackup after the system was good. )
Hope that is more useful,
More information about the TriLUG