Index: trunk/Nebulous-Server/Changes
===================================================================
--- trunk/Nebulous-Server/Changes	(revision 24544)
+++ trunk/Nebulous-Server/Changes	(revision 24545)
@@ -28,4 +28,5 @@
     - completely rework how mountedvol is populated, drop mount table
     - infinitely try to get a db handle if the connection fails
+    - add --mountpoint param to neb-voladd
       
 0.16
Index: trunk/Nebulous-Server/bin/neb-voladd
===================================================================
--- trunk/Nebulous-Server/bin/neb-voladd	(revision 24544)
+++ trunk/Nebulous-Server/bin/neb-voladd	(revision 24545)
@@ -19,5 +19,5 @@
 use Pod::Usage qw( pod2usage );
 
-my ($db, $dbhost, $dbuser, $dbpass, $vname, $vhost, $uri);
+my ($db, $dbhost, $dbuser, $dbpass, $mountpoint, $vname, $vhost, $uri);
 
 $db     = $ENV{'NEB_DB'} unless $db;
@@ -29,14 +29,15 @@
     'db|d=s'            => \$db,
     'host=s'            => \$dbhost,
+    'mountpoint|m=s'    => \$mountpoint,
+    'pass|p=s'          => \$dbpass,
+    'uri|u=s'           => \$uri,
     'user|u=s'          => \$dbuser,
-    'pass|p=s'          => \$dbpass,
+    'vhost=s'           => \$vhost,
     'vname|n=s'         => \$vname,
-    'vhost=s'           => \$vhost,
-    'uri|u=s'           => \$uri,
 ) || pod2usage( 2 );
 
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
-pod2usage( -msg => "Required options: --db --user --pass --vname --vhost --uri", -exitval => 2 )
-    unless $db && $dbuser && $dbpass && $vname && $vhost && $uri;
+pod2usage( -msg => "Required options: --db --user --pass --mountpoint --vname --vhost --uri", -exitval => 2 )
+    unless $db && $dbuser && $dbpass && $mountpoint && $vname && $vhost && $uri;
 
 my $dbh = DBI->connect(
@@ -59,4 +60,7 @@
     die "path: $path dirived from URI: $uri does not exist";
 }
+unless (-d $mountpoint) {
+    die "path: $mountpoint does not exist";
+}
 
 print " OK\n";
@@ -65,5 +69,5 @@
 
 my $query = $dbh->prepare( $sql->new_volume );
-$query->execute( $vname, $vhost, $path );
+$query->execute( $vname, $vhost, $path, $mountpoint);
 
 print " OK\n";
@@ -128,4 +132,7 @@
 Optional.  Defaults to C<localhost>.
 
+=item * --mountpoint <path>
+
+Path to the mountpoint of the filesystem on which C<--uri> resides.
 
 =back
Index: trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm
===================================================================
--- trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm	(revision 24544)
+++ trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm	(revision 24545)
@@ -286,6 +286,6 @@
     },
     new_volume          => qq{
-        INSERT INTO volume (name, host, path, allocate, available, xattr)
-        VALUES (?, ?, ?, TRUE, TRUE, FALSE)
+        INSERT INTO volume (name, host, path, allocate, available, xattr, mountpoint)
+        VALUES (?, ?, ?, TRUE, TRUE, FALSE, ?)
     },
     get_volume_by_name => qq{
Index: trunk/Nebulous-Server/t/03_server_setup.t
===================================================================
--- trunk/Nebulous-Server/t/03_server_setup.t	(revision 24544)
+++ trunk/Nebulous-Server/t/03_server_setup.t	(revision 24545)
@@ -30,4 +30,5 @@
 
 Test::Nebulous->setup;
+die;
 
 {
