linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Where is the PE to LE mapping done?
@ 2006-06-08 12:33 조완근
  2006-06-08 14:29 ` Dieter Stüken
  0 siblings, 1 reply; 2+ messages in thread
From: 조완근 @ 2006-06-08 12:33 UTC (permalink / raw)
  To: linux-lvm

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





Hello, This is my second e-mail.


 


Where does the mapping between PE and LE is done? And When happen?


When the new Logical Volume is created based on already built PV and VG, 
is  the mapping done?


 


In the source code, /lib/metadata/metadata.h, there are "lv_segment" 
& "pv_segment". does the "segment" equal the "extent"??


 


Each "physical_volume" struct and "logical_volume" struct has a segment list 
like "pv_segment" and "lv_segment". But there are also "pv_list" and "lv_list". 
How the mapping is done with these structures..??


 


One more thing is, "What code do I have to read in the sources to know 
how the mapping is done??"


 


Thank you ^^:






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

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

* Re: [linux-lvm] Where is the PE to LE mapping done?
  2006-06-08 12:33 [linux-lvm] Where is the PE to LE mapping done? 조완근
@ 2006-06-08 14:29 ` Dieter Stüken
  0 siblings, 0 replies; 2+ messages in thread
From: Dieter Stüken @ 2006-06-08 14:29 UTC (permalink / raw)
  To: jowkju, LVM general discussion and development

조완근 wrote:
> Hello, This is my second e-mail.

Sorry, if my first answer was not helpful to you.
Here is a good introduction into LVM internals
by Alasdair G Kergon:

http://people.redhat.com/agk/talks/LVM2-LinuxTag2006

You should also have a look into the meta data backup under
/etc/lvm/backup/* This describes the content of the data
structures you found in the sources. May be this helps
to understand how a VG is organized.

But even if you are much faster in reading and understanding
C source code (57251 lines) than reading the documentation
(3166 lines), I still think, your problem can be solved
by using the provided LVM-tools. 

For example: you may modify/edit the meta data dump with a
text editor and use "vgcfgrestore" to fill up the data structs
you found. (but you can also destroy your LVM this way!).

Dieter.

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

end of thread, other threads:[~2006-06-08 14:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-08 12:33 [linux-lvm] Where is the PE to LE mapping done? 조완근
2006-06-08 14:29 ` Dieter Stüken

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