Skip to content

Commit

Permalink
mogadm: support for enabling/disabling/viewing checksums
Browse files Browse the repository at this point in the history
hashtype is shown as string, e.g. "MD5" or "NONE" (the default).
  • Loading branch information
Eric Wong committed Feb 28, 2012
1 parent 798c6d5 commit c3dda15
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions mogadm
Original file line number Diff line number Diff line change
@@ -159,6 +159,7 @@ my $usage = {
"<class>" => "Name of class to add.",
"--mindevcount=i" => "Minimum number of replicas.",
"--replpolicy=s" => "Replication policy string.",
"--hashtype=s" => "Hash algorithm string ('MD5', 'NONE').",
},
},
modify => {
@@ -169,6 +170,7 @@ my $usage = {
"<class>" => "Name of class to add.",
"--mindevcount=i" => "Minimum number of replicas.",
"--replpolicy=s" => "Replication policy string.",
"--hashtype=s" => "Hash algorithm string ('MD5', 'NONE').",
},
},
delete => {
@@ -631,13 +633,14 @@ sub cmd_domain_list {
my $domains = domains() or
fail_text('no_domains');
# now iterate
printf " %-20s %-20s %-12s %-12s\n", "domain", "class", "mindevcount", "replpolicy";
printf "%-20s %-20s %-12s %-12s\n", '-' x 20, '-' x 20, '-' x 13, '-' x 12;
printf " %-20s %-20s %-12s %-12s %-7s\n", "domain", "class", "mindevcount", "replpolicy", "hashtype";
printf "%-20s %-20s %-12s %-12s %-7s\n", '-' x 20, '-' x 20, '-' x 13, '-' x 12, '-' x 7;
foreach my $domain (sort keys %$domains) {
foreach my $class (sort keys %{$domains->{$domain}}) {
my $dom = $domains->{$domain}->{$class};
printf " %-20s %-20s %-8d %-13s\n", $domain, $class,
$dom->{mindevcount} || 0, $dom->{replpolicy} || '';
printf " %-20s %-20s %-8d %-13s %-7s\n", $domain, $class,
$dom->{mindevcount} || 0, $dom->{replpolicy} || '',
$dom->{hashtype} || '';
}
print "\n";
}
@@ -1585,6 +1588,11 @@ set to anything >= 1.
Stringified replication policy. ie "MultipleHosts(3)" is equivalent to a
--mindevcount=3. See documentation or plugins on alternative policies.
=item B<--hashtype=E<lt>valueE<gt>>
Name of the hash algorithm used for checksumming. "MD5" or "NONE" for no
checksumming.
=back
=head1 FSCK OPTIONS

0 comments on commit c3dda15

Please sign in to comment.