[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: [linux-lvm] Converting my Root file system to LVM

Hash: SHA1

With pvmove-ing an lv, it's actually quite easy... and I've done it
several times with the VG active... here's how:

pvcreate <new-pv>
vgextend <vg> <new-pv>
[make sure <new-pv> has at least as many pe's as <old-pv>]
pvmove <old-pv> <new-pv> (may require a -f or something if the lv's
are open)
vgreduce <vg> <old-pv> (unless you want to keep the old pv for
expansion or something)

viola!  all lv's that were on <old-pv> are now on <new-pv> :)  This
is also how I "defragment" the lv's if it gets too crazy with the
allocation... although you really don't need to do this (i just like
to keep the vgdisplay -v's easier to parse with scripts, etc :) )

- -----Original Message-----
From: linux-lvm-admin sistina com
[mailto:linux-lvm-admin sistina com]On
Behalf Of Steve Wray
Sent: Wednesday, 23 May 2001 00:02
To: linux-lvm sistina com
Subject: RE: [linux-lvm] Converting my Root file system to LVM

> From: linux-lvm-admin sistina com
> [mailto:linux-lvm-admin sistina com]On Behalf Of Rupert Heesom

> Tnx, Steve for the easy howto of your's below.
> BTW, what on earth is that "mount -o loop" command?

Glad to have helped!
the "-o loop" tells mount to mount the file on the loopback device.
This allows ordinary files (not just block devices) to carry a
Its quite cool!

> Since my LVol is on my 2nd disk, next, I think I'll try extending
> my Lvol back to cover my 1st disk as well.

Just watch out for your /boot parition.
You might want to copy lilo.conf over to the /boot partition
and make /etc/lilo.conf a symlink to it there.

> One more bit of help, if you can? -
> I want to pvmove the file contents of my 2nd disk (/dev/sdb) to my
> 1st disk (/dev/sda).  My 1st disk is nice & quiet!  Now the
> lvm-howto
> specifies my next step (adding the "old partition" into the Lvol)
> as --  

phew... I have no idea about moving things from PV to PV,
however, you may want to look at setting up a miniroot-in-a-ramdisk
for this sort of thing. I suspect you need to have the VGs
and you can't do *that* when its in use as the root LV.

Check out;

miniroot is fantastic, but it needs some work to make it useful
for LVM.
Mainly, just unzip and mount it (like you did for the initrd file
and copy over the lvm programs and libraries.

You'll need to set up a lilo entry too, of course.
I think its well documented.

BTW; I'd *seriously* recommend this for anyone with LVM root.
It can get you out of trouble!

linux-lvm mailing list
linux-lvm sistina com

Version: PGP 7.0.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]