Tape Server installation for Windows 2000
The Tape Server package is a complete tar archive and includes the 4 process modules (master task, driver task, stats task and link task) plus a startup task and 2 required libraries.
The Tape Server Link task is a RPC server for the data transfer procedure (proc 31 of edoc410).
Installation
The following instructions assume that the base of your MIDAS installation is c:\MIDAS.
Uppack the Tape Server package archive into c:\MIDAS.
This will create directories c:\MIDAS\TapeServer and c:\MIDAS\TapeServer\Win. The tape server process modules will be found in c:\MIDAS\TapeServer\Win.
Create a directory c:\MIDAS\config\TS_10205 (the _10205 is important!). In this new directory create a file c:\MIDAS\config\TS_10205\TS_configuration which will look like this:
#device configuration information
# any line starting with a # is a comment and is ignored
stats TSstats
# devices available - list ends with a null line
# format class_name device_name driver_task_path_name
# class_name MUST be one of dlt, exabyte, scsitape, file or sink
dlt tape0 TSdriver
exabyte tape1 TSdriver
sink sink/0 TSdriver
file file/o TSdriver
#data link configuration information - list end with a null line
# format link_task_path_name
TSlinkTCP
#program options - list end with a null line
msg_reporting_level 0x0180fff0
msg_logging_level 0x188
file_path_base c:\TapeData
data_buffer_size 16
tape_block_size 16
#end of information
This defines a DLT tape drive using device \\.\tape0 and a Exabyte tape drive using device \\.\tape1. Change these or add for your hardware.
The Tape Server working directory which contains the configuration file may be specified by the environment variable MIDASTSBASE (highest priority) or the environment variable MIDASBASE. Using MIDASTSBASE would be useful if several copies of the Tape Server are run in a shared environment.
The program options data_buffer_size and tape_block_size may be expressed in bytes or Kbytes. In the current release they SHOULD have the same value. The default value is 16 and both may be omitted if data blocks of 16Kbytes are being used. The values MUST be compatible with the data source being used.
The program option file_path_base is the root directory used by the file device. It may be omitted if the file device is not used.
A sample configuration file will be found in the c:\MIDAS\TapeServer\Win directory.
Lastly AND THIS IS IMPORTANT. Edit the file c:\WINNT\system32\drivers\etc\hosts and define the location of the MIDAS Message Logger Server. If you do not have a Message Logger installed don't worry - Just modify the hosts file to look like
# Copyright (c) 1993-1995 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows NT. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host 127.0.0.1 localhost egmsgIt is important that the host egmsg be defined even if the server is not installed. If you do not define egmsg then the software will crash. This will be fixed in a future release!
To start the tape server: Start a Windows command prompt window
cd c:\MIDAS\TapeServer\Win startup TSmasterThis command causes the Tape Server master task to be started with High priority. The master task will then start the required driver and link tasks using the information in the configuration file. The tasks are called TSmaster, TSlink, TSdriver and TSstats.
You will get a lot of logging messages. Look for messages like:
MIDAS Tape Server: Configuration: UDP port = 10205, SHM object = SHM_10205. MIDAS Tape Server: Shared memory ID is 65 MIDAS Tape Server: Shared memory segment located at address 440000. MIDAS Tape Server: Configuration file used - c:\MIDAS\config\TS_10205\TS_configuration MIDAS Tape Server: Using device dlt tape0 TSdriver MIDAS Tape Server: Data link TSlink MIDAS Tape Server: Master global area initialised. MIDAS Tape Server: Driver process for tape0 has pid 14409 MIDAS Tape Server: Link task has pid 14413 MIDAS Tape Server: Starting the RPC interface MIDAS Tape Server: Created RPC Program 28000205 Version 4 on UDP port 10205. MIDAS Tape Server: Entering server loop MIDAS Data Link (14413): Message logger contacted. MIDAS Data Link (14413): Started with args 10205 10305 0 MIDAS Data Link (14413): Configuration: SHM key=10205, UDP port = 10305, stream=0 MIDAS Data Link (14413): Shared memory ID is 65 MIDAS Data Link (14413): Shared memory segment located at address 440000. MIDAS Data Link (14413): Starting the RPC interface MIDAS Data Link (14413): Created RPC Program 28000205 Version 4 on UDP port 10305. MIDAS Data Link (14413): Entering server loop MIDAS Tape Driver (14412): Configuration: driver=0, key=10205. MIDAS Tape Driver (14412): Shared memory ID is 65 MIDAS Tape Driver (14412): Shared memory segment located at address 440000. MIDAS Tape Driver (14412): Using device tape0 of type dlt.You will now have to attach the Tape Server to your experiment. Use the Apparatus Control button in Experiment Access and select the tape options. The master task creates a file /MIDAS/config/TS_10205/TS_capabilities where it stores issued capabilities which are reloaded whenever the tape server is started.
The port 10205 in the apparatus file matches up with the TS_10205 directory. If you wish to run a second (or further) copy of the Tape Server in the same system repeat the installation instructions changing 10205 for 10206 etc.
The Link task listens for incoming data on the ports 10305, 10306 etc.