From 7136abc7e1e02415c70db316cf2f97c525c449c9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 8 Jul 2013 20:16:48 +0000 Subject: [PATCH] mogadm: include drain devices by default in summary drain devices are still usable to clients, so it probably makes sense to include this in the default output of "mogadm device summary" (especially given the drain change in 2.40) Not including drain devices by default confused me at first, so perhaps it may be confusing to others. --- mogadm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mogadm b/mogadm index 8e24840..0bb7764 100755 --- a/mogadm +++ b/mogadm @@ -91,7 +91,7 @@ my $usage = { des => "List the summary of devices, for each host.", args => "[opts]", opts => { - "--status=s" => "Devices of status A. Defaults to 'alive,readonly'", + "--status=s" => "Devices of status A. Defaults to 'alive,readonly,drain'", "--hostname=s" => "Limit results to a given host.", }, }, @@ -845,7 +845,7 @@ sub cmd_device_summary { my $args = shift; my $hostname = $args->{hostname}; my %show_state; - $show_state{$_} = 1 foreach split(/,/, ($args->{status} || "alive,readonly")); + $show_state{$_} = 1 foreach split(/,/, ($args->{status} || "alive,readonly,drain")); my $hosts = hosts(); fail_text('no_hosts') unless $hosts;