Bug 189751 - cannot mount local lvm2 partition with lvm2-cluster
cannot mount local lvm2 partition with lvm2-cluster
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: initscripts (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On: 165787
Blocks: 176344 198694
  Show dependency treegraph
 
Reported: 2006-04-24 08:01 EDT by Jeff Layton
Modified: 2014-06-18 03:35 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-21 17:11:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Comment 1 Jeff Layton 2006-04-24 09:12:19 EDT
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
resolved.
Comment 2 Bill Nottingham 2006-04-24 14:03:04 EDT
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 14:20:56 EDT
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 14:23:00 EDT
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 15:51:36 EDT
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 12:08:35 EDT
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
release.
Comment 15 Alasdair Kergon 2006-09-03 19:39:51 EDT
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-03 20:29:20 EDT
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-05 23:29:52 EDT
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 16:18:55 EST
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 16:27:34 EST
I'll defer that question to Alasdair since he did the upstream changes.
Comment 21 Alasdair Kergon 2006-11-20 16:55:38 EST
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 17:25:16 EST
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 17:11:45 EST
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.