On Wed, Feb 18, 2009 at 3:55 PM, Tobias Powalowski <[email protected]> wrote: >> Haven't thought too hard on this, but a couple of points: >> >> klibc should have basic raid assembly functionality built it. I was >> under the impression it worked for basic cases. If this is still true >> then we shouldn't replace it, but make sure people are aware the klibc >> one is real basic and the mdadm one is more indepth. > One real problem with basic raid hook i experienced is, if one device fails > and you reboot, it will break during mouting root fs. mdassemble from kinit > doesn't like missing devices, you need to remove them from boot command line. > mdadm is really more tolerable on this. > >> The sample code with all those nested calls is real ugly and hard to >> read - readability is always preferred if other people are going to be >> looking at / fixing / working with the code. It'd be nice to break >> that into more lines so that it's easier to understand > Okay i try to make it more clean, problem here is the restricted environment, > You need to crack down every md=0,/dev/xyz,/dev/abc > to ARRAY /dev/md0 devices=/dev/xyz,/dev/abc > I think replace is the only program we have there to do it.
Yeah, I just meant something like devices=$(replace ......) foo=$(replace) bar=$(replace) echo "ARRAY $foo $bar $devices" or whatever would be far easier to read

