diff --git a/mxraid/mxraid_assemble b/mxraid/mxraid_assemble index 89616dc..aa40f94 100755 --- a/mxraid/mxraid_assemble +++ b/mxraid/mxraid_assemble @@ -169,7 +169,7 @@ if ($opts{n}) { my ($entry, $cnt, $size) = ('', 0, 0); my ($level, $num_wanted, $match) = (6, 16, undef); - my $chunk_size = 512; + my $chunk_size = 2048; # this is experimental my $dev_no = 0; my @mounts = split m/\n/, `cat /proc/self/mounts`; my @candidates; @@ -200,7 +200,7 @@ if ($opts{n}) { print "# NOTE: $msg\n"; } - if ($opts{n} !~ m/^[CDM][\da-f]\d{3}$/) { + if ($opts{n} !~ m/^[CDM][\da-z]\d{3}$/) { my $msg = "label '$opts{n}' doesn't follow the CDM scheme."; $msg = $color->t_red($msg) unless $opts{m}; print "# NOTE: $msg\n"; @@ -221,7 +221,7 @@ if ($opts{n}) { $size /= 1024**4; # TB - # 100TB -> 512k, 50TB -> 256k + # 300TB -> 2048k (?), 200TB -> 1024k, 100TB -> 512k, 50TB -> 256k while ( $size/$chunk_size < 0.115 and $chunk_size > 64) { $chunk_size/=2; } @@ -450,7 +450,7 @@ exit; @rec = split m/\s+/, $_; - if ($rec[0] !~ m/[CDM][\da-f]\d{3}:/) { + if ($rec[0] !~ m/[CDM][\da-z]\d{3}:/) { warn "# NOTE: raid name not in expected format (bad key '$rec[0]' at line $lines).\n" if $self->{verbose} >= 1; next; } @@ -518,7 +518,7 @@ exit; my $self = shift; my %tmp; for (keys %{$self->{db}}) { - my ($cat,$size,$num) = $_ =~ m/([CDM])([\da-f])(\d{3})/; + my ($cat,$size,$num) = $_ =~ m/([CDM])([\da-z])(\d{3})/; next unless defined $num; $cat = '(C/M)' if $cat ne 'D'; if (exists $tmp{"$cat$size"} and $tmp{"$cat$size"} > $num) { @@ -546,6 +546,7 @@ exit; ST8000NM001A => sub {substr $_[0], 0, 8}, ST1000NM0045 => sub {substr $_[0], 0, 8}, ST14000NM002G => sub {substr $_[0], 0, 8}, + ST16000NM004J => sub {substr $_[0], 0, 8}, ); }