Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14527 - checkfs does not properly start all software raid devices
Summary: checkfs does not properly start all software raid devices
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-25 02:10 UTC by Alan
Modified: 2003-08-07 10:40 UTC (History)
0 users

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


Attachments
patch for checkfs for starting software raid properly (checkfs.patch,591 bytes, patch)
2003-01-25 02:12 UTC, Alan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alan 2003-01-25 02:10:26 UTC
It appears that the /etc/init.d/checkfs script does not properly start all 
raid devices if you have a mix of autodetect and non-autodetect raid arrays 
due to a couple of small bugs in the shell script.

First it assumes that /etc/raidtab will contain "raiddev /dev/mdN".  My 
raidtab has "raiddev <tab> /dev/mdN".  

The second bug is that it seems to be trying to start the devices 
with "raidstart /dev/${x}" when ${x} has "/dev/mdN" in it, so it fails with 
a "/dev//dev/mdN is not defined" error.  Changing it to only run start on ${x} 
fixes this as well.

This may only be a problem for mixed systems (with some raid arrays that are 
non-autodetect) or with people with strange habits of putting tabs in their 
raidtab file, but the attached patch fixes things for me properly.
Comment 1 Alan 2003-01-25 02:12:19 UTC
Created attachment 7618 [details, diff]
patch for checkfs for starting software raid properly

Patch to deal with differently formatted raidtab files and getting sw raid
started on a system that has both autodetect and non-autodetect software raid
set up.
Comment 2 SpanKY gentoo-dev 2003-01-25 12:09:14 UTC
some of things have been fixed

please review our cvs copy of checkfs:
http://cvs.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-src/rc-scripts/init.d/checkfs?rev=1.20&content-type=text/vnd.viewcvs-markup

if anything is still 'broken', post a new comment/patch with you issues
Comment 3 Alan 2003-01-25 23:05:34 UTC
It seems that along with this another problem is that since my root partition is raid0, it won't shut down properly.  On halt I get a message 'can't stop md0, device or resource busy'.  Normally this wouldn't be a problem, but because the software raid never shuts down properly my other raid5 partition is never marked as clean, and the parity is rebuilt every reboot.

Any thoughts?
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-28 15:05:47 UTC
Try checkfs and halt.sh from baselayout-1.8.6.2, and see if it fixes.
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2003-08-07 10:40:15 UTC
Should work in latest.