Solaris / Resizing LVM PVs (was: Debian experiences)

Ben Scott dragonhawk at gmail.com
Sun Nov 5 12:53:43 EST 2006


On 11/4/06, Tom Buskey <tom at buskey.name> wrote:
> PF is excellent and I wish Linux would adopt it.  It has been ported to FreeBSD and
> NetBSD FWIW.

  At this point, the Linux firewall subsystem has gone through three
major rewrites, and people still say pf is better.  I have to start
suspecting pf wasn't adopted just because it was Not Invented Here.

>>    Does anyone know if there is a way to non-destructively resize a
>> Linux LVM PV (Physical Volume)?
>
> Something like pvreduce?

  Does such a thing exist?  I don't have a command by that name, and
Google only finds thinkos for "lvreduce".

>>   One of my disks consists of a single giant primary partition, which
>> is a Linux LVM PV.  I could easily free up a few dozen gigs for
>> Solaris to play in on that disk.  But I don't have enough spare disk
>
> 9GB is enough for everything.  Solaris x86 even uses grub.

  It's not the size of Solaris, it's the size of everything else.

  I've got two disks, 80 GB and 320 GB.  The 80 GB disk has four
primary partitions: 40 MB Dell utility, 30 GB Wintendo, 250 MB Linux
boot, and 49 GB LVM PV.  The 320 GB disk has a single primary
partition as LVM PV.  The two different disks are also different VGs,
as I did not want PEs between the two mixing for reliability reasons.
I've currently got more than 200 GB used on the second disk.

  The only way I can think of to make room with existing tools would
be reduce the LVs on the second disk, create new LVs on that disk,
move the contents of the filesystems in the LVs on the first disk to
the second disk, nuke the first disk's PV entirely, create an extended
partition in the last primary slot, and create logical partitions for
the PVs and Solaris, and then move things back from the second disk to
the first one.  Yuck!  I don't want to try Solaris *that* badly.  ;-)

  A third disk would also get the job done, but this is a SATA system
and I don't have any extra SATA disks.

-- Ben


More information about the gnhlug-discuss mailing list