* [linux-lvm] what is writed on raw disk,
@ 2010-09-10 15:00 yue
2010-09-10 15:47 ` Zdenek Kabelac
2010-09-10 15:53 ` yue
0 siblings, 2 replies; 4+ messages in thread
From: yue @ 2010-09-10 15:00 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]
VolGroup00 {
id = "QCNEJh-9bbG-x6AV-uZEz-Dhsi-1LL7-fYSWbL"
seqno = 4
status = ["RESIZEABLE", "READ", "WRITE"]
extent_size = 65536
max_lv = 0
max_pv = 0
physical_volumes {
pv0 {
id = "p6HuAe-QgIZ-DQPE-MpMg-3CbJ-9Dv8-EtrI6Y"
device = "/dev/sda2"
status = ["ALLOCATABLE"]
dev_size = 16563015
pe_start = 384
pe_count = 252
}
pv1 {
id = "u3chxH-Poxl-39Sg-joPi-1qAa-vN3J-JvaWmB"
device = "/dev/sdc"
status = ["ALLOCATABLE"]
dev_size = 4096000
pe_start = 384
pe_count = 62
}
}
logical_volumes {
LogVol00 {
id = "yMgaVf-hfk5-kjVz-3wSe-cyw6-O8j3-75P0b4"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 202
type = "striped"
stripe_count = 1 # linear
stripes = ["pv0", 0]
}
}
LogVol01 {
id = "QZ9Plz-pW7Y-691z-XtdI-S5SI-V7Kc-Lrzis1"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 50
type = "striped"
stripe_count = 1 # linear
stripes = ["pv0", 202]
}
}
}//logical_volumes
}
------------------------------------
how many this kind of struct is writed on raw disk,and its value???what is different??
how a group is parsed?
[-- Attachment #2: Type: text/html, Size: 2239 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] what is writed on raw disk,
2010-09-10 15:00 [linux-lvm] what is writed on raw disk, yue
@ 2010-09-10 15:47 ` Zdenek Kabelac
2010-09-10 15:53 ` yue
1 sibling, 0 replies; 4+ messages in thread
From: Zdenek Kabelac @ 2010-09-10 15:47 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: yue
Dne 10.9.2010 17:00, yue napsal(a):
> VolGroup00 {
> id = "QCNEJh-9bbG-x6AV-uZEz-Dhsi-1LL7-fYSWbL"
> seqno = 4
> status = ["RESIZEABLE", "READ", "WRITE"]
...
> }
> }//logical_volumes
> }
> ------------------------------------
> how many this kind of struct is writed on raw disk,and its value???what is different??
> how a group is parsed?
There is always at least one back-up copy, to be able to do commit - first
write new metadata - and when they are fully written mark them as valid. So in
case of any write problem there is always previous last valid version
available - see pvcreate --metadatasize --metadatasize and some other options
in manpage)
Major part of parser is located in lib/config/config.c.
As for your previous question about some detailed LVM architecture document -
well mostly only the source code itself...
It would probably be better to specify what are you trying to achieve to get
help with that ?
Zdenek
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] what is writed on raw disk,
2010-09-10 15:00 [linux-lvm] what is writed on raw disk, yue
2010-09-10 15:47 ` Zdenek Kabelac
@ 2010-09-10 15:53 ` yue
2010-09-13 9:48 ` Zdenek Kabelac
1 sibling, 1 reply; 4+ messages in thread
From: yue @ 2010-09-10 15:53 UTC (permalink / raw)
To: Zdenek Kabelac; +Cc: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 1313 bytes --]
i want to know lvm2 on source-code level.
and kernel device-mapper??
just analysis source code is hard, can you give me some function-call stream.
and whole blueprint.
----------------------------------------------------------------------------------------------
At 2010-09-10 23:47:01,"Zdenek Kabelac" <zkabelac@redhat.com> wrote:
>Dne 10.9.2010 17:00, yue napsal(a):
>> VolGroup00 {
>> id = "QCNEJh-9bbG-x6AV-uZEz-Dhsi-1LL7-fYSWbL"
>> seqno = 4
>> status = ["RESIZEABLE", "READ", "WRITE"]
>...
>> }
>> }//logical_volumes
>> }
>> ------------------------------------
>> how many this kind of struct is writed on raw disk,and its value???what is different??
>> how a group is parsed?
>
>
>There is always at least one back-up copy, to be able to do commit - first
>write new metadata - and when they are fully written mark them as valid. So in
>case of any write problem there is always previous last valid version
>available - see pvcreate --metadatasize --metadatasize and some other options
>in manpage)
>
>Major part of parser is located in lib/config/config.c.
>
>As for your previous question about some detailed LVM architecture document -
>well mostly only the source code itself...
>
>It would probably be better to specify what are you trying to achieve to get
>help with that ?
>
>Zdenek
[-- Attachment #2: Type: text/html, Size: 2428 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] what is writed on raw disk,
2010-09-10 15:53 ` yue
@ 2010-09-13 9:48 ` Zdenek Kabelac
0 siblings, 0 replies; 4+ messages in thread
From: Zdenek Kabelac @ 2010-09-13 9:48 UTC (permalink / raw)
To: yue; +Cc: LVM general discussion and development
Dne 10.9.2010 17:53, yue napsal(a):
> i want to know lvm2 on source-code level.
> and kernel device-mapper??
> just analysis source code is hard, can you give me some function-call stream.
> and whole blueprint.
If you really want to know 'in-depth' detail - I may suggest to use tools like
kcachegrind to get flow-control.
It's in fact not so easy to describe lvm2 functionality in few lines and it's
also 'moving' target as some call flow changes over the time.
Very slight overview might look like this:
- read config
- scan available block devices according config (changes quite a lot with udev
integration and cache usage)
- create internal structures and do some action according to given command
- some of commands are changing dm table - so internal dm tree structure is
generated - this abstraction is hidden in libdm
- activation/deactivation is executed - note - as lvm2 supports clusters -
this is somewhat more complex and unless you plan to have a very deep look
inside you probably don't want to know all the magic behind - lots of limits
apply - very tight memory rules needs to be preserved to avoid deadlocks...
If you plan to add new 'target' - you may look into lib/striped subdir - there
is very some simple example.
Some sort of 'virtual' methods calls are used - unfortunately this call flow
is far from complete so target usually needs few quirks here and there over
the whole code base for now and usually knows a long depth knowledge of this
process - far from perfect, but that's current status...
Zdenek
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-13 9:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-10 15:00 [linux-lvm] what is writed on raw disk, yue
2010-09-10 15:47 ` Zdenek Kabelac
2010-09-10 15:53 ` yue
2010-09-13 9:48 ` 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).