Bug 189751 - cannot mount local lvm2 partition with lvm2-cluster
Summary: cannot mount local lvm2 partition with lvm2-cluster
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: initscripts
Version: 4.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
Depends On: 165787
Blocks: 176344 198694
TreeView+ depends on / blocked
Reported: 2006-04-24 12:01 UTC by Jeff Layton
Modified: 2014-06-18 07:35 UTC (History)
11 users (show)

Clone Of:
Last Closed: 2006-11-21 22:11:45 UTC

Attachments (Terms of Use)
first stab at a patch to fix problem (2.01 KB, patch)
2006-04-24 13:12 UTC, Jeff Layton
no flags Details | Diff

Comment 1 Jeff Layton 2006-04-24 13:12:19 UTC
Created attachment 128144 [details]
first stab at a patch to fix problem

Here's a first stab at a patch to fix this problem. I tested the rc.sysinit
piece by changing all invocations of lvm.static in it to just plain "lvm". This
worked, but (of course) would not if /usr were on a different filesystem.

So, I think this patch should do the trick, but is dependent BZ 165787 getting

Comment 2 Bill Nottingham 2006-04-24 18:03:04 UTC
That's ugly.

Aside from the fact that it changes the operation from one command total to nine
commands per volume, it's duplicating logic that it appears it could be easily
handled in the LVM code itself; the code itself has the knowledge of what sort
of locking each volume does, so it should be easy enough to specify an
additional option to only start ones that don't use cluster locking.

Comment 3 Jeff Layton 2006-04-24 18:20:56 UTC
No argument on the prettiness of this, when I discussed this with Alasdair over
the weekend, this was basically what he suggested (though he did mention maybe
adding some filtering code to "vgs" to cut down on some of the string slicing.

My initial thought was to basically do this, and just vgchange -ay each VG that
wasn't clustered, but AGK suggested this approach since activating LV's that are
already activated is a waste.

Also, unfortunately, with the current LVM2 code, the locking settings are
global. It doesn't currently have any conception of what sort of locking each VG
should do (though we might presumably be able to add something like an
--ignore-clustered flag or something).

Comment 4 Bill Nottingham 2006-04-24 18:23:00 UTC
That's what I'm suggesting, sorry if I used the wrong terminology - the tool
knows what is clustered, it should be easily enough to exclude.

Comment 5 Jeff Layton 2006-04-24 19:51:36 UTC
Ok, I've just posted a patch to the other BZ (165787) that adds a
--skipclustered flag to vgchange. If Alasdair finds that patch reasonable, then
we should just be able to add that flag to the vgchange line here.

Comment 11 RHEL Product and Program Management 2006-08-18 16:08:35 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update

Comment 15 Alasdair Kergon 2006-09-03 23:39:51 UTC
Made some changes upstream (in reverse order) which I hope will help:

  Don't attempt automatic recovery without proper locking.
  When using local file locking, skip clustered VGs.
  Add fallback_to_clustered_locking and fallback_to_local_locking parameters.
  lvm.static uses built-in cluster locking instead of external locking.
  Don't attempt to load shared libraries if built statically.

So the hope is that, with the new default behaviour, provided the command *only*
references a specific non-clustered VG it will now be able to run successfully.

Comment 16 Alasdair Kergon 2006-09-04 00:29:20 UTC
But initscripts is likely still to need to add an extra parameter to the lvm
command - this bz depends on the lvm2 one.

Comment 18 David Lawrence 2006-09-06 03:29:52 UTC
Should be reproducible by QE based on test case given in comment from
jlayton@redhat.com on 2006-04-20 15:26 EST. Adding qa_ack+ for 4.5

Comment 19 Bill Nottingham 2006-11-20 21:18:55 UTC
Is there better information on the LVM side as to what, if any, initscripts
changes may be needed?

Comment 20 Jeff Layton 2006-11-20 21:27:34 UTC
I'll defer that question to Alasdair since he did the upstream changes.

Comment 21 Alasdair Kergon 2006-11-20 21:55:38 UTC
I'm lost with what the outstanding problem is on this bugzilla.

Please test with the latest lvm2/lvm2-cluster packages (currently being built)
2.02.15-1 and report back.  If there are still problems, there should now be
enough command-line configurability to work around them.

Comment 22 Bill Nottingham 2006-11-20 22:25:16 UTC
OK, can someone put this info in the original LVM2 bug? (167587)

Should this bug just be closed?

Comment 25 Jeff Layton 2006-11-21 22:11:45 UTC
Sounds like the lvm2 packages themselves fix this without any need for
initscripts changes. Going ahead and closing this as notabug.

Note You need to log in before you can comment on or make changes to this bug.