IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 17, 2009, 12:08:50 PM (17 years ago)
Author:
beaumont
Message:

merged with head

Location:
branches/cnb_branches/cnb_branch_20090301
Files:
3 deleted
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/cnb_branches/cnb_branch_20090301

  • branches/cnb_branches/cnb_branch_20090301/Nebulous-Server/MANIFEST

    r20990 r23352  
    1010bin/neb-voladd
    1111bin/nebdiskd
    12 docs/c_api.h
    1312docs/database_setup.txt
    1413docs/design.txt
     14docs/install.txt
    1515docs/requirements.txt
    16 docs/setup.txt
    17 docs/tmp.txt
    1816examples/Makefile
    1917examples/nebexample.c
  • branches/cnb_branches/cnb_branch_20090301/Nebulous-Server/bin/neb-admin

    r20202 r23352  
    2323    $dbpass,
    2424    $dbuser,
     25    $so_id_start,
     26    $so_id_range,
    2527    $limit,
    2628    $pending,
     
    4143    'pendingreplicate|r'    => \$pending,
    4244    'pendingremoval'        => \$removal,
     45    'so_id_start=i'         => \$so_id_start,
     46    'so_id_range=i'         => \$so_id_range,
    4347    'limit|l=i'             => \$limit,
    4448    'verbose|v'             => \$verbose,
     
    5862
    5963# check to make sure that only one instance of neb-admin is running
     64# XXX this implies we should move pending replicate elsewhere
    6065my $pidfile = '/var/tmp/neb-admin';
    6166# abort if an instance is already running
     
    9196    $dbh->do("INSERT INTO myvolume SELECT * FROM volume");
    9297
     98    if (not defined $so_id_start) { $so_id_start = 0; }
     99    if (not defined $so_id_range) { $so_id_range = 100000; }
     100    my $so_id_end = $so_id_start + $so_id_range;
     101
     102    # XXX check if so_id_start is beyond MAX(so_id): if so, exit with exit status 10
     103    {
     104        my $query = $dbh->prepare("SELECT MAX(so_id) from storage_object");
     105        $query->execute;
     106        my $answer = $query->fetchrow_arrayref;
     107        my $max_so_id = $$answer[0];
     108        $query->finish;
     109
     110        if ($so_id_start > $max_so_id) {
     111            print STDERR "at end of so_id range, reset please\n";
     112            exit 10;
     113        }
     114    }
     115       
    93116    my $query = $dbh->prepare(
    94117    "        SELECT
     
    111134                USING(vol_id)
    112135            WHERE mymountedvol.available = 1
    113     --        WHERE storage_object_xattr.name = 'user.copies'
     136            AND storage_object_xattr.name = 'user.copies'
     137            AND storage_object.so_id >= $so_id_start
     138            AND storage_object.so_id <  $so_id_end
    114139            GROUP BY so_id
    115140            HAVING available_instances < instances OR instances < copies
  • branches/cnb_branches/cnb_branch_20090301/Nebulous-Server/bin/neb-voladd

    r19797 r23352  
    7979=head1 SYNOPSIS
    8080
    81     neb-voladd --volume <volume name> --uri <volume uri>
     81    neb-voladd --vname <volume name> --vhost <host name> --uri <volume uri>
    8282    [--db <database>] [--user <username>] [--pass <password>] [--host <hostname]
    8383
     
    9292=over 4
    9393
    94 =item * --volume <volume name>
     94=item * --vname <volume name>
    9595
    9696Symbolic name of volume being added.
     97
     98=item * --vhost <host name>
     99
     100Name of the host that containes the C<URI> of the volume being added.
    97101
    98102=item * --uri|-u <volume uri>
Note: See TracChangeset for help on using the changeset viewer.