Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Dev

[PATCH 1/2] LVM: activate VG with --partial

 

 

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded


msmith at cbnco

Sep 7, 2010, 12:55 PM

Post #1 of 6 (512 views)
Permalink
[PATCH 1/2] LVM: activate VG with --partial

From: Xinwei Hu <xwhu [at] novell>

We prefer to activate the mirrored LV is in the degraded mode,
rather then failing to activate it at all.

Signed-off-by: Xinwei Hu <xwhu [at] novell>

---
This is in SLES11 since April 20, 2010. It's Xinwei's patch; I'm just
sending it upstream.

Index: resource-agents/heartbeat/LVM
===================================================================
--- resource-agents.orig/heartbeat/LVM 2010-04-06 21:53:31.000000000 +0800
+++ resource-agents/heartbeat/LVM 2010-04-20 14:22:28.000000000 +0800
@@ -201,7 +201,9 @@
active_mode="ey"
fi

- ocf_run vgchange -a $active_mode $1 || return $OCF_ERR_GENERIC
+# Activate the VG in partial.
+# This is needed for mirrored LV
+ ocf_run vgchange -a $active_mode --partial $1 || return $OCF_ERR_GENERIC

if LVM_status $1; then
: OK Volume $1 activated just fine!
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


dejanmm at fastmail

Sep 23, 2010, 3:47 AM

Post #2 of 6 (469 views)
Permalink
Re: [PATCH 1/2] LVM: activate VG with --partial [In reply to]

Hi,

On Tue, Sep 07, 2010 at 03:55:26PM -0400, Michael Smith wrote:
> From: Xinwei Hu <xwhu [at] novell>
>
> We prefer to activate the mirrored LV is in the degraded mode,
> rather then failing to activate it at all.

What are the possible consequences of using --partial to activate
a volume group? Please note that it is supposed to work correctly
for non-mirrored volumes too. Which means that as soon as the LVM
exits, the volume has to be fully functional.

Thanks,

Dejan

> Signed-off-by: Xinwei Hu <xwhu [at] novell>
>
> ---
> This is in SLES11 since April 20, 2010. It's Xinwei's patch; I'm just
> sending it upstream.
>
> Index: resource-agents/heartbeat/LVM
> ===================================================================
> --- resource-agents.orig/heartbeat/LVM 2010-04-06 21:53:31.000000000 +0800
> +++ resource-agents/heartbeat/LVM 2010-04-20 14:22:28.000000000 +0800
> @@ -201,7 +201,9 @@
> active_mode="ey"
> fi
>
> - ocf_run vgchange -a $active_mode $1 || return $OCF_ERR_GENERIC
> +# Activate the VG in partial.
> +# This is needed for mirrored LV
> + ocf_run vgchange -a $active_mode --partial $1 || return $OCF_ERR_GENERIC
>
> if LVM_status $1; then
> : OK Volume $1 activated just fine!
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


msmith at cbnco

Sep 23, 2010, 5:08 AM

Post #3 of 6 (469 views)
Permalink
Re: [PATCH 1/2] LVM: activate VG with --partial [In reply to]

On Thu, 23 Sep 2010, Dejan Muhamedagic wrote:

> On Tue, Sep 07, 2010 at 03:55:26PM -0400, Michael Smith wrote:
> > From: Xinwei Hu <xwhu [at] novell>
> >
> > We prefer to activate the mirrored LV is in the degraded mode,
> > rather then failing to activate it at all.
>
> What are the possible consequences of using --partial to activate
> a volume group?

As I understand it, --partial will allow a mirrored volume group to be
activated if some of the mirror drives are missing.

It will also allow a group to be activated in read-only mode if drives
(and data) are missing. So perhaps this --partial should be conditional on
a parameter.

> > Signed-off-by: Xinwei Hu <xwhu [at] novell>
> >
> > ---
> > This is in SLES11 since April 20, 2010. It's Xinwei's patch; I'm just
> > sending it upstream.
> >
> > Index: resource-agents/heartbeat/LVM
> > ===================================================================
> > --- resource-agents.orig/heartbeat/LVM 2010-04-06 21:53:31.000000000 +0800
> > +++ resource-agents/heartbeat/LVM 2010-04-20 14:22:28.000000000 +0800
> > @@ -201,7 +201,9 @@
> > active_mode="ey"
> > fi
> >
> > - ocf_run vgchange -a $active_mode $1 || return $OCF_ERR_GENERIC
> > +# Activate the VG in partial.
> > +# This is needed for mirrored LV
> > + ocf_run vgchange -a $active_mode --partial $1 || return $OCF_ERR_GENERIC
> >
> > if LVM_status $1; then
> > : OK Volume $1 activated just fine!
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


dejanmm at fastmail

Sep 23, 2010, 8:15 AM

Post #4 of 6 (468 views)
Permalink
Re: [PATCH 1/2] LVM: activate VG with --partial [In reply to]

