00001
00002
00003
00004
00005 #ifndef TAPE_INCL
00006 #define TAPE_INCL 1
00007
00008 #include <SUM.h>
00009
00010 #ifdef SUMDC
00011 #define MAX_SLOTS 30
00012 #define NUM_IMP_EXP_SLOTS 5
00013 #define MAX_SLOTS_LIVE (MAX_SLOTS - NUM_IMP_EXP_SLOTS)
00014 #define MAX_DRIVES 1
00015 #define MAX_GROUPS 1024
00016 #define MAX_AVAIL_BLOCKS 1600000000
00017 #define TAR_FILE_SZ 500000000
00018 #define TAR_FILE_SZ_BLKS 976563
00019 #define LIBDEV "/dev/t50"
00020
00021 #define LIBDEVFILE "/home/jim/cvs/JSOC/base/sums/apps/data/libdevfile_50.cfg"
00022 #define SUMDR0 "/dev/nst0"
00023 #define SUMDR "/dev/nst"
00024 #define GTARBLOCK 256
00025 #define UNLOADDUMP "/tmp/t50_unload_dump.out"
00026 #define UNLOADCMD "/usr/sbin/mtx -f /dev/t50 unload"
00027 #define POSITIONDUMP "/tmp/t50_position_dump.out"
00028 #elif SUMT950
00029 #define MAX_SLOTS 2240
00030 #define NUM_IMP_EXP_SLOTS 50
00031 #define MAX_SLOTS_LIVE (MAX_SLOTS - NUM_IMP_EXP_SLOTS)
00032 #define MAX_DRIVES 12
00033 #define MAX_GROUPS 1024
00034
00035 #define MAX_AVAIL_BLOCKS 4800000000
00036 #define TAR_FILE_SZ 500000000
00037 #define TAR_FILE_SZ_BLKS 976563
00038 #define LIBDEV "/dev/t950"
00039
00040 #define LIBDEVFILE "/home/production/cvs/JSOC/tables/libdevfile.cfg"
00041 #define SUMDR0 "/dev/sum_nst0"
00042 #define SUMDR1 "/dev/sum_nst1"
00043 #define SUMDR2 "/dev/sum_nst2"
00044 #define SUMDR3 "/dev/sum_nst3"
00045 #define SUMDR4 "/dev/sum_nst4"
00046 #define SUMDR5 "/dev/sum_nst5"
00047 #define SUMDR6 "/dev/sum_nst6"
00048 #define SUMDR7 "/dev/sum_nst7"
00049 #define SUMDR8 "/dev/sum_nst8"
00050 #define SUMDR9 "/dev/sum_nst9"
00051 #define SUMDR10 "/dev/sum_nst10"
00052 #define SUMDR11 "/dev/sum_nst11"
00053 #define SUMDR "/dev/sum_nst"
00054 #define GTARBLOCK 256
00055 #define UNLOADDUMP "/tmp/t950_unload_dump.out"
00056 #define UNLOADCMD "/usr/sbin/mtx -f /dev/t950 unload"
00057 #define POSITIONDUMP "/tmp/t950_position_dump.out"
00058 #elif SUMT120
00059 #define SUMDR0 "/dev/nst0"
00060 #define SUMDR1 "/dev/nst1"
00061 #define SUMDR2 "/dev/nst2"
00062 #define SUMDR3 "/dev/nst3"
00063 #define SUMDR "/dev/nst"
00064
00065
00066
00067
00068 #define SUMDR4 "/dev/sum_nst4"
00069 #define SUMDR5 "/dev/sum_nst5"
00070 #define SUMDR6 "/dev/sum_nst6"
00071 #define SUMDR7 "/dev/sum_nst7"
00072 #define SUMDR8 "/dev/sum_nst8"
00073 #define SUMDR9 "/dev/sum_nst9"
00074 #define SUMDR10 "/dev/sum_nst10"
00075 #define SUMDR11 "/dev/sum_nst11"
00076 #define MAX_SLOTS 128
00077 #define NUM_IMP_EXP_SLOTS 8
00078 #define MAX_SLOTS_LIVE (MAX_SLOTS - NUM_IMP_EXP_SLOTS)
00079 #define MAX_DRIVES 4
00080 #define MAX_GROUPS 1024
00081 #define MAX_AVAIL_BLOCKS 1000000000
00082 #define TAR_FILE_SZ 500000000
00083 #define TAR_FILE_SZ_BLKS 976563
00084 #define LIBDEV "/dev/sg12"
00085
00086 #define LIBDEVFILE "/home/production/cvs/JSOC/base/sums/apps/data/libdevfile.cfg"
00087 #define GTARBLOCK 256
00088 #define UNLOADDUMP "/tmp/t120_unload_dump.out"
00089 #define UNLOADCMD "/usr/sbin/mtx -f /dev/sg12 unload"
00090 #define POSITIONDUMP "/tmp/t120_position_dump.out"
00091 #endif
00092
00093
00094 #define TAPE_NOT_LOADED 0
00095 #define TAPE_RD_INIT 1
00096 #define TAPE_RD_CONT 2
00097
00098
00099
00100 #define TAPEUNINIT -1
00101 #define TAPEACTIVE 1
00102 #define TAPECLOSED 2
00103 #define TAPECLOSEDREJECT 3
00104
00105
00106 typedef struct {
00107 int slotnum;
00108 char *tapeid;
00109 } SLOT;
00110
00111 typedef struct {
00112 uint64_t sumid;
00113 int busy;
00114 int lock;
00115
00116 int to;
00117 int tocnt;
00118 int tapemode;
00119 int slotnum;
00120 int filenum;
00121 int blocknum;
00122 int offline;
00123 char *tapeid;
00124 } DRIVE;
00125
00126 typedef struct {
00127
00128
00129 char *tapeid;
00130 int nxtwrtfn;
00131 int spare;
00132 int group_id;
00133 uint64_t availblocks;
00134 int closed;
00135 char *last_access;
00136 } TAPE;
00137
00138 #endif
00139
00140