Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 180340 - sys-fs/lvm2 - lvm2-start.sh is too restrictive
Summary: sys-fs/lvm2 - lvm2-start.sh is too restrictive
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-30 12:52 UTC by Jimmy.Jazz
Modified: 2007-05-31 14:34 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
less restrictive checking (lvm-start.sh.diff,484 bytes, patch)
2007-05-31 13:01 UTC, Jimmy.Jazz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jimmy.Jazz 2007-05-30 12:52:58 UTC
Hello,

if one of your disks is faulty and not necessarily the one needed during the boot process, vgscan won't return 0 and you won't be able to boot at all.
That could appended when you use a disk managed with evms or if for some reason, your logical volumes become corrupted. By chance, vgchange will do the job well and you will at least be able to switch to the single user if needed.

The idea is to live the $? = 0 test from the if condition in /lib64/rcscripts/addons/lvm-start.sh:

+               /sbin/vgscan --mknodes --ignorelockingfailure >/dev/null
+               if [ -x /sbin/vgchange ] && \
+                  [ -f /etc/lvmtab -o -d /etc/lvm ]
+               then
+                       /sbin/vgchange --ignorelockingfailure -a y >/dev/null
                fi


Jj

Reproducible: Always
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-05-31 10:05:03 UTC
Sorry, the patch doesn't parse. :) It's a verbatim copy of current behaviour, so what exactly is the idea here? Attach a unified diff since it's not really apparent what are you fixing. Also post emerge --info.
Comment 2 Jimmy.Jazz 2007-05-31 13:00:29 UTC
(In reply to comment #1)
> Sorry, the patch doesn't parse. :) It's a verbatim copy of current behaviour,
> so what exactly is the idea here? Attach a unified diff since it's not really
> apparent what are you fixing. Also post emerge --info.
> 

Sorry, i was a bite on a hurry when i wrote that post. It is not so easy to maintain so much packages on my computers, during my spare time (even if i don't have time to use them all) and still have time to write something almost "intelligible" in a foreign language when something goes wrong :).

Anyway, the idea was to increase the ability gentoo boots the system even if something goes wrong.

I use on my computers evms, mdp and lvm disks. Some of the older evms disks are no more recognized by evms_activate. Also, udev-start.sh calls evms_activate and in my case will fail before the root filesystem is mounted. The system just stops and gives me a dull ash prompt (That is why i commented out evms_activate and vgscan from udev-start.sh, but that is out of the topic). Moreover, the evms drive doesn't contain the root filesystem.

When lvm-start.sh is called, some of the evms disks are however recognized by vgscan and vgchange but vgscan returns a status different from 0 and that will make lvm-start.sh end with a failure. That's why it would be great not to check the vgscan status and take only account of the vgchange one. 

Jj





Comment 3 Jimmy.Jazz 2007-05-31 13:01:29 UTC
Created attachment 120764 [details, diff]
less restrictive checking
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-05-31 13:21:21 UTC
(In reply to comment #3)
> Created an attachment (id=120764) [edit]
> less restrictive checking

Much more clear now... 

Comment 5 Doug Goldstein (RETIRED) gentoo-dev 2007-05-31 14:34:13 UTC
Thanks for the patch. Looks good. Committed.