This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 161874 - lvm suffers from "chicken-and-egg" problem in a startup
lvm suffers from "chicken-and-egg" problem in a startup
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: lvm2 (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
Brian Brock
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2007-01-10 12:48:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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):
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 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.