Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 161874 - lvm suffers from "chicken-and-egg" problem in a startup
Summary: lvm suffers from "chicken-and-egg" problem in a startup
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Alasdair Kergon
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-06-27 23:46 UTC by Michal Jaegermann
Modified: 2007-11-30 22:11 UTC (History)
4 users (show)

Fixed In Version: old
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-10 17:48:46 UTC


Attachments (Terms of Use)

Description Michal Jaegermann 2005-06-27 23:46:03 UTC
Description of problem:

When booting a system where /var is mounted from a separate file system,
which you may want to do if your / is mounted read-only as one of many
possibilities, you will see:

/var/lock/lvm: mkdir failed: Read-only file system

The problem is that at this moment /var indeed is yet read-only but lvm
does not care.  Well, /var could be located conceivably on some LVM volume.

Interestingly enough this message is not showing up with lvm2-2.01.12-1.0
from the current rawhide but this does not say anything that /var/lock/lvm
will be created and I do not know if existing volume groups would be
found if such indeed would exist.  All of this despite that
'--ignorelockingfailure' flag was given.

Removing lvm2, even if it not really used and despite of
"if [ -x /sbin/lvm.static ]; then ..." in rc.sysconfing, is not really an
option. 'yum remove lvm2' comes back with a proposition to basically
remove the whole system. :-)  The only possible hack would be to
rename /sbin/lvm.static which would have to be traced through every update.

Version-Release number of selected component (if applicable):
lvm2-2.01.08-2.1

How reproducible:
always

Steps to Reproduce:

The easiest way to reproduce the condition is to do

mount -o ro -t tmpfs none /var/lock
/sbin/lvm.static vgchange -a y --ignorelockingfailure
umount /var/lock

On FC4 this responds with "/var/lock/lvm: mkdir failed: Read-only file system".

I guess that the easiest thing would be to "2>/dev/null" in a corresponding
place of rc.sysinit but I have no idea if this is really a correct course of
action.

Comment 1 Michael Carney 2005-10-05 04:31:45 UTC
Having /var be a separate partition is by no means a rare configuration. 

Comment 2 Alasdair Kergon 2007-01-10 17:48:46 UTC
The error message should be suppressed nowadays.  (Please reopen if there are
still problems.)


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