Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 12460 - LVM should probably be stopped before RAID devices instead of after
Summary: LVM should probably be stopped before RAID devices instead of after
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-19 18:40 UTC by Matthew Kennedy (RETIRED)
Modified: 2003-11-29 13:22 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Kennedy (RETIRED) gentoo-dev 2002-12-19 18:40:42 UTC
Az,

Currently, /dev/md/? devices are stopped before LVM. This causes a complaint
when you shut the machine down (can't stop /dev/md/0, device busy -- 'cause LVM
is still using it). So LVM should probably be stopped before RAID devices.
Comment 1 Matthew Kennedy (RETIRED) gentoo-dev 2002-12-19 18:41:27 UTC
Kai Lindenberg <kai@ldbg.de> writes:

> Hi Gentooguys,
> 
> I'm very happy with my Gentoo 1.4rc1, but can you tell me, why we do 
> first load lvm and then start md, repectively first shut down md 
> and then lvm in /etc/init.d/{checkfs,halt.sh}?
> One of my VGs is on md, so I have to exchange the lvm start/stop 
> with those of md and, that's the business, I have have to control 
> the update of those files.
> I wonder if there is any reason for this way.
> 
> Thanks Kai
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-20 11:51:31 UTC
Ok, so I guess nobody will ever have raid devices on LVM ?
Comment 3 Matthew Kennedy (RETIRED) gentoo-dev 2002-12-26 03:09:24 UTC
hmmmmm good question
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2003-02-02 05:20:27 UTC
Maybe use raid autostart ?
Comment 5 Kai Lindenberg 2003-02-02 08:02:52 UTC
raid autostart: yes this works, but the shutdown is a problem. 
Comment 6 Eric Johanson 2003-02-09 17:15:16 UTC
how do other distros handle this?  

I'm guessing they do:

check for any LVM volumes are part of raidsets (via some nasty awk command)
shutdown raidsets that are found
shutdown LVM
shutdown any other md's. 

Would that work? 

-eric
(who is currently having problems with this same bug, but who only has LVM in raid, and no raid in LVM...)
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2003-02-16 18:37:07 UTC
MDK for one only stop LVM .. they leave RAID for the kernel I guess ...
Comment 8 David Rosner 2003-03-13 18:41:26 UTC
Recap:  LVM and RAID are started AND stopped in the wrong order.  

There is also a BUG in the AWK command that searches for mounted filesystems.  If you have a VG named 'rootvg' the current awk command in 'halt.sh' --

 awk '!/(^#|proc|devfs|tmpfs|^none|^\/dev\/root|[[:space:]]\/[[:space:]])/ {print $2}' /proc/mounts |sort -r

-- causes all LV's in rootvg to stay mounted at shutdown.  Take out the '^\/dev/root|' and it works properly.  Is there any logical reason to omit any FS that starts with 'root'?
Comment 9 David Rosner 2003-03-13 18:54:44 UTC
BTW, why not just switch the order around?  I did it in checkfs and halt.sh and it works fine...  I don't see why this problem needs to hang around for another four months even IF my suggestion turns out to be a bandaid :)
Comment 10 Martin Schlemmer (RETIRED) gentoo-dev 2003-03-13 23:52:36 UTC
Because the halt.sh and checkfs in baselayout 1.8.6.3 looks totally different ?
Comment 11 David Rosner 2003-03-14 18:49:18 UTC
No chance for a 1.8.5.9 that will fix the problem until 1.8.6.3 is ready to go?  

How would it cause problems with later versions if you fixed two bugs that are in a version that is completely different?  Yes, I have no clue how the dev process works. I'm just trying to understand the reasoning behind your answer.
Comment 12 Andrew Cooks (RETIRED) gentoo-dev 2003-11-29 13:22:06 UTC
This bug's been inactive for at least 180 days. baselayout-1.8.6.10-r1 is currently stable. Is this bug still relevant?

Please reopen if the problem persists.