IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 15, 2013, 10:59:14 AM (14 years ago)
Author:
Serge CHASTEL
Message:

nebdiskd: Scans /export/<host>.[012] instead of nfs-mounted /data/<host>.[012] (Tag->Trung Merge)

Location:
trunk/Nebulous-Server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server

  • trunk/Nebulous-Server/bin/nebdiskd

    r34915 r34929  
    2020
    2121my (
    22     $debug, 
    23     $db, 
    24     $dbhost, 
    25     $dbuser, 
    26     $dbpass, 
    27     $pidfile, 
    28     $stop, 
    29     $restart, 
     22    $debug,
     23    $db,
     24    $dbhost,
     25    $dbuser,
     26    $dbpass,
     27    $pidfile,
     28    $stop,
     29    $restart,
    3030    $verbose,
    3131    $user,
     
    142142$SIG{TERM} = sub { unlink_pid_file($pidfile); exit(); };
    143143$SIG{INT}  = $SIG{TERM};
    144 $SIG{HUP}  = sub { $c = read_rcfile($rcfile) }; 
     144$SIG{HUP}  = sub { $c = read_rcfile($rcfile) };
    145145
    146146my $date = localtime();
     
    205205            $query->finish;
    206206        }
    207        
     207
    208208        # determine valid mountpoints
    209209        foreach my $mnt (@$mounts) {
    210210            my $mountpoint = $mnt->{'mountpoint'};
    211             my $hostname = $mnt->{'host'};
    212             my $valid_mountpoint = 1;
     211            my $alt_mountpoint = $mountpoint;
     212            $alt_mountpoint =~ s/data/export/;
     213            my $hostname = $mnt->{'host'};
     214            my $valid_mountpoint = 1;
    213215
    214216            # fetch stats on the device using ssh and df
    215             my $dev_info = df_through_ssh($hostname, $mountpoint, 1024);
     217            my $dev_info = df_through_ssh($hostname, $alt_mountpoint, 1024);
    216218            unless (defined $dev_info) {
    217                 $valid_mountpoint = 0;
    218                 $log->error("can't find device info for $mountpoint");
    219                 $d_query->execute($mountpoint);
     219                $valid_mountpoint = 0;
     220                $log->error("can't find device info for $mountpoint / $alt_mountpoint");
     221                $d_query->execute($mountpoint);
    220222                next;
    221223            }
     
    277279#        $dbh->commit;
    278280    };
    279     if ($@) { 
     281    if ($@) {
    280282#        $dbh->rollback;
    281283        $log->logdie($@);
     
    361363    $log->debug("Received from ssh = [$df_data]");
    362364    unless ($df_data) {
    363         return undef;
     365        return undef;
    364366    }
    365367    my @data = split(/:/, $df_data);
     
    483485=item * C<NEB_PASS>
    484486
    485 Equivalent to --dbpass|-p 
     487Equivalent to --dbpass|-p
    486488
    487489=back
Note: See TracChangeset for help on using the changeset viewer.