[Swlug] lvm - moving data

Matt Willsher matt at monki.org.uk
Wed Jun 3 06:06:10 UTC 2015


On 2 June 2015 at 18:49, bascule <asura at theexcession.co.uk> wrote:

> On Tuesday 02 Jun 2015 06:58:20 Neil Greenwood wrote:
> > If they are in the same logical volume, it's more difficult.
> >
> > There are some low-level LVM commands that do it, but normally with LVM
> you
> > should just forget where your data is actually stored. I did it once to
> > move some data from a mechanical disk to a SSD. It's much easier if they
> > are separate volume groups though...
> >
> >
> > Neil
> ok, so if a make the second disk a different logical volume then i can use
> pmove as Matt suggests? am i right in thinking that with lvm i no longer
> have
> to worry about the order that hard drives are plugged into the motherboard
> and
> which disk is sda versus sdb/c etc in fstab?
>

Add the PV (physical volume) to the same VG (volume group) the you can
migrate the physical extents using pvmove.

The structure of LVM is that PVs (typically disks or partitions - often a
single partition that spans an entire disk) belong to VGs (volume groups).
VGs are a collection of PVs and the LVs (logical volumes), sit on the PVs
in the same VG. This allows striped LVs and mirrored LVs in the same VG for
example. http://commons.wikimedia.org/wiki/File:Lvm.svg is worth studying
to see how these blocks interrelate.

LVM is extremely powerful and is been constantly improved (mostly by Red
Hat, is seems).

HTH,
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/swlug/attachments/20150603/5ed5349c/attachment.html>


More information about the Swlug mailing list