linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Trying to understand format of LVM2 - Question on Extent Size
@ 2018-07-26  0:37 David F.
  2018-07-26  4:25 ` David F.
  0 siblings, 1 reply; 3+ messages in thread
From: David F. @ 2018-07-26  0:37 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1748 bytes --]

I created a test lvm on a 32G UFD with two logical volumes, 15G and 14G.  I
then looked at the on disk data and most makes since except the
extent_count vs extent_size.   In this case the extent_size is 8192, and it
says the extent sizes are 3840 and 3584, but that * 8192 is double its
actual size.   * 4096 then it is the size.  So how does that work.  TIA!!
Here's the sample:

test_lvm {
id = "xhewgS-UxVF-4qC5-MGXp-ErfX-6SNl-UkCdgz"
seqno = 3
format = "lvm2"
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0

physical_volumes {

pv0 {
id = "XhEzob-g2D5-YcGp-zfz9-39R7-HII6-SITlH9"
device = "/dev/sdc"

status = ["ALLOCATABLE"]
flags = []
dev_size = 62531584
pe_start = 2048
pe_count = 7633
}
}

logical_volumes {

lvm_logvol {
id = "IIKGTj-2eYn-5iTk-7KZd-ZMzS-aqYT-kwNgko"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_time = 1532609310
creation_host = "localhost.localdomain"
segment_count = 1

segment1 {
start_extent = 0
extent_count = 3840

type = "striped"
stripe_count = 1

stripes = [
"pv0", 0
]
}
}

lvm_logvol2 {
id = "dC9wIq-kJ3I-ixLV-A2f9-889Y-qpUr-DdfciL"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_time = 1532609325
creation_host = "localhost.localdomain"
segment_count = 1

segment1 {
start_extent = 0
extent_count = 3584

type = "striped"
stripe_count = 1

stripes = [
"pv0", 3840
]
}
}
}

}
# Generated by LVM2 version 2.02.168(2) (2016-11-30): Thu Jul 26 08:48:45
2018

contents = "Text Format Volume Group"
version = 1

description = ""

creation_host = "localhost.localdomain"    # Linux localhost.localdomain
4.11.8-300.fc26.x86_64 #1 SMP Thu Jun 29 20:09:48 UTC 2017 x86_64
creation_time = 1532609325    # Thu Jul 26 08:48:45 2018

[-- Attachment #2: Type: text/html, Size: 2326 bytes --]

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

* Re: [linux-lvm] Trying to understand format of LVM2 - Question on Extent Size
  2018-07-26  0:37 [linux-lvm] Trying to understand format of LVM2 - Question on Extent Size David F.
@ 2018-07-26  4:25 ` David F.
  2018-07-26  8:58   ` Zdenek Kabelac
  0 siblings, 1 reply; 3+ messages in thread
From: David F. @ 2018-07-26  4:25 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 2218 bytes --]

Never mind, the answer is the extent_size is the number of sectors (or
perhaps it's the number of 512 byte blocks, I'll have to test on 4K sector
drives).     So in this case 4M and 4M*3840 is the 16G (not 16M which was
the 3840*4096).

On Wed, Jul 25, 2018 at 5:37 PM, David F. <df7729@gmail.com> wrote:

> I created a test lvm on a 32G UFD with two logical volumes, 15G and 14G.
> I then looked at the on disk data and most makes since except the
> extent_count vs extent_size.   In this case the extent_size is 8192, and it
> says the extent sizes are 3840 and 3584, but that * 8192 is double its
> actual size.   * 4096 then it is the size.  So how does that work.  TIA!!
> Here's the sample:
>
> test_lvm {
> id = "xhewgS-UxVF-4qC5-MGXp-ErfX-6SNl-UkCdgz"
> seqno = 3
> format = "lvm2"
> status = ["RESIZEABLE", "READ", "WRITE"]
> flags = []
> extent_size = 8192
> max_lv = 0
> max_pv = 0
> metadata_copies = 0
>
> physical_volumes {
>
> pv0 {
> id = "XhEzob-g2D5-YcGp-zfz9-39R7-HII6-SITlH9"
> device = "/dev/sdc"
>
> status = ["ALLOCATABLE"]
> flags = []
> dev_size = 62531584
> pe_start = 2048
> pe_count = 7633
> }
> }
>
> logical_volumes {
>
> lvm_logvol {
> id = "IIKGTj-2eYn-5iTk-7KZd-ZMzS-aqYT-kwNgko"
> status = ["READ", "WRITE", "VISIBLE"]
> flags = []
> creation_time = 1532609310
> creation_host = "localhost.localdomain"
> segment_count = 1
>
> segment1 {
> start_extent = 0
> extent_count = 3840
>
> type = "striped"
> stripe_count = 1
>
> stripes = [
> "pv0", 0
> ]
> }
> }
>
> lvm_logvol2 {
> id = "dC9wIq-kJ3I-ixLV-A2f9-889Y-qpUr-DdfciL"
> status = ["READ", "WRITE", "VISIBLE"]
> flags = []
> creation_time = 1532609325
> creation_host = "localhost.localdomain"
> segment_count = 1
>
> segment1 {
> start_extent = 0
> extent_count = 3584
>
> type = "striped"
> stripe_count = 1
>
> stripes = [
> "pv0", 3840
> ]
> }
> }
> }
>
> }
> # Generated by LVM2 version 2.02.168(2) (2016-11-30): Thu Jul 26 08:48:45
> 2018
>
> contents = "Text Format Volume Group"
> version = 1
>
> description = ""
>
> creation_host = "localhost.localdomain"    # Linux localhost.localdomain
> 4.11.8-300.fc26.x86_64 #1 SMP Thu Jun 29 20:09:48 UTC 2017 x86_64
> creation_time = 1532609325    # Thu Jul 26 08:48:45 2018
>
>

[-- Attachment #2: Type: text/html, Size: 2964 bytes --]

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

* Re: [linux-lvm] Trying to understand format of LVM2 - Question on Extent Size
  2018-07-26  4:25 ` David F.
@ 2018-07-26  8:58   ` Zdenek Kabelac
  0 siblings, 0 replies; 3+ messages in thread
From: Zdenek Kabelac @ 2018-07-26  8:58 UTC (permalink / raw)
  To: LVM general discussion and development, David F.

Dne 26.7.2018 v 06:25 David F. napsal(a):
> Never mind, the answer is the extent_size is the number of sectors (or perhaps 
> it's the number of 512 byte blocks, I'll have to test on 4K sector 
> drives).     So in this case 4M and 4M*3840 is the 16G (not 16M which was the 
> 3840*4096).
> 
> On Wed, Jul 25, 2018 at 5:37 PM, David F. <df7729@gmail.com 

Hi


extent_size is always in 512b unit  and ATM it's 32b value.


extent_count is in 'extent_size' unit  and ATM it's 32b value.


Volume size    extent_size * extent_count   (so  32b * 32b =>  64b size).


Depending on your extent_size you are limiting maximum volume size.
Thus if you need to use  Exa byte volume sizes you clearly need to go with 4G 
extent size.


Regards


Zdenek

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

end of thread, other threads:[~2018-07-26  8:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26  0:37 [linux-lvm] Trying to understand format of LVM2 - Question on Extent Size David F.
2018-07-26  4:25 ` David F.
2018-07-26  8:58   ` Zdenek Kabelac

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).