linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] What is the the maximum logical volume size?
@ 2001-04-11 21:58 Andrew Patterson
  2001-04-14  0:28 ` Andreas Dilger
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Patterson @ 2001-04-11 21:58 UTC (permalink / raw)
  To: linux-lvm

I am tring to figure out what the maximum logical volume size is. The vgcreate
man page says:

       To  limit  kernel  memory usage, there is a limit of 65536
       physical extents (PE) per logical volume, so the  PE  size
       determines  the  maximum logical volume size.  The default
       PE size of 4MB limits a single logical  volume  to  256GB.
       There is also (as of Linux 2.4) a kernel limitation of 2TB
       per block device.

Which implies that the limit is 2 TB on my 2.4 system.  However in
tools/lib/lvm.h for version 0.9.1_beta7, it states:

/*
 * LVM_PE_T_MAX corresponds to:
 *
 * 8KB PE size can map a ~512 MB logical volume at the cost of 1MB memory,
 *
 * 128MB PE size can map a 8TB logical volume at the same cost of memory.
 *
 * Default PE size of 4 MB gives a maximum logical volume size of 256 GB.
 *
 * Maximum PE size of 16GB gives a maximum logical volume size of 1024 TB.
 *
 * AFAIK, the actual kernels limit this to 1 TB.
 *
 * Should be a sufficient spectrum ;*)
 */

Which tells me it is 1 TB.

In the same file:

#define LVM_LV_SIZE_MAX(a) ( ( long long) LVM_PE_T_MAX * (a)->pe_size > ( l
ong long) 1024*1024/SECTOR_SIZE*1024*1024 ? \
  ( long long) 1024*1024/SECTOR_SIZE*1024*1024 : \
  ( long long) LVM_PE_T_MAX * (a)->pe_size)

Which says we can have at most 1024*1024/SECTOR_SIZE*1024*1024 or 2GBs
of sectors or blocks?.

vg_show.c used in vgdisplay then converts this value with the call:

   ( LVM_LV_SIZE_MAX(vg) / 2, SHORT);

vgdisplay then shows this as 1 TB (assuming you have a large enough
extent size). So I am not sure whether there is an incorrect
calculation in the define, an incorrect calculation in vg_show.c, or
if the man page is incorrect and the kernel limit is actually 1 TB.
If the man page is wrong, why only 1 TB.  1 >> 32 * (512 sector size)
should give 2 TB's.

Andrew Patterson

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] What is the the maximum logical volume size?
  2001-04-11 21:58 [linux-lvm] What is the the maximum logical volume size? Andrew Patterson
@ 2001-04-14  0:28 ` Andreas Dilger
  2001-04-16 16:49   ` Andrew Patterson
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Dilger @ 2001-04-14  0:28 UTC (permalink / raw)
  To: linux-lvm

Andrew PAtterson writes:
> I am tring to figure out what the maximum logical volume size is.

It may be 1 TB or it may be 2TB.  Depends on whether all of the code
in use use uses unsigned longs for block numbers, or if some use signed
longs.  2TB is the outer limit for now (unless you start playing games
inside LVM, to have 4kB hard sector size, and remap to the disk 512 byte
sector size).

Does it really matter?  This is PER LV, so if you really need to have an
LV that large, give it a try and let us know what works.  I've seen a
report of someone with a 1 TB device (some kind of HW RAID, not LVM)
under Linux, so I know that works, but I haven't seen larger yet.

I wouldn't want to be keeping all of my eggs in such a large basket.  I'd
much rather have several smaller filesystems, especially since you STILL
need to fsck on occasion (don't let reiserfs journaling fool you, you can
still have SW/HW problems that will corrupt the filesystem).

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] What is the the maximum logical volume size?
  2001-04-14  0:28 ` Andreas Dilger
@ 2001-04-16 16:49   ` Andrew Patterson
  2001-04-16 17:59     ` Andreas Dilger
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Patterson @ 2001-04-16 16:49 UTC (permalink / raw)
  To: linux-lvm; +Cc: andrew

In your message on you write:
> Andrew PAtterson writes:
> > I am tring to figure out what the maximum logical volume size is.
> 
> It may be 1 TB or it may be 2TB.  Depends on whether all of the code
> in use use uses unsigned longs for block numbers, or if some use signed
> longs.  2TB is the outer limit for now (unless you start playing games
> inside LVM, to have 4kB hard sector size, and remap to the disk 512 byte
> sector size).
> 
> Does it really matter?  This is PER LV, 

What does "PER" mean?

so if you really need to have an
> LV that large, give it a try and let us know what works.  I've seen a
> report of someone with a 1 TB device (some kind of HW RAID, not LVM)
> under Linux, so I know that works, but I haven't seen larger yet.

Okay, I'll give it a try.  

> 
> I wouldn't want to be keeping all of my eggs in such a large basket.  I'd
> much rather have several smaller filesystems, especially since you STILL
> need to fsck on occasion (don't let reiserfs journaling fool you, you can
> still have SW/HW problems that will corrupt the filesystem).

I agree with you, but I am not the sys-admin for the person who wants
this capability.

Thanks,

Andrew

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] What is the the maximum logical volume size?
  2001-04-16 16:49   ` Andrew Patterson
@ 2001-04-16 17:59     ` Andreas Dilger
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Dilger @ 2001-04-16 17:59 UTC (permalink / raw)
  To: linux-lvm; +Cc: andrew

Andrew writes:
> > It may be 1 TB or it may be 2TB.  Depends on whether all of the code
> > in use use uses unsigned longs for block numbers, or if some use signed
> > longs.
> > 
> > Does it really matter?  This is PER LV, 
> 
> What does "PER" mean?

My Websters defines "per" as "for each [ 50 cents _per_ yard ]".  That
means, you can have up to 1TB (or maybe 2TB) for _each_ LV.  This is NOT
a 1TB limit for the total size of all the LVs in a single VG.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-04-16 17:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-11 21:58 [linux-lvm] What is the the maximum logical volume size? Andrew Patterson
2001-04-14  0:28 ` Andreas Dilger
2001-04-16 16:49   ` Andrew Patterson
2001-04-16 17:59     ` Andreas Dilger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).