* [linux-lvm] what does 'orphan vg' mean?(global vg?)
@ 2010-04-13 7:16 Busby.Cheung
2010-04-13 7:41 ` Milan Broz
2010-04-13 8:14 ` Busby.Cheung
0 siblings, 2 replies; 7+ messages in thread
From: Busby.Cheung @ 2010-04-13 7:16 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 244 bytes --]
Hi All,
While I was reading the lvm source code, I can't understand what 'is_orphan' means(like 'is_orphan_vg' function). what's the different between orphan and global vg?
Thank you very much.
Best Regards,
Busby.Cheung
[-- Attachment #2: Type: text/html, Size: 471 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] what does 'orphan vg' mean?(global vg?)
2010-04-13 7:16 [linux-lvm] what does 'orphan vg' mean?(global vg?) Busby.Cheung
@ 2010-04-13 7:41 ` Milan Broz
2010-04-13 8:14 ` Busby.Cheung
1 sibling, 0 replies; 7+ messages in thread
From: Milan Broz @ 2010-04-13 7:41 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: Busby.Cheung
On 04/13/2010 09:16 AM, Busby.Cheung wrote:
> While I was reading the lvm source code, I can't understand what
> 'is_orphan' means(like 'is_orphan_vg' function). what's the different
> between orphan and global vg?
Orphan PV is device with PV label which is not attached to any Volume Group.
(IOW it is handled by LVM, but space on it is not yet allocatable.)
There is no such thing like Global VG in LVM2, only "global lock".
It is internal lock used to avoid parallel scanning of all devices.
(you will see it in vgscan command for example).
Milan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] what does 'orphan vg' mean?(global vg?)
2010-04-13 7:16 [linux-lvm] what does 'orphan vg' mean?(global vg?) Busby.Cheung
2010-04-13 7:41 ` Milan Broz
@ 2010-04-13 8:14 ` Busby.Cheung
2010-04-13 10:54 ` Milan Broz
2010-04-13 11:33 ` Busby.Cheung
1 sibling, 2 replies; 7+ messages in thread
From: Busby.Cheung @ 2010-04-13 8:14 UTC (permalink / raw)
To: Milan Broz; +Cc: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]
Hi Milan,
Thank you very much for so qucik answer.
The reason cause me to read the source code is you mentioned in your email: 'vgscan'. When I use the 'vgs' cmd, it maybe take a long time, the 'vgs' can't be executed parallelly? The 'vgs' cmd will scan all the devices, once one device locked, it will wait till timeout or err come(device err)?
Best Regards,
Busby
> -----原始邮件-----
> 发件人: "Milan Broz" <mbroz@redhat.com>
> 发送时间: 2010年4月13日 星期二
> 收件人: "LVM general discussion and development" <linux-lvm@redhat.com>
> 抄送: "Busby.Cheung" <chaimvy@163.com>
> 主题: Re: [linux-lvm] what does 'orphan vg' mean?(global vg?)
>
> On 04/13/2010 09:16 AM, Busby.Cheung wrote:
> > While I was reading the lvm source code, I can't understand what
> > 'is_orphan' means(like 'is_orphan_vg' function). what's the different
> > between orphan and global vg?
>
> Orphan PV is device with PV label which is not attached to any Volume Group.
> (IOW it is handled by LVM, but space on it is not yet allocatable.)
>
> There is no such thing like Global VG in LVM2, only "global lock".
> It is internal lock used to avoid parallel scanning of all devices.
> (you will see it in vgscan command for example).
>
> Milan
[-- Attachment #2: Type: text/html, Size: 1575 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] what does 'orphan vg' mean?(global vg?)
2010-04-13 8:14 ` Busby.Cheung
@ 2010-04-13 10:54 ` Milan Broz
2010-04-13 11:33 ` Busby.Cheung
1 sibling, 0 replies; 7+ messages in thread
From: Milan Broz @ 2010-04-13 10:54 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: Busby.Cheung
On 04/13/2010 10:14 AM, Busby.Cheung wrote:
> Thank you very much for so qucik answer.
> The reason cause me to read the source code is you mentioned in
> your email: 'vgscan'. When I use the 'vgs' cmd, it maybe take a long
> time, the 'vgs' can't be executed parallelly? The 'vgs' cmd will scan
> all the devices, once one device locked, it will wait till timeout or
> err come(device err)?
vgs take global lock for performance reasons (it can use cached metadata
completely then), so it waits for some time if vgscan run in parallel.
(but you do not need to run vgscan at all except adding new device or so)
full scan should not take too much time, but there was some bug fixed
recently (missing device was searched too many times slowing everything down)
Milan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] what does 'orphan vg' mean?(global vg?)
2010-04-13 8:14 ` Busby.Cheung
2010-04-13 10:54 ` Milan Broz
@ 2010-04-13 11:33 ` Busby.Cheung
2010-04-13 12:11 ` Milan Broz
2010-04-13 12:36 ` Busby.Cheung
1 sibling, 2 replies; 7+ messages in thread
From: Busby.Cheung @ 2010-04-13 11:33 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 1385 bytes --]
在2010-04-13 18:54:37,"Milan Broz" <mbroz@redhat.com> 写道:
>On 04/13/2010 10:14 AM, Busby.Cheung wrote:
>> Thank you very much for so qucik answer.
>> The reason cause me to read the source code is you mentioned in
>> your email: 'vgscan'. When I use the 'vgs' cmd, it maybe take a long
>> time, the 'vgs' can't be executed parallelly? The 'vgs' cmd will scan
>> all the devices, once one device locked, it will wait till timeout or
>> err come(device err)?
>
>vgs take global lock for performance reasons (it can use cached metadata
>completely then), so it waits for some time if vgscan run in parallel.
>(but you do not need to run vgscan at all except adding new device or so)
>
>full scan should not take too much time, but there was some bug fixed
>recently (missing device was searched too many times slowing everything down)
>
>Milan
>
My LVM2 version is 2.02.54, haven't done any patch.
Did you mean that there were some patches to fix the 'take long time' 's bug?
I can't understand 'missing device was searched too many times slowing everything down' as you said, what does 'missing device was searched too many times' mean? Does that means some device like '/dev/sde' which is an missed device, but the lvm2 will open it (because it appears in the system's device list), so the 'timeout' comes (long time)?
Thank you very much.
Regards,
Busby
[-- Attachment #2: Type: text/html, Size: 2425 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] what does 'orphan vg' mean?(global vg?)
2010-04-13 11:33 ` Busby.Cheung
@ 2010-04-13 12:11 ` Milan Broz
2010-04-13 12:36 ` Busby.Cheung
1 sibling, 0 replies; 7+ messages in thread
From: Milan Broz @ 2010-04-13 12:11 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: Busby.Cheung
On 04/13/2010 01:33 PM, Busby.Cheung wrote:
> My LVM2 version is 2.02.54, haven't done any patch.
> Did you mean that there were some patches to fix the 'take long time' 's bug?
I mean these not-yet released changes in upstream, not that fixes all problems,
but should help
Version 2.02.63 -
Suppress repeated errors about the same missing PV uuids.
Bypass full device scans when using internally-cached VG metadata.
Only do one full device scan during each read of text format metadata.
Milan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] what does 'orphan vg' mean?(global vg?)
2010-04-13 11:33 ` Busby.Cheung
2010-04-13 12:11 ` Milan Broz
@ 2010-04-13 12:36 ` Busby.Cheung
1 sibling, 0 replies; 7+ messages in thread
From: Busby.Cheung @ 2010-04-13 12:36 UTC (permalink / raw)
To: Milan Broz; +Cc: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 1411 bytes --]
Hi Milan,
Thank you very much for so detailed reply.
I still have one question, the full scan like 'vgs' will scan the devives(both used and unused in the LVM) to find the label info, I read the debug mesg by using 'vgs -vvvv' cmd. when it take a long time, it may stop for a while by output the '#device/dev-io.c:486 Opened /dev/sdp RO O_DIRECT' ('sdp' just for example,or may be a soft raid md device), I don't know why it will stop for a while, locking?device missing? or other reason? I need your help and advice.
The missing devices you mentioned in the emails before, means the devices used in the LVM (PVs), or the other devices in the system , or both? You said 'missing device was searched too many times slowing everything down'.
Best Regards,
Busby
在2010-04-13 20:11:01,"Milan Broz" <mbroz@redhat.com> 写道:
>On 04/13/2010 01:33 PM, Busby.Cheung wrote:
>> My LVM2 version is 2.02.54, haven't done any patch.
>> Did you mean that there were some patches to fix the 'take long time' 's bug?
>
>I mean these not-yet released changes in upstream, not that fixes all problems,
>but should help
>
>Version 2.02.63 -
> Suppress repeated errors about the same missing PV uuids.
> Bypass full device scans when using internally-cached VG metadata.
> Only do one full device scan during each read of text format metadata.
>
>Milan
[-- Attachment #2: Type: text/html, Size: 2417 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-04-13 12:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-13 7:16 [linux-lvm] what does 'orphan vg' mean?(global vg?) Busby.Cheung
2010-04-13 7:41 ` Milan Broz
2010-04-13 8:14 ` Busby.Cheung
2010-04-13 10:54 ` Milan Broz
2010-04-13 11:33 ` Busby.Cheung
2010-04-13 12:11 ` Milan Broz
2010-04-13 12:36 ` Busby.Cheung
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).