From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2399D4C5 for ; Thu, 26 Jul 2018 04:25:06 +0000 (UTC) Received: from mail-pl0-f50.google.com (mail-pl0-f50.google.com [209.85.160.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F1BB0308FB89 for ; Thu, 26 Jul 2018 04:25:04 +0000 (UTC) Received: by mail-pl0-f50.google.com with SMTP id t17-v6so209219ply.13 for ; Wed, 25 Jul 2018 21:25:04 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: "David F." Date: Wed, 25 Jul 2018 21:25:04 -0700 Message-ID: Content-Type: multipart/alternative; boundary="0000000000001b7ba50571df61ab" Subject: Re: [linux-lvm] Trying to understand format of LVM2 - Question on Extent Size Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: To: linux-lvm@redhat.com --0000000000001b7ba50571df61ab Content-Type: text/plain; charset="UTF-8" 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. 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 > > --0000000000001b7ba50571df61ab Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Never mind, the answer is the=20 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).=C2=A0=C2=A0=C2=A0=C2=A0 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:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">
I created a test lvm on= a 32G UFD with two logical volumes, 15G and 14G.=C2=A0 I then looked at th= e on disk data and most makes since except the extent_count vs extent_size.= =C2=A0=C2=A0 In this case the extent_size is 8192, and it says the extent s= izes are 3840 and 3584, but that * 8192 is double its actual size.=C2=A0=C2= =A0 * 4096 then it is the size.=C2=A0 So how does that work.=C2=A0 TIA!!=C2= =A0 Here's the sample:

test_lvm {
id =3D &q= uot;xhewgS-UxVF-4qC5-MGXp-ErfX-6SNl-UkCdgz"
seqno =3D 3
for= mat =3D "lvm2"
status =3D ["RESIZEABLE", "READ&= quot;, "WRITE"]
flags =3D []
extent_size =3D 8192
max_lv= =3D 0
max_pv =3D 0
metadata_copies =3D 0

physical_volumes {
pv0 {
id =3D "XhEzob-g2D5-YcGp-zfz9-39R7-HII6-SITlH9&quo= t;
device =3D "/dev/sdc"

status =3D ["ALLOCATABLE&= quot;]
flags =3D []
dev_size =3D 62531584
pe_start =3D 2048
pe_= count =3D 7633
}
}

logical_volumes {

lvm_logvol {
id= =3D "IIKGTj-2eYn-5iTk-7KZd-ZMzS-aqYT-kwNgko"
status =3D = ["READ", "WRITE", "VISIBLE"]
flags =3D []<= br>creation_time =3D 1532609310
creation_host =3D "localhost.locald= omain"
segment_count =3D 1

segment1 {
start_extent =3D 0<= br>extent_count =3D 3840

type =3D "striped"
stripe_coun= t =3D 1

stripes =3D [
"pv0", 0
]
}
}

lv= m_logvol2 {
id =3D "dC9wIq-kJ3I-ixLV-A2f9-889Y-qpUr-DdfciL&quo= t;
status =3D ["READ", "WRITE", "VISIBLE"]=
flags =3D []
creation_time =3D 1532609325
creation_host =3D "= ;localhost.localdomain"
segment_count =3D 1

segment1 {
st= art_extent =3D 0
extent_count =3D 3584

type =3D "striped&quo= t;
stripe_count =3D 1

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

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

contents =3D "Text Format Volum= e Group"
version =3D 1

description =3D ""

c= reation_host =3D "localhost.localdomain"=C2=A0=C2=A0=C2=A0 # Linu= x localhost.localdomain 4.11.8-300.fc26.x86_64 #1 SMP Thu Jun 29 20:09:48 U= TC 2017 x86_64
creation_time =3D 1532609325=C2=A0=C2=A0=C2=A0 # Thu Jul = 26 08:48:45 2018


--0000000000001b7ba50571df61ab--