[Gllug] Come a cropper with LVM

Troy Jendra troybie at gmail.com
Thu Mar 19 13:34:02 UTC 2009


Hi

2009/3/19 David L Neil Mailing list a/c <GLLUG at getaroundtoit.co.uk>:
> There are three physical Volume Groups (p1, p2, p3). p1 (sda2) and p2
> (sda3) are primary partitions on the same physical drive, contain

> So then I thought I would 'take away' some excess space from one VG and
> add it to the other in two steps. The command with -t worked happily so
> I invoked:
> lvm pvresize -v --setphysicalvolumesize 38GB /dev/sda2
>    Using physical volume(s) on command line
>    Archiving volume group "p1" metadata (seqno 5).
>    /dev/sda2: Pretending size is 79691776 not 102398310 sectors.
>    Resizing physical volume /dev/sda2 from 1562 to 1215 extents.
>    Resizing volume "/dev/sda2" to 79691392 sectors.
>    Updating physical volume "/dev/sda2"
>    Creating volume group backup "/etc/lvm/backup/p1" (seqno 6).
>  Physical volume "/dev/sda2" changed
>  1 physical volume(s) resized / 0 physical volume(s) not resized

Since you say you reduced the size of the p1 physical volume, I would
hazard a guess and say /dev/sda2 as defined by the partition table is
greater than 38G.  Therefore, it sounds like you now have free space
somewhere inside /dev/sda2.  I'm not sure how lvm allocates its space,
but I wouldn't just assume it uses the first 38G available(it may well
do however).

My suggestion is to back everything up and start again using only one
volume group.

Cheers
Troy
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list