[Gllug] Come a cropper with LVM

Bruce Richardson itsbruce at workshy.org
Thu Mar 19 13:48:42 UTC 2009


On Thu, Mar 19, 2009 at 12:07:36PM +0000, David wrote:
> Second attempt:
> 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
> 

You have reduced the size of the PV, but you don't get the remaining
space on the physical partition back.  You can only have one PV on one
partition, so the unused space on the parent partition is simply wasted.
You cannot split a single physical partition into multiple PVs.

If you had created a single VG containing all the PVs, you wouldn't have
this problem, because all the unused space would be available for any LV
you cared to create.

-- 
Bruce

A problem shared brings the consolation that someone else is now
feeling as miserable as you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20090319/c741dcdb/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list