Index: /branches/eam_branches/20091201/Nebulous/bin/neb-df
===================================================================
--- /branches/eam_branches/20091201/Nebulous/bin/neb-df	(revision 26873)
+++ /branches/eam_branches/20091201/Nebulous/bin/neb-df	(revision 26874)
@@ -44,10 +44,11 @@
 my $total_total = 0;
 my $total_used  = 0;
+my $allocated_total = 0;
+my $allocated_used = 0;
 foreach my $row (@$stats) {
     my %vol;
-    @vol{qw(mountpoint total used vol_id name path allocate available xattr)}
+    @vol{qw(mountpoint total used vol_id name host path allocate available xattr)}
         = @$row;
-
-    my $path        = $vol{path};
+    my $path        = $vol{host};
     my $total       = $vol{total};
     $total_total    += $total;
@@ -58,4 +59,8 @@
     my $mountpoint  = $vol{mountpoint};
 
+    if ($vol{allocate} == 1) {
+	$allocated_total += $total;
+	$allocated_used += $used;
+    }
     # indicated the part of the nebulous volume name that matches up with a
     # local volume (mountpoint) 
@@ -101,4 +106,21 @@
     );
 
+my $allocated_available   = $allocated_total - $allocated_used;
+my $allocated_usedper     = ($allocated_used / $allocated_total) * 100; 
+
+# summary
+printf ("%s\n%20s", "/summmary_of_allocated_volumes", "");
+printf(" %*s %*s %*s %*.0f%% %s\n",
+        9,
+        $allocated_total,
+        9,
+        $allocated_used,
+        9,
+        $allocated_available,
+        3,
+        $allocated_usedper,
+        "/allocated",
+    );
+
 __END__
 
Index: /branches/eam_branches/20091201/Nebulous/bin/neb-rm
===================================================================
--- /branches/eam_branches/20091201/Nebulous/bin/neb-rm	(revision 26873)
+++ /branches/eam_branches/20091201/Nebulous/bin/neb-rm	(revision 26874)
@@ -19,4 +19,5 @@
     $force,
     $move,
+    $invalid,
     $server,
 );
@@ -27,4 +28,5 @@
     'force|f'       => \$force,
     'move|m'        => \$move,
+    'invalid|i'     => \$invalid,
     'server|s=s'    => \$server,
 ) || pod2usage( 2 );
@@ -42,5 +44,5 @@
 foreach my $key (@ARGV) {
     unless (defined $move) {
-        $neb->delete($key, $force) or warn "failed to delete key: $key";
+        $neb->delete($key, $force,$invalid) or warn "failed to delete key: $key";
     } else {
         $neb->move($key, "${key}.rm") or warn "failed to move key: $key";
@@ -80,4 +82,10 @@
 When set, this flag causes C<<key>> to be renamed to C<<key>.rm> instead of
 being deleted.
+
+Optional.
+
+=item * --invalid|-i
+
+When set, unavailable instances of C<<key>> will be removed from the nebulous database.
 
 Optional.
Index: /branches/eam_branches/20091201/Nebulous/lib/Nebulous/Client.pm
===================================================================
--- /branches/eam_branches/20091201/Nebulous/lib/Nebulous/Client.pm	(revision 26873)
+++ /branches/eam_branches/20091201/Nebulous/lib/Nebulous/Client.pm	(revision 26874)
@@ -755,4 +755,9 @@
             optional    => 1,
         },
+        {
+	    #find_invalid
+	    type        => SCALAR|UNDEF,
+            optional    => 1,
+	},
     );
 
@@ -951,5 +956,5 @@
     my $self = shift;
 
-    my ($key, $force) = validate_pos( @_,
+    my ($key, $force, $invalid) = validate_pos( @_,
         {
             type        => SCALAR,
@@ -965,9 +970,26 @@
             },
         },
-    );
-
-    $log->debug( "entered - @_" );
-
-    my $locations = $self->find_instances( $key, 'any' );
+        {
+            type        => BOOLEAN,
+            optional    => 1,
+            default     => undef,
+            callbacks   => {
+                'is boolean' => sub {
+                    $_[0] == 0 or $_[0] == 1 or $_[0] == undef;
+                },
+            },
+        },
+    );
+
+    $log->debug( "entered - @_" );
+
+
+    my $locations;
+    if ($invalid) {
+	$locations = $self->find_instances( $key, 'any', 'find them all');
+    }
+    else {
+	$locations = $self->find_instances( $key, 'any' );
+    }
 
     return undef unless $locations;
