Index: trunk/Nebulous-Server/lib/Nebulous/Server.pm
===================================================================
--- trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 17074)
+++ trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 17077)
@@ -1,5 +1,5 @@
-# Copyright (c) 2004  Joshua Hoblitt
+# Copyright (c) 2004-2008  Joshua Hoblitt
 #
-# $Id: Server.pm,v 1.56 2008-03-20 23:29:56 jhoblitt Exp $
+# $Id: Server.pm,v 1.57 2008-03-21 01:24:36 jhoblitt Exp $
 
 package Nebulous::Server;
@@ -1105,4 +1105,40 @@
 
 
+sub mounts
+{
+    my $self = shift;
+
+    validate_pos(@_); 
+
+    my $log = $self->log;
+    my $sql = $self->sql;
+    my $db  =$self->db;
+
+    $log->debug("entered - @_");
+
+    my $stats;
+    my $query;
+    eval {
+        # ask the db to generate the table of mounted Nebulous volume 
+        $db->do("call getmountedvol()");
+
+        $query = $db->prepare_cached( $sql->get_mounted_volumes );
+        $query->execute();
+
+        # suck that table into an AoA
+        $stats = $query->fetchall_arrayref;
+
+        $query->finish;
+    };
+    $log->logdie("database error: $@") if $@;
+
+    $log->logdie("no mounted volumes found") unless (scalar @$stats);
+
+    $log->debug("leaving");
+
+    return $stats;
+}
+
+
 sub _get_storage_volume
 {
