Index: trunk/Nebulous-Server/bin/neb-host
===================================================================
--- trunk/Nebulous-Server/bin/neb-host	(revision 28491)
+++ trunk/Nebulous-Server/bin/neb-host	(revision 28492)
@@ -16,5 +16,5 @@
 use Pod::Usage qw( pod2usage );
 
-my ($host, $state,
+my ($host, $state, $note,
     $db, $dbhost, $dbpass, $dbuser,
     $allocate, $available, $debug);
@@ -51,9 +51,10 @@
     'host=s'         => \$host,
     'state=s'        => \$state,
-    
+    'note=s'         => \$note,
     'db=s'           => \$db,
     'dbhost=s'       => \$dbhost,
     'dbuser=s'       => \$dbuser,
     'dbpass=s'       => \$dbpass,
+
     
     ) || pod2usage( 2 );
@@ -101,5 +102,6 @@
     $set{'v.allocate'} = $allocate if defined $allocate;
     $set{'v.available'} = $available if defined $available;
-    
+    $set{'v.note'} = $note if defined $note;
+
     eval {
 	my ($q, @bind) = sql_interp("UPDATE volume AS v SET", \%set, "WHERE", \%constraint);
@@ -134,9 +136,13 @@
 $dbh->commit;
 
-my $format  = "%-15s %-15s %-10s %-10s %-10s %-10s\n";
-my @columns = qw(host name mounted allocate available xattr);
+my $format  = "%-15s %-15s %-7s %-8s %-9s %-5s %s\n";
+my @columns = qw(host name mounted allocate available xattr note);
 printf($format, @columns);
 
 while (my $row = $query->fetchrow_hashref) {
+    unless ((exists($$row{ 'note' })) && (defined($$row{ 'note' }))) {
+	$$row{ 'note' } = '-';
+    }
+
     printf($format, @$row{@columns});
 }
Index: trunk/Nebulous-Server/bin/neb-voladd
===================================================================
--- trunk/Nebulous-Server/bin/neb-voladd	(revision 28491)
+++ trunk/Nebulous-Server/bin/neb-voladd	(revision 28492)
@@ -19,5 +19,5 @@
 use Pod::Usage qw( pod2usage );
 
-my ($db, $dbhost, $dbuser, $dbpass, $mountpoint, $vname, $vhost, $uri);
+my ($db, $dbhost, $dbuser, $dbpass, $mountpoint, $vname, $vhost, $uri, $note);
 
 $db     = $ENV{'NEB_DB'} unless $db;
@@ -35,4 +35,5 @@
     'vhost=s'           => \$vhost,
     'vname|n=s'         => \$vname,
+    'note=s'            => \$note,
 ) || pod2usage( 2 );
 
@@ -69,5 +70,5 @@
 
 my $query = $dbh->prepare( $sql->new_volume );
-$query->execute( $vname, $vhost, $path, $mountpoint);
+$query->execute( $vname, $vhost, $path, $mountpoint, $note);
 
 print " OK\n";
@@ -131,4 +132,8 @@
 
 Optional.  Defaults to C<localhost>.
+
+=item * --note <note>
+
+Add a note for this volume.
 
 =item * --mountpoint <path>
Index: trunk/Nebulous-Server/bin/neb-voladm
===================================================================
--- trunk/Nebulous-Server/bin/neb-voladm	(revision 28491)
+++ trunk/Nebulous-Server/bin/neb-voladm	(revision 28492)
@@ -33,4 +33,5 @@
     $xattr,
     $cab_id,
+    $note,
 );
 
@@ -53,4 +54,5 @@
     'cab_id|c=i'        => \$cab_id,
     'xattr=i'           => \$xattr,
+    'note=s'            => \$note,
 ) || pod2usage( 2 );
 
@@ -89,4 +91,5 @@
 $set{'v.xattr'} = $xattr if defined $xattr;
 $set{'v.cab_id'} = $cab_id if defined $cab_id;
+$set{'v.note'} = $note if defined $note;
 
 if (%set) {
@@ -150,5 +153,5 @@
     neb-voladm [--vname <volume name>] [--vhost <volume host>]
     [--allocate <0|1>] [--available <0|1>] [--xattr <0|1>]
-    [--cab_id <cab_id>]
+    [--cab_id <cab_id>] [--note <note>]
     [--host <database host> ] [--db <database name>]
     [--user <database username>] [--pass <database password>]
@@ -189,4 +192,10 @@
 
 Sets the cabinet id for this storage volume.
+
+Requires either the C<--vname> or c<--vhost> options.
+
+=item * --note <note>
+
+Set a note for this volume.
 
 Requires either the C<--vname> or c<--vhost> options.
Index: trunk/Nebulous-Server/bin/nebdiskd
===================================================================
--- trunk/Nebulous-Server/bin/nebdiskd	(revision 28491)
+++ trunk/Nebulous-Server/bin/nebdiskd	(revision 28492)
@@ -187,5 +187,5 @@
 
     eval {
-        my $r_query = $dbh->prepare_cached("REPLACE INTO mountedvol SELECT vol_id,name,host,path,allocate,available,xattr,mountpoint, ?, ? FROM volume WHERE mountpoint = ?");
+        my $r_query = $dbh->prepare_cached("REPLACE INTO mountedvol SELECT vol_id,name,host,path,allocate,available,xattr,mountpoint, ?, ?,note FROM volume WHERE mountpoint = ?");
 #	my $d_query = $dbh->prepare_cached("UPDATE mountedvol SET allocate = ?, available = ? WHERE mountpoint = ?");
         my $d_query = $dbh->prepare_cached("DELETE FROM mountedvol WHERE mountpoint = ?");
Index: trunk/Nebulous-Server/docs/changes.txt
===================================================================
--- trunk/Nebulous-Server/docs/changes.txt	(revision 28492)
+++ trunk/Nebulous-Server/docs/changes.txt	(revision 28492)
@@ -0,0 +1,5 @@
+-- 2010-06-24 edit to add notes.
+
+ALTER TABLE volume ADD COLUMN note VARCHAR(255) AFTER cab_id;
+ALTER TABLE mountedvol ADD COLUMN note VARCHAR(255) AFTER used;
+
Index: trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm
===================================================================
--- trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm	(revision 28491)
+++ trunk/Nebulous-Server/lib/Nebulous/Server/SQL.pm	(revision 28492)
@@ -367,6 +367,6 @@
     },
     new_volume          => qq{
-        INSERT INTO volume (name, host, path, allocate, available, xattr, mountpoint, cab_id)
-        VALUES (?, ?, ?, TRUE, TRUE, FALSE, ?, NULL)
+        INSERT INTO volume (name, host, path, allocate, available, xattr, mountpoint, cab_id, note)
+        VALUES (?, ?, ?, TRUE, TRUE, FALSE, ?, NULL, ?)
     },
     get_volume_by_name => qq{
@@ -385,5 +385,6 @@
             v.xattr,
             mountedvol.vol_id IS NOT NULL as mounted,
-            v.cab_id
+            v.cab_id,
+            v.note
         FROM volume AS v
         LEFT JOIN mountedvol
@@ -689,4 +690,5 @@
     mountpoint VARCHAR(255) NOT NULL,
     cab_id INT,
+    note VARCHAR(255),
     PRIMARY KEY(vol_id),
     UNIQUE KEY(name),
@@ -715,4 +717,5 @@
     total BIGINT NOT NULL,
     used BIGINT NOT NULL,
+    note VARCHAR(255),
     PRIMARY KEY(vol_id),
     KEY(name),
