[CentOS] formatting large volume

Stephen Harris lists at spuddy.org
Wed Oct 15 17:34:39 UTC 2008

On Wed, Oct 15, 2008 at 09:52:03AM -0700, Craig White wrote:
> I have done the pgcreate and tested lvcreate but wonder about
> 'setphysicalextentsize' because in the man page, it states, "The default
> of 4 MB leads to a maximum logical volume size of around 256GB" which
> makes me think that if I want one volume when this is all done, I have
> to increase that value.

The man page for "vgcreate" says "there is a limit of 65534  extents in
each logical volume" but only for *lvm1* format.  lvm2 format doesn't
have such restrictions.

I used default values for my 4Tbyte array (5*1Tbyte disk in a md raid5)
under CentOS 4.

% fdisk -l /dev/md3

Disk /dev/md3: 4000.8 GB, 4000808697856 bytes
2 heads, 4 sectors/track, 976759936 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

% pvdisplay /dev/md3
  --- Physical volume ---
  PV Name               /dev/md3
  VG Name               Raid5
  PV Size               3.64 TB / not usable 320.00 KB
  Allocatable           yes (but full)
  PE Size (KByte)       4096
  Total PE              953867
  Free PE               0
  Allocated PE          953867
  PV UUID               NngvXK-4tqJ-xNtG-UnDL-Rin0-RHIl-xZ2wzI

% vgdisplay Raid5
  --- Volume group ---
  VG Name               Raid5
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               3.64 TB
  PE Size               4.00 MB
  Total PE              953867
  Alloc PE / Size       953867 / 3.64 TB
  Free  PE / Size       0 / 0
  VG UUID               mKSI0h-26i7-5LK5-vwpX-GY3a-Bjiv-xX4q8n

% lvdisplay Raid5/Media
  --- Logical volume ---
  LV Name                /dev/Raid5/Media
  VG Name                Raid5
  LV UUID                c8x4Ip-R1wq-n9An-NM6B-IuBs-U61L-kfVgAU
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                3.64 TB
  Current LE             953867
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:5

> Does this make sense?

Try using "pvcreate", "vgcreate" and "lvcreate" with no special options
and see what happens.  It worked for me!

The default in CentOS should be lvm2; you can see that's what was
created on mine by the "Format" line in the vgdisplay output.

  Format                lvm2



More information about the CentOS mailing list