Matthew Rosewarne on 9 Jan 2009 22:28:40 -0800

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

Re: [PLUG] Debian/Ubuntu installer LVM issue

On Friday 09 January 2009, JP Vossen wrote:
> Huh?!?!?  So it turns out this is a really stupid bug in the Debian
> installer where it uses totally different bases to calculate the
> numbers:

I always "cheat" and set up my LVM on tty2 with the standard tools instead of 
using partman-lvm.  After manually making my LV's, I go back to the 
partitioner and use it for making & mounting the filesystems for them.

> You can get the "#Free PE" by going to another PTTY and running
> lvdisplay, or just trying it, then going to ALT-F4 and reading the error.

Why not just run `vgdisplay $VG`?  It tells you not only how many free PE you 
have, but also their size.  You shouldn't really need to use pvdisplay unless 
you're planning to remove a disk from a VG.

> This "method" just worked on a test machine, but I'm pretty sure I'm
> doing something amazingly stupid with that math, and that several folks
> are about to slap me around for missing something blindingly obvious to
> a 3rd grader.  Bring it on...  :-)

Instead of sizing your root LV as:
	all available PE
	- 2GB
	LV size

I would actually suggest sizing it (and any other) LV's as
	how much you need to just contain the data
	+ a fairly conservative estimate of how much more data will accumulate
	+ some small arbitrary number of GB.  If in doubt, use a die.
	LV size

This gives you the flexibility to grow the LV('s) if necessary or allocate the 
free space to other things, such as snapshots.  It's much less hassle to grow 
an LV and its filesystem than it is to shrink them.

Attachment: signature.asc
Description: This is a digitally signed message part.

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --