setErrorCode(0x51002); if (file_exists($fileName)) unlink($fileName); $tmp = 0; } else error_log("-------> The file was created - Now go get it!"); /************************************************ * End of the progress Window Code ************************************************/ print $status->out_complete($tmp); return; } else if ($operation == "finishByImage") { $fileName = $_SESSION['DrvLogName']; error_log("In finishByImage using fileName ". $fileName); /************************************************ * End of the progress Window Code ************************************************/ print $status->out_complete(); } ///////////////////////////////////////////////////////////////////////////////////////////////// // These are STARTING operation for ALL choices. ///////////////////////////////////////////////////////////////////////////////////////////////// if ($operation == "download") { error_log("==> Operation was download"); $fileName = $_SESSION['DrvLogName']; error_log("fileName = ". $fileName ); if (file_exists($fileName)) { $size = filesize($fileName); header("Pragma: "); header("Cache-Control: "); header("Content-Type: application/bin"); header("Content-Length: $size"); header('Content-Disposition: attachment; filename="' . basename($fileName) . '"'); header("Content-Location: $fileName"); header("Cache-Control: private"); $handle = fopen($fileName, "r"); fpassthru($handle); // We do not delete this file after downloading it from the library. //unlink($fileName); } else { echo ""; } return; } } if (isset($_GET['method'])) { error_log("- - - - We are in GET - - - - "); error_log("method is ". $_GET['method']); error_log("$_POST = " . print_r($_POST, true) ); // Required to support the operation in progress dialog. $operationInProgress = true; $status = new ReturnStatus(); $mailboxGUID = $_POST['mailboxGUID']; $method = $_GET['method']; error_log("selectedDrivesInfo = " . print_r($_POST['selectedDrivesInfo'], true) ); /******************************************************* * Determin the operation to perform *******************************************************/ if ($method == "eraseFUP") { error_log("In eraseFUP..."); // The format for selectedDrivesInfo is: driveGUID:libGUID:onlineStatus $selectedDrivesInfo = $_POST['selectedDrivesInfo']; $driveInfo = split(":", $selectedDrivesInfo); error_log("-------> erase_fup_tape($user, $driveInfo[1], $driveInfo[0], $mailboxGUID);"); erase_fup_tape($user, $driveInfo[1], $driveInfo[0], $mailboxGUID); } else if ($method == "createFUP") { error_log("In createFUP..."); // The format for selectedDrivesInfo is: driveGUID:libGUID:onlineStatus $selectedDrivesInfo = $_POST['selectedDrivesInfo']; $driveInfo = split(":", $selectedDrivesInfo); error_log("-------> create_fup_tape($user, $driveInfo[1], $driveInfo[0], $mailboxGUID);"); create_fup_tape($user, $driveInfo[1], $driveInfo[0], $mailboxGUID); } else { // The format for selectedDrivesInfo is: // driveGUID:libGUID:onlineStatus,driveGUID:libGUID:onlineStatus... etc $selectedDrivesInfo = $_POST['selectedDrivesInfo']; error_log( "selectedDrivesInfo -> " . $selectedDrivesInfo ); $drives = split(",", $selectedDrivesInfo); error_log( "drives -> " . print_r($drives,true) ); if ($method == "updateByImage") { error_log("In updateByImage..."); $guids = array(); foreach ($drives as $drive) { $driveInfo = split(":", $drive); error_log( "driveInfo -> " . print_r($driveInfo,true) ); $guids[] = $driveInfo[3]; } $fileName = $_FILES['driveFirmware']['name']; error_log( "File being uploaded is " . $fileName ); // Move the file to a filename that uses ADIC's nameing convention $fwfile = "/home/embedded/library/UDS/drive_firmware/" . basename($fileName); error_log("Firmware file on library will be " . basename($fileName)); // Create the upload directory. This became an issue whene people were deleting this // directory and uploads started to fail. $sRet = system("mkdir /home/embedded/library/UDS", $iRet); error_log("Call to system (mkdir UDS) returned a \"$iRet\" and the output was \"$sRet\""); $sRet = system("mkdir /home/embedded/library/UDS/drive_firmware", $iRet); error_log("Call to system (mkdir) returned a \"$iRet\" and the output was \"$sRet\""); /********************************************************************** * I1 Hack * Clean up all OLD files. There is no way to resue them anyway. * In I2 the user will be able to manager and select files that * are already on the library. So this code will need to be taken out. **********************************************************************/ error_log("Deleting all OLD IMAGE files from drive_firmware..."); $sRet = system("rm -f /home/embedded/library/UDS/drive_firmware/*", $iRet); error_log("Call to system (rm -f) returned a \"$iRet\" and the output was \"$sRet\""); error_log("The file has been uploaded. We are now going to move it to ". fwfile); if ( ! move_uploaded_file($_FILES['driveFirmware']['tmp_name'], $fwfile )) { error_log("Failed to moved the uploaded file to ". $fwfile); $status->setErrorCode("4108"); // !?! Put new error code in AND MAKE SURE THIS RETURN WORKS $status->out_complete(); return; } error_log("Moved the uploaded file to ". $fwfile); error_log( "guids -> " . print_r($guids,true) ); error_log("Calling update_drive_firmware_by_image(user, guids, " . $fwfile. ");"); $OpGuid = update_drive_firmware_by_image($user, $guids, $fwfile); error_log("-------> The OpGuid is ". $OpGuid); $_SESSION['DrvLogName'] = $fwfile; print $status->checkStatus('finishByImage', $fwfile, $OpGuid); return; } else if ($method == "updateByFUP") { error_log("In updateByFUP..."); foreach ($drives as $drive) { $driveInfo = split(":", $drive); update_drive_firmware_by_fup($user, $driveInfo[1], $driveInfo[0], $mailboxGUID); } } else if ($method == "retriveDiv") { error_log("In retriveDiv..."); // Create the upload directory. This became an issue whene people were deleting this // directory and uploads started to fail. $sRet = system("mkdir /home/embedded/library/UDS", $iRet); error_log("Call to system (mkdir UDS) returned a \"$iRet\" and the output was \"$sRet\""); $sRet = system("mkdir /home/embedded/library/UDS/drive_dumps", $iRet); error_log("Call to system (mkdir) returned a \"$iRet\" and the output was \"$sRet\""); /********************************************************************** * I1 Hack * Clean up all OLD files. There is no way to resue them anyway. * In I2 the user will be able to manager and select files that * are already on the library. So this code will need to be taken out. **********************************************************************/ error_log("Deleting all OLD IMAGE files from drive_dumps..."); $sRet = system("rm -f /home/embedded/library/UDS/drive_dumps/*", $iRet); error_log("Call to system (rm -f) returned a \"$iRet\" and the output was \"$sRet\""); $selectedDrivesInfo = $_POST['selectedDrivesInfo']; $driveInfo = split(":", $selectedDrivesInfo); $fileName = $fileName . $driveInfo[4]; error_log("-------> fileName is ". $fileName); error_log("-------> create_log_dump($user, $fileName, $driveInfo[3];"); $OpGuid = create_log_dump($user, $fileName, $driveInfo[3]); //error_back( 0x10 ); error_log("-------> The OpGuid is ". $OpGuid); //$fileName = "/home/embedded/library/UDS/drive_dumps/".$_POST['fileName']; $_SESSION['DrvLogName'] = $fileName; print $status->checkStatus('finishLogDump', $fileName, $OpGuid); return; } else if ($method == "retriveSledDiv") { error_log("In retriveSledDiv..."); // Create the upload directory. This became an issue whene people were deleting this // directory and uploads started to fail. $sRet = system("mkdir /home/embedded/library/UDS", $iRet); error_log("Call to system (mkdir UDS) returned a \"$iRet\" and the output was \"$sRet\""); $sRet = system("mkdir /home/embedded/library/UDS/drive_dumps", $iRet); error_log("Call to system (mkdir) returned a \"$iRet\" and the output was \"$sRet\""); /********************************************************************** * I1 Hack * Clean up all OLD files. There is no way to resue them anyway. * In I2 the user will be able to manager and select files that * are already on the library. So this code will need to be taken out. **********************************************************************/ error_log("Deleting all OLD IMAGE files from drive_dumps..."); $sRet = system("rm -f /home/embedded/library/UDS/drive_dumps/*", $iRet); error_log("Call to system (rm -f) returned a \"$iRet\" and the output was \"$sRet\""); $selectedDrivesInfo = $_POST['selectedDrivesInfo']; $driveInfo = split(":", $selectedDrivesInfo); $fileName = $fileName . $driveInfo[4]; error_log("-------> fileName is ". $fileName); error_log("-------> create_log_dump($user, $fileName, $driveInfo[3];"); $OpGuid = create_sled_log_dump($user, $fileName, $driveInfo[3]); error_log("-------> The OpGuid is ". $OpGuid); //$fileName = "/home/embedded/library/UDS/drive_dumps/".$_POST['fileName']; $_SESSION['DrvLogName'] = $fileName; print $status->checkStatus('finishLogDump', $fileName, $OpGuid); return; } } /************************************************ * End of the progress Window Code ************************************************/ error_log("Calling status->out_complete() and then returning"); print $status->out_complete(); return; } else { // Must default this or JavaScript will get an error below. $method = "none"; } error_log("method = $method"); $numberOfChassis = 1; $returnedObject = @get_chassis($user); if( isset($returnedObject) ) { $numberOfChassis = sizeof( $returnedObject ); } // If there is no mailbox available, these // properties below will be an empty string $numMboxSlots = get_num_mailbox_slots($user); $driveTypes = get_drive_types($user, $sortCriteria); $keys = array_keys($driveTypes); if( $numMboxSlots > 0 ) { $mailbox = get_top_system_slot($user); $mailboxGUID = $mailbox->guid; } else { $mailboxGUID=""; } $statusObj = check_drive_op_status( $user, $_GET['opGuid'] ); error_log("statusObj = ". print_r($statusObj, true) ); if( $statusObj->InProgress != 1) $libBusy = false; else $libBusy = true; ?> Drive Operations


