Bug 161874 - lvm suffers from "chicken-and-egg" problem in a startup
lvm suffers from "chicken-and-egg" problem in a startup
Product: Fedora
Classification: Fedora
Component: lvm2 (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2005-06-27 19:46 EDT by Michal Jaegermann
Modified: 2007-11-30 17:11 EST (History)
4 users (show)

See Also:
Fixed In Version: old
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-01-10 12:48:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2005-06-27 19:46:03 EDT
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):

How reproducible:

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
Comment 1 Michael Carney 2005-10-05 00:31:45 EDT
Having /var be a separate partition is by no means a rare configuration. 
Comment 2 Alasdair Kergon 2007-01-10 12:48:46 EST
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.