FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Development

 
 
LinkBack Thread Tools
 
Old 02-18-2009, 08:40 PM
Tobias Powalowski
 
Default Changing raid/raid-partitions initcpio hooks

Hi guys,
while experimenting with different raid setups in kvm, i found out our raid
support is not really ideal.

The status now:
- raid hook(inlcuded in mkinitcpio package) does assemble normal raid:
but if a drive fails it will fail to boot after it.
i'm not 100% sure if it can handle all types of raid levels, partitionable
mdp raid doesn't work at all with this hook for sure.
- raid-partitions(included in mdadm package) can only assemble 1 raid
partition array, which is imho bad you should be able to assemble more than
one raid partition device from commandline, if you wish to do so.
- UUID is not supported in any of both.

Suggestion:
Shouldn't we replace all this with 1 hook which can handle all these cases?
Now comes the point, to achive this, mdadm will be needed in initramfs which
means having a 900k static binary in early boot sequence.
(raid-partitions hook already uses this binary)
The trick i thought of, would be to generate dynamically a mdadm.conf file
from boot commandline, which will use the old syntax of assembling + adding a
new syntax for UUID support.
Sample code is uploaded here:
http://www.archlinux.org/~tpowa/mdadm.hook
(not yet tested to boot a system, it's sample code!)

Problems:
Should this replace an existing hook or a be brand new hook?
What should happen to the other hooks, in order to not break a user setup.
Doing it with a NEWS Item and a installation message should be fine imho.

What do you guys think of this?
Thanks for your input.

greetings
tpowa
--
Tobias Powalowski
Archlinux Developer & Package Maintainer (tpowa)
http://www.archlinux.org
tpowa@archlinux.org
 
Old 02-18-2009, 08:46 PM
Aaron Griffin
 
Default Changing raid/raid-partitions initcpio hooks

On Wed, Feb 18, 2009 at 3:40 PM, Tobias Powalowski <t.powa@gmx.de> wrote:
> Hi guys,
> while experimenting with different raid setups in kvm, i found out our raid
> support is not really ideal.
>
> The status now:
> - raid hook(inlcuded in mkinitcpio package) does assemble normal raid:
> but if a drive fails it will fail to boot after it.
> i'm not 100% sure if it can handle all types of raid levels, partitionable
> mdp raid doesn't work at all with this hook for sure.
> - raid-partitions(included in mdadm package) can only assemble 1 raid
> partition array, which is imho bad you should be able to assemble more than
> one raid partition device from commandline, if you wish to do so.
> - UUID is not supported in any of both.
>
> Suggestion:
> Shouldn't we replace all this with 1 hook which can handle all these cases?
> Now comes the point, to achive this, mdadm will be needed in initramfs which
> means having a 900k static binary in early boot sequence.
> (raid-partitions hook already uses this binary)
> The trick i thought of, would be to generate dynamically a mdadm.conf file
> from boot commandline, which will use the old syntax of assembling + adding a
> new syntax for UUID support.
> Sample code is uploaded here:
> http://www.archlinux.org/~tpowa/mdadm.hook
> (not yet tested to boot a system, it's sample code!)
>
> Problems:
> Should this replace an existing hook or a be brand new hook?
> What should happen to the other hooks, in order to not break a user setup.
> Doing it with a NEWS Item and a installation message should be fine imho.
>
> What do you guys think of this?
> Thanks for your input.

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.

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

Other than that, the idea seems sound. I do not have a raid system to
play with, though
 
Old 02-18-2009, 08:55 PM
Tobias Powalowski
 
Default Changing raid/raid-partitions initcpio hooks

> 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.

> Other than that, the idea seems sound. I do not have a raid system to
> play with, though


--
Tobias Powalowski
Archlinux Developer & Package Maintainer (tpowa)
http://www.archlinux.org
tpowa@archlinux.org
 
Old 02-18-2009, 09:34 PM
Aaron Griffin
 
Default Changing raid/raid-partitions initcpio hooks

On Wed, Feb 18, 2009 at 3:55 PM, Tobias Powalowski <t.powa@gmx.de> 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
 

Thread Tools




All times are GMT. The time now is 05:39 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org