[PATCH] Software raid support for setup_harddisks
Sam Vilain
sam at vilain.net
Mon Sep 4 01:00:35 CEST 2006
Cyril Bouthors wrote:
> I've made a patch to enhance setup_harddisks in order for it to
> support the creation of Software RAID partitions.
>
> The file setup_harddisks_raid_support.patch is the patch against the
> latest SVN version. It is attached to this email.
[...]
> ------------------------------------------------------------------------
>
> *** /tmp/ediff8155Kyz 2006-08-28 18:13:06.563790650 +0300
> --- /home/cyb/cvs/myfai/lib/setup_harddisks 2006-08-28 18:08:57.377619578 +0300
> ***************
> *** 140,145 ****
> --- 140,146 ----
> # reiser : reiserfs
> # -h <hash> : set reiserfs hash
> # -v <ver> : set reiserfs version
> + # raid : raid
> #
> use strict;
> # getopts variables:
> ***************
> *** 501,507 ****
> && die "ERROR: unable to preserve partitions of size 0.\n$line\n ";
> } else {
> # If not preserve we must know the filesystemtype
> ! ($options !~ /\b(ext2|ext3|auto|swap|dosfat16|winfat32|reiser|xfs)\b/i ) && ($options .= " auto");
> }
> if($size =~ /^(\d*)(\-?)(\d*)$/){
> $Min = $1;
> --- 502,508 ----
> && die "ERROR: unable to preserve partitions of size 0.\n$line\n ";
> } else {
> # If not preserve we must know the filesystemtype
> ! ($options !~ /\b(ext2|ext3|auto|swap|dosfat16|winfat32|reiser|xfs|raid)\b/i ) && ($options .= " auto");
> }
> if($size =~ /^(\d*)(\-?)(\d*)$/){
> $Min = $1;
> ***************
> *** 532,537 ****
> --- 533,539 ----
> ($options =~ /\bswap\b/i) && ($MPID{$mountpoint} = 82); # Linux swap
> ($options =~ /\bdosfat16\b/i) && ($MPID{$mountpoint} = 6); # DOS FAT 16bit (>=32MB, will be changed later)
> ($options =~ /\bwinfat32\b/i) && ($MPID{$mountpoint} = "b"); # Win 95 FAT 32
> + ($options =~ /\braid\b/i) && ($MPID{$mountpoint} = "fd"); # Linux raid auto
> $MPOptions{$mountpoint} = $options;
> if($test == 1){
> print "$mountpoint,$MPMinSize{$mountpoint}-$MPMaxSize{$mountpoint},";
Where are the RAID devices actually set up?
Note: there is a version I wrote in the people/mugwump/lvmraid branch.
Check Subversion for more.
Sam.
More information about the linux-fai
mailing list