Commit 6bf49eb0 authored by Eric Cano's avatar Eric Cano
Browse files

Renamed tapeserverd's options to TAPESERVERD, removing legacy names.

Updated the example castor.conf accordingly.
Removed reference to now gone repackd in castor.conf example.
Removed unused entried in rtcp_constants.h and replaced rtcpd_constants.h by constants in tapeserver/daemon/Constants.hpp.
parent c2462eec
......@@ -469,21 +469,6 @@
#SMC LIBRARY_TYPE SPECTRA # Should be used on Spectra like library
#RTCOPYD NB_BUFS 300 # Number of rtcopy buffers for a 2G machine (1G machine? put 160)
#RTCOPYD BUFSZ 5242880 # Size of a buffer (5M is the default)
# Set to TRUE (case insensitive) if the rtcpd daemon should request the vdqmd
# daemon to try and reuse tape mounts across requests. Any value other than
# TRUE is interpretted as FALSE. The default value of this parameter is TRUE.
# This parameter is always read just before a tape is unmounted, therefore the
# rtcpd daemon does not need to be restarted in order for a new value for this
# parameter to take affect.
#RTCOPYD REUSE_MOUNT TRUE
# The number of disk I/O threads.
#RTCPD THREAD_POOL 3
# A list of hosts which are trusted to issue special commands to rtcpd and VDQM
#ADMIN HOSTS host1 host2 ...
......@@ -506,93 +491,6 @@
#
#TAPE BADMIR_HANDLING CANCEL
# Let tape daemon confirm its idle state to VDQM at certain intervals (this is to
# cleanup inconsistencies where VDQM sees a drive busy, while tape daemon reports the
# drive to be idle)
#
# CONFIRM_DRIVE_FREE : switch on/off this update mechanism
# CONFIRM_DRIVE_FREE_INTVL : check/set interval in seconds (default: 900)
#
# If the option is omitted, the default value (NO) will be used.
#
#TAPE CONFIRM_DRIVE_FREE NO
#TAPE CONFIRM_DRIVE_FREE_INTVL 900
# Timeout for positioning [seconds]. 900 secs is the lower threshold and the default.
# This is the timeout for finding the correct position on read and write. Positioning
# may involve several calls to ioctls. In order to prevent damage from wrong
# positioning this timeout has been introduce to intercept things if the positioning
# took suspiciously long.
#
#TAPE POSITION_TIMEOUT 900
# Set the st options which have been 'set' by the kernel patch before
# (0 == off, 1 == on). If an option is omitted, the values as in the kernel patch
# will be used, i.e. all set to 0.
#
#TAPE ST_BUFFER_WRITES 0
#TAPE ST_ASYNC_WRITES 0
#TAPE ST_READ_AHEAD 0
# Set the ST timeouts (done by a kernel patch before). If the parameter are omitted,
# the values from the patch are used, i.e. 900 seconds and 3600 seconds for the
# normal and the long timeout, respectively.
#
#TAPE ST_TIMEOUT 900
#TAPE ST_LONG_TIMEOUT 3600
# Define the reaction if a rlstape process crashes.
#
# TAPE CRASHED_RLS_HANDLING <action>, where <action> can be
# DOWN : put the drive down in case of a dumped rlstape
# RETRY: retry the release in case of a dumped rlstape
#
# All other values for <action> are ignored and tape daemon will not react at all.
#
# For action RETRY the number of retries and the time delay (in seconds) between
# them can be specified (default values: 3 attempts, at a 60 seconds interval).
# After that the drive is put down.
#
#TAPE CRASHED_RLS_HANDLING RETRY
#TAPE CRASHED_RLS_HANDLING_RETRIES 3
#TAPE CRASHED_RLS_HANDLING_RETRY_DELAY 300
# Define the tape logging facility (relevant for tape daemon and rtcpd)
#
# TAPE TPLOGGER <facility>, where <facility> can be
# SYSLOG : use syslog (logging to LOCAL_LOG0).
# DLF or anyting else : use dlf
#
# (When using SYSLOG: tape daemon is logging to LOG_LOCAL0, rtcpd is logging
# to LOG_LOCAL1.)
#
#TAPE TPLOGGER DLF
# Handle an ACS LIBRARY_FAILURE
#
# TAPE ACS_MOUNT_LIBRARY_FAILURE_HANDLING <action> <#retries> <delay>
# TAPE ACS_UNMOUNT_LIBRARY_FAILURE_HANDLING <action> <#retries> <delay>
#
# <action> can be:
# RETRY: retry the mount/unmount
# DOWN : put the drive down
#
# <#retries> is the number of retries
#
# <delay> is the delay between retry attempts in seconds
#
#TAPE ACS_MOUNT_LIBRARY_FAILURE_HANDLING retry 3 300
#TAPE ACS_UNMOUNT_LIBRARY_FAILURE_HANDLING retry 3 300
# Relax the blank tape checking (YES/NO).
#
# This option allows for relaxing the blank tape checking by suppressing the final
# "are BOT and EOD set?" check. Required on certain SUN drives. Use with care!
#
# If the option is omitted, the default value (NO) will be used.
#
#TAPE RELAX_BLANKTAPE_CHECK NO
## Tape Gateway ################################################################
# The minimum number of threads in the Worker thread pool.
......@@ -607,6 +505,12 @@
## Tapeserverd #################################################################
#TAPESERVERD NB_BUFS 300 # Number of rtcopy buffers for a 2G machine (1G machine? put 160)
#TAPESERVERD BUFSZ 5242880 # Size of a buffer (5M is the default)
# The number of disk I/O threads.
#TAPESERVERD THREAD_POOL 3
# The maximum time in seconds that the data-transfer session can take to get the
# transfer job from the client.
#TAPESERVERD WAITJOBTIMEOUT 60
......@@ -619,88 +523,71 @@
# cease to move data blocks
#TAPESERVERD BLKMOVETIMEOUT 300
## Tape Bridge #################################################################
# The port on which the tapebridge will listen for RTCOPY jobs from the VDQM.
#
# The default value of this parameter is 5070. A value other than the default
# should NOT normally be used.
#
#TAPEBRIDGE VDQMPORT 5070
# The inclusive low port of the tapebridge's RTCPD callback port number range.
#
#TAPEBRIDGE RTCPDLOWPORT 30101
# The inclusive high port of the tapebridge's RTCPD callback port number range.
#
#TAPEBRIDGE RTCPDHIGHPORT 30200
# When the tapebridged daemon requests the tapegatewayd daemon for a set of
# When the tapeserverd daemon requests the tapegatewayd daemon for a set of
# files to migrate to tape, this parameter defines the maximum number of bytes
# the set of files should represent.
#
# The value of this parameter is read and taken into account by the tapebridged
# daemon when the daemon is started. The tapebridged daemon must be restarted
# The value of this parameter is read and taken into account by the tapeserverd
# daemon when the daemon is started. The tapeserverd daemon must be restarted
# in order for any change in the value of this parameter to be taken into
# account.
#
#TAPEBRIDGE BULKREQUESTMIGRATIONMAXBYTES 80000000000
#TAPESERVERD BULKREQUESTMIGRATIONMAXBYTES 80000000000
# When the tapebridged daemon requests the tapegatewayd daemon for a set of
# When the tapeserverd daemon requests the tapegatewayd daemon for a set of
# files to migrate to tape, this parameter defines the maximum number of files
# the set may contain.
#
# The value of this parameter is read and taken into account by the tapebridged
# daemon when the daemon is started. The tapebridged daemon must be restarted
# The value of this parameter is read and taken into account by the tapeserverd
# daemon when the daemon is started. The tapeserverd daemon must be restarted
# in order for any change in the value of this parameter to be taken into
# account.
#
#TAPEBRIDGE BULKREQUESTMIGRATIONMAXFILES 500
#TAPESERVERD BULKREQUESTMIGRATIONMAXFILES 500
# When the tapebridged daemon requests the tapegatewayd daemon for a set of
# files to recall from tape, this parameter defines the maximum number of bytes
# the set of files should represent.
#
# The value of this parameter is read and taken into account by the tapebridged
# daemon when the daemon is started. The tapebridged daemon must be restarted
# The value of this parameter is read and taken into account by the tapeserverd
# daemon when the daemon is started. The tapeserverd daemon must be restarted
# in order for any change in the value of this parameter to be taken into
# account.
#
#TAPEBRIDGE BULKREQUESTRECALLMAXBYTES 80000000000
#TAPESERVERD BULKREQUESTRECALLMAXBYTES 80000000000
# When the tapebridged daemon requests the tapegatewayd daemon for a set of
# When the tapeserverd daemon requests the tapegatewayd daemon for a set of
# files to recall from tape, this parameter defines the maximum number of files
# the set may contain.
#
# The value of this parameter is read and taken into account by the tapebridged
# daemon when the daemon is started. The tapebridged daemon must be restarted
# The value of this parameter is read and taken into account by the tapeserverd
# daemon when the daemon is started. The tapeserverd daemon must be restarted
# in order for any change in the value of this parameter to be taken into
# account.
#
#TAPEBRIDGE BULKREQUESTRECALLMAXFILES 500
#TAPESERVERD BULKREQUESTRECALLMAXFILES 500
# The value of this parameter defines the maximum number of bytes to be written
# to tape before a flush to tape (synchronised tape-mark). Please note that a
# flush occurs on a file boundary therefore more bytes will normally be written
# to tape before the actual flush occurs.
#
# The value of this parameter is read and taken into account by the tapebridged
# daemon when the daemon is started. The tapebridged daemon must be restarted
# The value of this parameter is read and taken into account by the tapeserverd
# daemon when the daemon is started. The tapeserverd daemon must be restarted
# in order for any change in the value of this parameter to be taken into
# account.
#
#TAPEBRIDGE MAXBYTESBEFOREFLUSH 32000000000
#TAPESERVERD MAXBYTESBEFOREFLUSH 32000000000
# The value of this parameter defines the maximum number of files to be written
# to tape before a flush to tape (synchronised or non-immediate tape-mark).
#
# The value of this parameter is read and taken into account by the tapebridged
# daemon when the daemon is started. The tapebridged daemon must be restarted
# The value of this parameter is read and taken into account by the tapeserverd
# daemon when the daemon is started. The tapeserverd daemon must be restarted
# in order for any change in the value of this parameter to be taken into
# account.
#
#TAPEBRIDGE MAXFILESBEFOREFLUSH 200
#TAPESERVERD MAXFILESBEFOREFLUSH 200
## Tape Bridge Clients: dumptp, readtp and writetp #############################
......@@ -730,20 +617,16 @@
# The default value is LOG_INFO which instructs the corresponding daemon to log all
# message priorities above and including INFO.
#LogMask tapebridged LOG_INFO
#LogMask tapeserverd LOG_INFO
#LogMask gcd LOG_INFO
#LogMask rhd LOG_INFO
#LogMask rmcd LOG_INFO
#LogMask rtcpd LOG_INFO
#LogMask schedulerd LOG_INFO
#LogMask stagerd LOG_INFO
#LogMask stagerjob LOG_INFO
#LogMask taped LOG_INFO
#LogMask tapegatewayd LOG_INFO
#LogMask tperrhandler LOG_INFO
#LogMask vdqmd LOG_INFO
#LogMask transfermanagerd LOG_INFO
#LogMask diskmanagerd LOG_INFO
#LogMask repackd LOG_INFO
# End-of-File
......@@ -68,6 +68,18 @@ const time_t TAPESERVER_MOUNTTIMEOUT_DEFAULT = 900; // 15 minutes
*/
const time_t TAPESERVER_BLKMOVETIMEOUT_DEFAULT = 300; // 5 minutes
/**
* The compile-time default value for the number of disk threads in
* the thread pool serving disk accesses.
*/
const uint32_t TAPESERVER_NB_DISK_THREAD_DEFAULT = 3;
/**
* The compile-time default value for the memory buffers exchanged between
* tape and disk threads.
*/
const size_t TAPESERVER_BUFSZ_DEFAULT = 5 * 1024 * 1024;
} // namespace daemon
} // namespace tapeserver
} // namespace tape
......
......@@ -24,8 +24,7 @@
#include "castor/common/CastorConfiguration.hpp"
#include "castor/tape/tapeserver/Constants.hpp"
#include "castor/tape/tapeserver/daemon/DataTransferConfig.hpp"
#include "h/rtcp_constants.h"
#include "h/rtcpd_constants.h"
#include "castor/tape/tapeserver/daemon/Constants.hpp"
//------------------------------------------------------------------------------
// constructor
......@@ -53,35 +52,37 @@ castor::tape::tapeserver::daemon::DataTransferConfig::DataTransferConfig
DataTransferConfig config;
config.bufsz = castorConf.getConfEntInt(
"RTCOPYD", "BUFSZ", (uint32_t)RTCP_BUFSZ, log);
"TAPESERVERD", "BUFSZ",
castor::tape::tapeserver::daemon::TAPESERVER_BUFSZ_DEFAULT, log);
config.nbBufs = castorConf.getConfEntInt<uint32_t>(
"RTCOPYD", "NB_BUFS", log);
"TAPESERVERD", "NB_BUFS", log);
config.tapeBadMIRHandlingRepair = castorConf.getConfEntString(
"TAPE", "BADMIR_HANDLING", "CANCEL", log);
"TAPESERVERD", "BADMIR_HANDLING", "CANCEL", log);
config.bulkRequestMigrationMaxBytes = castorConf.getConfEntInt(
"TAPEBRIDGE", "BULKREQUESTMIGRATIONMAXBYTES",
"TAPESERVERD", "BULKREQUESTMIGRATIONMAXBYTES",
(uint64_t)TAPEBRIDGE_BULKREQUESTMIGRATIONMAXBYTES, log);
config.bulkRequestMigrationMaxFiles = castorConf.getConfEntInt(
"TAPEBRIDGE", "BULKREQUESTMIGRATIONMAXFILES",
"TAPESERVERD", "BULKREQUESTMIGRATIONMAXFILES",
(uint64_t)TAPEBRIDGE_BULKREQUESTMIGRATIONMAXFILES, log);
config.bulkRequestRecallMaxBytes = castorConf.getConfEntInt(
"TAPEBRIDGE", "BULKREQUESTRECALLMAXBYTES",
"TAPESERVERD", "BULKREQUESTRECALLMAXBYTES",
(uint64_t)TAPEBRIDGE_BULKREQUESTRECALLMAXBYTES, log);
config.bulkRequestRecallMaxFiles = castorConf.getConfEntInt(
"TAPEBRIDGE", "BULKREQUESTRECALLMAXFILES",
"TAPESERVERD", "BULKREQUESTRECALLMAXFILES",
(uint64_t)TAPEBRIDGE_BULKREQUESTRECALLMAXFILES, log);
config.maxBytesBeforeFlush = castorConf.getConfEntInt(
"TAPEBRIDGE", "MAXBYTESBEFOREFLUSH",
"TAPESERVERD", "MAXBYTESBEFOREFLUSH",
(uint64_t)TAPEBRIDGE_MAXBYTESBEFOREFLUSH, log);
config.maxFilesBeforeFlush = castorConf.getConfEntInt(
"TAPEBRIDGE", "MAXFILESBEFOREFLUSH",
"TAPESERVERD", "MAXFILESBEFOREFLUSH",
(uint64_t)TAPEBRIDGE_MAXFILESBEFOREFLUSH, log);
config.nbDiskThreads = castorConf.getConfEntInt(
"RTCPD", "THREAD_POOL", (uint32_t)RTCPD_THREAD_POOL, log);
"TAPESERVERD", "THREAD_POOL",
castor::tape::tapeserver::daemon::TAPESERVER_NB_DISK_THREAD_DEFAULT, log);
config.remoteFileProtocol = castorConf.getConfEntString(
"TAPESERVERD", "REMOTEFILEPROTOCOL", "RFIO", log);
config.xrootPrivateKey = castorConf.getConfEntString(
"XROOT", "PRIVATEKEY", "/opt/xrootd/keys/key.pem", log);
"XROOT", "PrivateKey", "/opt/xrootd/keys/key.pem", log);
return config;
}
......@@ -46,8 +46,6 @@
#include "castor/utils/utils.hpp"
#include "h/Ctape.h"
#include "h/rmc_constants.h"
#include "h/rtcp_constants.h"
#include "h/rtcpd_constants.h"
#include <algorithm>
#include <errno.h>
......
......@@ -18,34 +18,11 @@
#endif
#define TAPE_PORT 5011
/* From Castor_limits.h */
#define CA_MAXDENNUM 35 /* Maximum number of known densities for tapes */
/* tape daemon request options */
#define DEFDGN "CART" /* default device group name */
/* config status */
#define CONF_DOWN 0
#define CONF_UP 1
/* special processing flags */
#define NOPOS 2 /* do not reposition tape */
#define NOTRLCHK 4 /* do not check trailer labels */
#define DOUBLETM 4 /* write 2 tapemarks at EOI */
#define IGNOREEOI 8 /* do not take 2 consecutive TMs as EOI */
#define LOCATE_DONE 16 /* used internally */
#define FORCEPRELBL 32 /* force a prelabel */
/* filstat values */
#define CHECK_FILE 0 /* check file existence and fid in HDR1 */
#define NEW_FILE 1 /* write a new file w/out checking file existence or fid */
#define APPEND 2 /* append data to an existing tape file */
#define NOFILECHECK 3 /* do not check file existence */
/* mount mode */
#define WRITE_DISABLE 0
......@@ -62,39 +39,10 @@ enum PositionCommandCode {
TPPOSIT_EOI = 2, /* position at end of information to add a file */
TPPOSIT_BLKID = 3 /* position by block id (locate) */
};
/* release flags */
#define TPRLS_ALL 1 /* release all resources */
#define TPRLS_PATH 2 /* release path */
#define TPRLS_KEEP_RSV 4 /* keep reservation */
#define TPRLS_NOUNLOAD 8 /* release resource but do not unload drive */
#define TPRLS_UNLOAD 16 /* release resource and always unload drive */
#define TPRLS_NOWAIT 32 /* do not wait for the release to complete */
#define TPRLS_DELAY 64 /* wait delay (from 'TAPE CRASHED_RLS_HANDLING_DELAY')
seconds before doing anything */
/* options for tape utilities */
#define TPOPT_NBSIDES 1
#define TPOPT_SIDE 2
/* tape utilities exit codes */
#define USERR 1 /* user error */
#define SYERR 2 /* system error */
#define CONFERR 4 /* configuration error */
/* retry intervals */
#define VOLBSYRI 60 /* retry interval if volume busy */
/* acs loader type to prevent CASTOR from using the read-only option */
#define ACS_NO_READ_ONLY "noro"
/* The default blocksize in bytes to be used when dumping a tape. */
#define DMP_DEFAULTBLOCKSIZE 262144
/* The default blocksize in bytes to be used when migrating to a tape */
#define DEFAULTMIGRATIONBLOCKSIZE 262144
/******************************************************************************
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
#pragma once
/**
* Default number of threads an RTCPD thread pool.
*/
#define RTCPD_THREAD_POOL 3
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment