Bug 121197 - With no volumes LVM startup always ends up in failure
With no volumes LVM startup always ends up in failure
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Depends On:
Blocks: FC2Blocker
  Show dependency treegraph
Reported: 2004-04-18 16:51 EDT by Michal Jaegermann
Modified: 2014-03-16 22:44 EDT (History)
3 users (show)

See Also:
Fixed In Version: 7.51-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-05-03 17:50:20 EDT
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 2004-04-18 16:51:37 EDT
Description of problem:

When starting up a system in a default configuration the
following shows up:
Remounting root filesystem in read-write mode:             [  OK  ]
Setting up Logical Volume Management: setlocale failed
  No volume groups found
  Reading all physical volumes.  This may take a while...
Activating swap partitions:                                [  OK  ]

The following code (reformatted to fit) from /etc/rc.d/rc.sysinit

    if [ -e /dev/mapper/control -a -x /sbin/lvm.static ]; then
        action $"Setting up Logical Volume Management:" \
        /sbin/lvm.static vgscan && /sbin/lvm.static vgchange -a y \
        && /sbin/lvm vgmknodes

is causing that. 'action' is really getting as arguments these:

 $"Setting up Logical Volume Management:" /sbin/lvm.static vgscan

and in an absence of defined volumes  always fails.

It is quite likely that something like that was really desired:

    if [ -e /dev/mapper/control -a -x /sbin/lvm.static ]; then
        /sbin/lvm.static vgscan && \
        action $"Setting up Logical Volume Management:" \
        /sbin/lvm.static vgchange -a y \
        && /sbin/lvm vgmknodes

After such change a screen output changes to this:
Remounting root filesystem in read-write mode:             [  OK  ]
  setlocale failed
  Reading all physical volumes.  This may take a while...
  No volume groups found
Activating swap partitions:                                [  OK  ]

That still does not check a status of '/sbin/lvm vgmknodes' if
this runs but for this 'action' function would need to do something
of that kind

  eval "args=\"$*\""
  initlog $INITLOG_ARGS -c "$args" && ....

although that would require passig to 'action' a string of arguments
instead of just arguments and I have no idea how 'initlog' would
react if 'action' would get a string with '&&' in it - like
"/sbin/lvm.static vgchange -a y && /sbin/lvm vgmknodes".

A simpler possibilty seems to define other function which
runs /sbin/lvm.static vgscan and optionally /sbin/lvm.static vgchange
followed by /sbin/lvm vgmknodes, returns resulting status which is
0 if "No volume groups found", and pass that to 'action'; but then
'initlog' may get confused.

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

How reproducible:
Comment 1 Jason 2004-04-28 17:52:45 EDT
I just loaded FC2T3 on my machine and I am getting the same message
Comment 2 Bill Nottingham 2004-05-03 17:50:20 EDT
Fixed in 7.51-1.
Comment 3 Joe Cooper 2004-11-30 17:40:42 EST
# rpm -qf rc.sysinit

I still have this problem on Fedora Core 2 with the latest errata
initscripts version.

I'm unable to reopen this bug.  Should I file a new one?
Comment 4 Bill Nottingham 2004-11-30 20:30:48 EST
What specific errors do you get?

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