Index: /trunk/Nebulous/lib/Nebulous/Client.pm
===================================================================
--- /trunk/Nebulous/lib/Nebulous/Client.pm	(revision 24926)
+++ /trunk/Nebulous/lib/Nebulous/Client.pm	(revision 24927)
@@ -339,4 +339,57 @@
 
     return $uri;
+}
+
+
+sub there_can_be_only_one
+{
+    my $self = shift;
+
+    my ($key, $vol_name) = validate_pos(@_,
+        {
+            type => SCALAR,
+        },
+        {
+            # volume
+            type        => SCALAR,
+            optional    => 1,
+        },
+    );
+
+    $log->debug( "entered - @_" );
+
+    my $locations;
+    eval {
+        # first - strip off any inaccesible instances
+        $self->prune($key);
+
+        # check to see if there is an instance on $vol_name that should be the
+        # sole survivor
+        if (defined $vol_name) {
+            $locations = $self->find_instances($key, $vol_name);
+        }
+
+        if (defined $locations) {
+            my $instances = $self->find_instances($key);
+            foreach my $victim (@$instances) {
+                next if $victim eq $locations->[0];
+                $self->delete_instance($key, $victim);
+            }
+        } else {
+            # nuke whatever
+            my @stats = $self->stat($key);
+            foreach (1 .. $stats[6]) {
+                $self->cull($key);
+            }
+        }
+
+    };
+    if ($@) {
+        $log->logdie($@);
+    }
+
+    $log->debug("leaving");
+
+    return $locations->[0];
 }
 
