IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2009, 1:54:49 PM (17 years ago)
Author:
watersc1
Message:

Nebulous: Implemented a number of bug fixes and modifications to

ensure no loss of data.

  • Each volume can now be associated into a cabinet, defining their physical arrangement.
  • File creation: new files without a specified volume are created on a random volume from a subset of the N least full.
  • Replication: file replication uses the same volume selection method, with the constraints that a copy not be automatically placed on the same volume as another, and that the first copy not be housed within the same volume.
  • Cull: instead of removing the first available instance, first attempt to remove an instance on the same volume as another, then attempt to remove an instance in the same cabinet as another, and then remove the first only if those fail.
  • Corrected bug that prevented the deletion of an object if it had more than one unavailable instance.
  • Fixed nebdiskd to synchronize between volume->mountedvol tables and to properly remove volumes that were no longer accessible.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/bin/neb-voladm

    r24842 r26292  
    2323    $allocate,
    2424    $available,
     25    $mounted,
    2526    $db,
    2627    $dbhost,
     
    3132    $vname,
    3233    $xattr,
     34    $cab_id,
    3335);
    3436
     
    4143    'allocate=i'        => \$allocate,
    4244    'available=i'       => \$available,
     45    'mounted'           => \$mounted,
    4346    'db|d=s'            => \$db,
    4447    'debug'             => \$debug,
     
    4851    'vhost=s'           => \$vhost,
    4952    'vname|n=s'         => \$vname,
     53    'cab_id|c=i'        => \$cab_id,
    5054    'xattr=i'           => \$xattr,
    5155) || pod2usage( 2 );
     
    5660
    5761# are we listing the volumes or updating?
    58 if (defined $allocate or defined $available or defined $xattr) {
    59     pod2usage( -msg => "Options: --allocate, --available, and --xattr Require options --vhost or --vname", -exitval => 2 )
     62if (defined $allocate or defined $available or defined $xattr or defined $cab_id) {
     63    pod2usage( -msg => "Options: --allocate, --available, --xattr, and --cab_id Require options --vhost or --vname", -exitval => 2 )
    6064        unless defined $vhost or defined $vname;
    6165    pod2usage( -msg => "Options: --allocate, --available, and --xattr Must be 0 or 1", -exitval => 2)
     
    8488$set{'v.available'} = $available if defined $available;
    8589$set{'v.xattr'} = $xattr if defined $xattr;
     90$set{'v.cab_id'} = $cab_id if defined $cab_id;
    8691
    8792if (%set) {
     
    97102        die $@;
    98103    }
     104    if ($mounted) {
     105        eval {
     106            my ($q, @bind) = sql_interp("UPDATE mountedvol AS v SET", \%set, "WHERE", \%constraint);
     107            warn "$q\n" if $debug;
     108            my $query = $dbh->prepare($q);
     109            $query->execute(@bind);
     110            $dbh->commit;
     111        };
     112        if ($@) {
     113            $dbh->rollback;
     114            die $@;
     115        }
     116    }
    99117}
    100118
     
    132150    neb-voladm [--vname <volume name>] [--vhost <volume host>]
    133151    [--allocate <0|1>] [--available <0|1>] [--xattr <0|1>]
     152    [--cab_id <cab_id>]
    134153    [--host <database host> ] [--db <database name>]
    135154    [--user <database username>] [--pass <database password>]
     
    164183
    165184Enables/Disables these flags on the storage volume.
     185
     186Requires either the C<--vname> or c<--vhost> options.
     187
     188=item * --cab_id <cab_id>
     189
     190Sets the cabinet id for this storage volume.
    166191
    167192Requires either the C<--vname> or c<--vhost> options.
Note: See TracChangeset for help on using the changeset viewer.