[pve-devel] [PATCH] changed naming of zfs setup decriptions
flatterlight
pve-dev at wrind.de
Sat Oct 31 13:34:58 CET 2015
From: flatterlight <github at wrind.de>
Signed-off-by: flatterlight <github at wrind.de>
---
proxinstall | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/proxinstall b/proxinstall
index 2bd9bf5..d06932b 100755
--- a/proxinstall
+++ b/proxinstall
@@ -917,7 +917,7 @@ sub extract_data {
if ($use_zfs) {
die "unsupported zfs mode (for testing environment)\n"
- if $filesys ne 'zfs (RAID0)';
+ if $filesys ne 'zfs stripe (RAID0)';
syscmd ("zpool destroy $zfspoolname") if $opt_testmode;
@@ -2064,9 +2064,9 @@ sub create_hdoption_view {
my $fstypecb = Gtk3::ComboBoxText->new();
- my $fstype = ['ext3', 'ext4', 'xfs', 'zfs (RAID0)', 'zfs (RAID1)',
- 'zfs (RAID10)', 'zfs (RAIDZ-1)',
- 'zfs (RAIDZ-2)', 'zfs (RAIDZ-3)'];
+ my $fstype = ['ext3', 'ext4', 'xfs', 'zfs stripe (RAID0)', 'zfs mirror (RAID1)',
+ 'zfs (RAID10)', 'zfs RAIDZ1 (RAID5)',
+ 'zfs RAIDZ2 (RAID6)', 'zfs RAIDZ3'];
my $tcount = 0;
foreach my $tmp (@$fstype) {
@@ -2297,13 +2297,13 @@ sub get_zfs_raid_setup {
die "$filesys need at least one device\n" if $diskcount < 1;
my $cmd= '';
- if ($filesys eq 'zfs (RAID0)') {
+ if ($filesys eq 'zfs stripe (RAID0)') {
push @$bootdevlist, @$devlist[0];
foreach my $hd (@$devlist) {
$cmd .= " @$hd[1]";
}
- } elsif ($filesys eq 'zfs (RAID1)') {
- die "zfs (RAID1) need at least 2 device\n" if $diskcount < 2;
+ } elsif ($filesys eq 'zfs mirror (RAID1)') {
+ die "a zfs mirror (RAID1) needs at least 2 device\n" if $diskcount < 2;
$cmd .= ' mirror ';
my $hd = @$devlist[0];
my $expected_size = @$hd[2]; # all disks needs same size
@@ -2314,8 +2314,8 @@ sub get_zfs_raid_setup {
}
} elsif ($filesys eq 'zfs (RAID10)') {
my $half = int($diskcount/2);
- die "zfs (RAID10) need at least 4 device\n" if $diskcount < 4;
- die "zfs (RAID10) need at an even numver of devices\n" if $half*2 != $diskcount;
+ die "a zfs (RAID10) needs at least 4 device\n" if $diskcount < 4;
+ die "a zfs (RAID10) needs at an even numver of devices\n" if $half*2 != $diskcount;
push @$bootdevlist, @$devlist[0], @$devlist[1];
@@ -2326,10 +2326,10 @@ sub get_zfs_raid_setup {
$cmd .= ' mirror ' . @$hd1[1] . ' ' . @$hd2[1];
}
- } elsif ($filesys =~ m/^zfs \(RAIDZ-([123])\)$/) {
+ } elsif ($filesys =~ m/^zfs RAIDZ[123]$/) {
my $level = $1;
my $mindisks = 2 + $level;
- die "zfs (RAIDZ-$level) need at least $mindisks devices\n" if scalar(@$devlist) < $mindisks;
+ die "a zfs (RAIDZ$level) needs at least $mindisks devices\n" if scalar(@$devlist) < $mindisks;
my $hd = @$devlist[0];
my $expected_size = @$hd[2]; # all disks needs same size
$cmd .= " raidz$level";
--
2.4.9 (Apple Git-60)
More information about the pve-devel
mailing list