The library is busy performing a tape drive operation.
Please try this page again later.


Select the tape drive type:

  Drive Type: Interface Type:
value="hashCode ?>" onclick="selectDriveType(this.value);"> driveType ?> interfaceType ?>

Create Firmware Tape
Select the tape drive in which to create the firmware tape:

Total Number of Drives:  
    Partition     Location    Drive Firmware    Status  
  Page  
  of        
Drives: 0  - 0


Erase Firmware Tape
Select the tape drive to erase the firmware tape with:

Total Number of Drives:  
    Partition     Location    Drive Firmware    Status  
  Page  
  of        
Drives: 0  - 0


Retrieve Drive Log
Select the drive:

Total Number of Drives:  
    Partition     Location    Drive Firmware    Status  
  Page  
  of        
Drives: 0  - 0


Retrieve Drive Sled Log
Select the drive:

Total Number of Drives:  
    Partition     Location    Drive Firmware    Status  
  Page  
  of        
Drives: 0  - 0


Select the drive(s) to update:

Total Number of Drives:  
  Partition     Location    Drive Firmware    Status  
  Page  
  of        
Drives: 0 - 0


Erase Firmware Tape
  • Place a tape in the top I/E Station slot. (Upper-most I/E slot)
  • After closing the I/E Station, make sure the tape is scanned and assigned for system use.
  • Verify with "View I/E Stations" button that the tape is listed in the top I/E slot.
  • Press "Apply" to perform the operation.


  • Create Firmware Tape
  • Place a scratch tape in the top I/E Station slot. (Upper-most I/E slot)
  • After closing the I/E Station, make sure the tape is scanned and assigned for system use.
  • Verify with "View I/E Stations" button that the tape is listed in the top I/E slot.
  • Press "Apply" to perform the operation.


  • Update Drive Firmware By Tape
  • Place a firmware tape in the top I/E Station slot. (Upper-most I/E slot)
  • After closing the I/E Station, make sure the tape is scanned and assigned for system use.
  • Verify with "View I/E Stations" button that the tape is listed in the top I/E slot.
  • Press "Apply" to perform the operation.


  • Update Drive Firmware By Image
  • Select a firmware update file

  • Send this tape drive firmware update file:

    Retrieve Drive Log

    Select Apply to start downloading the Drive Log.


    Retrieve Drive Sled Log

    Select Apply to start downloading the Drive Sled Log.