diff options
author | Thomas Backlund <tmb@mandriva.org> | 2010-03-04 07:13:46 +0000 |
---|---|---|
committer | Thomas Backlund <tmb@mandriva.org> | 2010-03-04 07:13:46 +0000 |
commit | 768f4bb857c743a2f3cddf392c04351824461441 (patch) | |
tree | ebde6fe7cfaae4ff1a7e3907504b0f683304d2c1 /perl-install | |
parent | 8a68affd8c82a9fff3f82a5c9cf180a1e54cfeec (diff) | |
download | drakx-backup-do-not-use-768f4bb857c743a2f3cddf392c04351824461441.tar drakx-backup-do-not-use-768f4bb857c743a2f3cddf392c04351824461441.tar.gz drakx-backup-do-not-use-768f4bb857c743a2f3cddf392c04351824461441.tar.bz2 drakx-backup-do-not-use-768f4bb857c743a2f3cddf392c04351824461441.tar.xz drakx-backup-do-not-use-768f4bb857c743a2f3cddf392c04351824461441.zip |
add mdadm raid10 support
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/diskdrake/interactive.pm | 2 | ||||
-rw-r--r-- | perl-install/raid.pm | 5 |
3 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index 48c926ee8..a08f799a5 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,6 +1,7 @@ - include 'mpt2sas' SCSI driver (#57833) - devices: o handle creation of mmcblk devices (useful on Efika MX) +- add mdadm raid10 support Version 13.12 - 25 February 2010 diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index 7f0f49402..b103eae2d 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -1098,7 +1098,7 @@ sub modifyRAID { $in->ask_from(N("Options"), '', [ { label => N("device"), val => \$new_device, list => [ $md_part->{device}, raid::free_mds($raids) ], sort => 0 }, -{ label => N("level"), val => \$md_part->{level}, list => [ qw(0 1 4 5 6 linear) ] }, +{ label => N("level"), val => \$md_part->{level}, list => [ qw(0 1 4 5 6 10 linear) ] }, { label => N("chunk size in KiB"), val => \$md_part->{'chunk-size'} }, ], ) or return; diff --git a/perl-install/raid.pm b/perl-install/raid.pm index 11284a90a..82905449e 100644 --- a/perl-install/raid.pm +++ b/perl-install/raid.pm @@ -91,6 +91,7 @@ sub updateSize { elsif (/1/) { min @l } elsif (/4|5/) { min(@l) * (@l - 1) } elsif (/6/) { min(@l) * (@l - 2) } + elsif (/10/) { min(@l) * (@l / 2) } }; } @@ -105,6 +106,8 @@ sub module { if (member($level, 4, 5, 6)) { 'raid456'; + } elsif (member($level, 10)) { + 'raid10'; } elsif ($level =~ /^\d+$/) { "raid$level"; } else { @@ -157,7 +160,7 @@ sub format_part { sub verify { my ($raids) = @_; foreach (@$raids) { - my $nb = $_->{level} =~ /6/ ? 4 : $_->{level} =~ /4|5/ ? 3 : 2; + my $nb = $_->{level} =~ /6|10/ ? 4 : $_->{level} =~ /4|5/ ? 3 : 2; @{$_->{disks}} >= $nb or die N("Not enough partitions for RAID level %d\n", $_->{level}); } } |