On Thu, Sep 23, 2010 at 08:08:47AM -0400, Michael Smith wrote:
> On Thu, 23 Sep 2010, Dejan Muhamedagic wrote:
>
> > On Tue, Sep 07, 2010 at 03:55:26PM -0400, Michael Smith wrote:
> > > From: Xinwei Hu <xwhu [at] novell>
> > >
> > > We prefer to activate the mirrored LV is in the degraded mode,
> > > rather then failing to activate it at all.
> >
> > What are the possible consequences of using --partial to activate
> > a volume group?
>
> As I understand it, --partial will allow a mirrored volume group to be
> activated if some of the mirror drives are missing.
>
> It will also allow a group to be activated in read-only mode if drives
> (and data) are missing. So perhaps this --partial should be conditional on
> a parameter.

Yes, I'd really prefer that. It looks like a substantial
semantical change to me. The man page says:

Where part of a logical volume is missing, /dev/ioer-
ror will be substituted, and you could use dmsetup (8) to
set this up to return I/O errors when accessed,
or create it as a large block device of nulls.

Thanks,

Dejan

> > > Signed-off-by: Xinwei Hu <xwhu [at] novell>
> > >
> > > ---
> > > This is in SLES11 since April 20, 2010. It's Xinwei's patch; I'm just
> > > sending it upstream.
> > >
> > > Index: resource-agents/heartbeat/LVM
> > > ===================================================================
> > > --- resource-agents.orig/heartbeat/LVM 2010-04-06 21:53:31.000000000 +0800
> > > +++ resource-agents/heartbeat/LVM 2010-04-20 14:22:28.000000000 +0800
> > > @@ -201,7 +201,9 @@
> > > active_mode="ey"
> > > fi
> > >
> > > - ocf_run vgchange -a $active_mode $1 || return $OCF_ERR_GENERIC
> > > +# Activate the VG in partial.
> > > +# This is needed for mirrored LV
> > > + ocf_run vgchange -a $active_mode --partial $1 || return $OCF_ERR_GENERIC
> > >
> > > if LVM_status $1; then
> > > : OK Volume $1 activated just fine!
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


msmith at cbnco

Sep 23, 2010, 11:11 AM

Post #5 of 6 (465 views)
Permalink
Re: [PATCH 1/2] LVM: activate VG with --partial [In reply to]

Dejan Muhamedagic wrote:
> On Thu, Sep 23, 2010 at 08:08:47AM -0400, Michael Smith wrote:
>> On Thu, 23 Sep 2010, Dejan Muhamedagic wrote:
>>
>>> On Tue, Sep 07, 2010 at 03:55:26PM -0400, Michael Smith wrote:
>>>> From: Xinwei Hu <xwhu [at] novell>
>>>>
>>>> We prefer to activate the mirrored LV is in the degraded mode,
>>>> rather then failing to activate it at all.
>>> What are the possible consequences of using --partial to activate
>>> a volume group?
>> As I understand it, --partial will allow a mirrored volume group to be
>> activated if some of the mirror drives are missing.
>>
>> It will also allow a group to be activated in read-only mode if drives
>> (and data) are missing. So perhaps this --partial should be conditional on
>> a parameter.
>
> Yes, I'd really prefer that. It looks like a substantial
> semantical change to me. The man page says:

I think you and Xinwei both work for Novell/SUSE, right? Maybe you can
sort it out amongst yourselves. The patch is in SLES. I don't actually
need it, I just figured somebody should get it upstream.

Mike
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


dejanmm at fastmail

Sep 24, 2010, 1:55 AM

Post #6 of 6 (462 views)
Permalink
Re: [PATCH 1/2] LVM: activate VG with --partial [In reply to]

Hi,

On Thu, Sep 23, 2010 at 02:11:03PM -0400, Michael Smith wrote:
> Dejan Muhamedagic wrote:
> > On Thu, Sep 23, 2010 at 08:08:47AM -0400, Michael Smith wrote:
> >> On Thu, 23 Sep 2010, Dejan Muhamedagic wrote:
> >>
> >>> On Tue, Sep 07, 2010 at 03:55:26PM -0400, Michael Smith wrote:
> >>>> From: Xinwei Hu <xwhu [at] novell>
> >>>>
> >>>> We prefer to activate the mirrored LV is in the degraded mode,
> >>>> rather then failing to activate it at all.
> >>> What are the possible consequences of using --partial to activate
> >>> a volume group?
> >> As I understand it, --partial will allow a mirrored volume group to be
> >> activated if some of the mirror drives are missing.
> >>
> >> It will also allow a group to be activated in read-only mode if drives
> >> (and data) are missing. So perhaps this --partial should be conditional on
> >> a parameter.
> >
> > Yes, I'd really prefer that. It looks like a substantial
> > semantical change to me. The man page says:
>
> I think you and Xinwei both work for Novell/SUSE, right? Maybe you can
> sort it out amongst yourselves. The patch is in SLES. I don't actually
> need it, I just figured somebody should get it upstream.

Well, it's the other way around, this is the right place to sort
things like this out :)

Thanks,

Dejan

> Mike
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.