Scot Jenkins wrote:
> Anyone running LVM and have comments about the amount of overhead it
> uses?  Here's my setup:
> 
> Debian woody 2.4.27 kernel w/LVM compiled in.  Box his attached to a 
> jetstor filer that hands out a chunk of disks as a single scsi target.
> The jetstor is doing RAID-5.  I know little else about the filer, 
> someone else admins' it.
> 
> dmesg shows:
> SCSI device sda: 627932160 512-byte hdwr sectors (321501 MB)
> 
> If is just run fdisk, create one partition and then run 
> "mke2fs -j -m1 /dev/sda1" I get:
> 
> Filesystem           1k-blocks      Used Available Use% Mounted on
> /dev/sda1            309030804     32828 305858396   1% /jetstor
> 
> 
> If I setup the disk via LVM (pvcreate, vgcreate, lvcreate) I get:
> 
> Filesystem           1k-blocks      Used Available Use% Mounted on
> /dev/vg01/lv00       263191620     32828 260484924   1% /jetstor
> 
> I get the same results whether I use the entire disk "/dev/sda" or 
> create a single partition of type "Linux LVM" (8e).
> 
> Any idea why LVM takes about 45 GB of overhead?  

Answering my own post:  man vgcreate

       -s, --physicalextentsize PhysicalExtentSize[kKmMgGtT]
              Sets  the  physical extent size on physical volumes
              of this volume group.  A size suffix (k  for  kilo-
              bytes up to t for terabytes) is optional, megabytes
              is the default if no suffix is present.  Values can
              be  from  8 KB to 16 GB in powers of 2. The default
              of 4 MB causes maximum LV sizes of  ~256GB  because
              as  many  as  ~64k extents are supported per LV. In
              case larger maximum LV sizes  are  needed  (later),
              you  need  to  set the PE size to a larger value as
              well. Later changes of the PE size in  an  existing
              VG are not supported.


Note where it says "The default of 4 MB causes maximum LV sizes of 
~256GB ".  By using the "-s" option to increase the physicalextentsize
in the volume group, I was able to create about a 300 GB logical volume:

	# vgcreate -s 32M vg01 /dev/sda

Tip: run "vgdisplay -v" after you run vgcreate and pay attention to the 
"MAX LV Size" value.


# vgdisplay -v /dev/vg01
--- Volume group ---
VG Name               vg01
VG Access             read/write
VG Status             available/resizable
VG #                  0
MAX LV                256
Cur LV                1
Open LV               0
MAX LV Size           2 TB	<===== NOTE now 2 TB, not 255 GB (default)
Max PV                256
Cur PV                1
Act PV                1
VG Size               299.38 GB
PE Size               32 MB
Total PE              9580
Alloc PE / Size       9568 / 299 GB
Free  PE / Size       12 / 384 MB
VG UUID               cf1kZt-pIVd-THrj-dovU-00Id-KY36-AvGTUJ

-- 
scot

_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
Help beta test TCLUG's potential new home: http://plone.mn-linux.org
Got pictures for TCLUG? Beta test http://plone.mn-linux.org/gallery
tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list