Bug 121197 - With no volumes LVM startup always ends up in failure
Summary: With no volumes LVM startup always ends up in failure
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC2Blocker
TreeView+ depends on / blocked
 
Reported: 2004-04-18 20:51 UTC by Michal Jaegermann
Modified: 2014-03-17 02:44 UTC (History)
3 users (show)

Fixed In Version: 7.51-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-05-03 21:50:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michal Jaegermann 2004-04-18 20:51:37 UTC
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...
                                                           [FAILED]
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
    fi

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
    fi

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

  shift
  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):
initscripts-7.50-1

How reproducible:
Always

Comment 1 Jason 2004-04-28 21:52:45 UTC
I just loaded FC2T3 on my machine and I am getting the same message

Comment 2 Bill Nottingham 2004-05-03 21:50:20 UTC
Fixed in 7.51-1.

Comment 3 Joe Cooper 2004-11-30 22:40:42 UTC
# rpm -qf rc.sysinit
initscripts-7.55.1-1

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-12-01 01:30:48 UTC
What specific errors do you get?


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