Bug 125706

Summary: can't make root volume read-write again
Product: [Fedora] Fedora Reporter: Alexandre Oliva <oliva>
Component: lvm2Assignee: Alasdair Kergon <agk>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 2CC: 157070.alewis
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-06-10 14:35:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexandre Oliva 2004-06-10 13:39:44 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

Description of problem:
I have a flaky box that has been crashing at random, due to unknown
problems (not memory).  Today, when I tried to log into it, I found
out its root filesystem, mounted off a logical volume, was read-only.
 Some filesystem error that failed to make it to /var/log/messages
because it was read only :-(, I thought.

Anyhow...  I tried to remount it read-write, and it said the logical
volume was read-only.  So I tried vgscan, vgchange -ay VG0, and they
failed because they couldn't create the lock files.  Adding
--ignorelockingfailure worked around this problem, and the volume
group was fine.

So I figured the logical volume might have become unavailable or
read-only.  lvchange -ay --ignorelockingfailure works, but lvchange
-prw --ignorelockingfailure says the latter can only be used for -a. 
I was stuck.

Too bad I forced a reboot before realizing I could have simply used
separate storage for the lock files et al.  The box didn't come back.
 Probably filesystem corruption :-(

Version-Release number of selected component (if applicable):
lvm2-2.00.15-2

How reproducible:
Couldn't Reproduce

Steps to Reproduce:
1.Get the logical volume holding the root filesystem into a read-only
state
2.Try to make it read-write again

Actual Results:  Without additional storage, can't be done

Expected Results:  I'd hope lvchange could accept
--ignorelockingfailure to do so.

Additional info:

Comment 1 Alasdair Kergon 2004-06-10 14:06:53 UTC
The logical volume can't change from read-write to read-only on its
own as far as I know.

lvchange -p needs to write metadata so there's no way it can be
allowed to ignore locking failures.

It's a requirement of using the tools that you have a rw lock
directory e.g. tmpfs.


Comment 2 Alasdair Kergon 2004-06-10 14:10:03 UTC
The locking directory shouldn't really ever be on an LV, of course.

Comment 3 Alexandre Oliva 2004-06-10 14:30:05 UTC
Ok, so maybe mount -o remount,rw / simply refused to mount the root
filesystem because it contained errors (which is likely, since the
machine didn't come back up).  Bug report withdrawn, but feel free to
leave it open if you'd like a reason to work on keeping the metadata
in tmpfs or so.

Comment 4 Alasdair Kergon 2004-06-10 14:35:36 UTC
The point about how to recover from setting the only LV which also
contains the locking to read-only ought to go into the FAQ.