The CommandTaskCell allows for multiple
subtasks to perform various timeconsuming operations on the
dCache system. For now only the file copy management is
available. Multiple of those "pool draining tasks" may run
independently within one maintenance Cell.
In case the dCache distribution is not coming with this feature installed, please follow the instructions below to get it enabled.
Create a file
/opt/d-cache/config/maintenance.batch
with the following content.
set printout default 3
set printout CellGlue none
onerror shutdown
#
check -strong setupFile
#
copy file:${setupFile} context:setupContext
#
# import the variables into our $context.
# don't overwrite already existing variables.
#
import context -c setupContext
#
# Make sure we got what we need.
#
check -strong serviceLocatorPort serviceLocatorHost
#
create dmg.cells.services.RoutingManager RoutingMgr
#
# The LocationManager Part
#
create dmg.cells.services.LocationManager lm \
"${serviceLocatorHost} ${serviceLocatorPort}"
#
#
define context maintenanceSetup endDefine
define module copy-module diskCacheV111.replicaManager.EasyCopyCellModule -base=${config}/copytask
set logout time 18000
endDefine
#
create dmg.cells.services.CommandTaskCell maintenance "default -export"
#Change to ../jobs and run ./initPackage.sh. The script may complain about some security issues which are not relevant in this context.
Make sure you create the directory
/opt/d-cache/config/copytask. It will
hold temporary information for the various copy tasks.
Start the service by :
./maintenance start
A maintenance cell provides a set of modules each of which can be instantiated multiple times and run concurrently. An instantiated module is called a task. A user session may be attached and detached to/from any task. Different modules provide different functionalities and consequently comes with a different command set.
A typical session would look as follows :
Change to the maintenance cell and get a listing of all available modules.
(local) admin >cd maintenance(maintenance) admin >ls module -l copy-module -> diskCacheV111.replicaManager.EasyCopyCellModuleCreate a new task of module copy-module.
(maintenance) admin >create task my-first-task copy-module Task <my-first-task> created and attached to (us) [alm-admin-101@adminDoorDomain]The task 'my-first-task' has been created and the current terminal session is attached to that task. (as the message says). 'my-first-task' is listed as follows :
(maintenance) admin >ls task -l my-first-task copy-module {my-first-task;Status=idle;m=IDLE}Communiction with the task is done by prepending the actual task command by the keywork 'task'. So if there a is a copy-module command 'load pool' one would have to issue 'task load pool'.
(maintenance) admin >task help exclude pinned|cached|precious|bad|locked|<storageClass> info halt # halt processing *** keeponly pinned|cached|precious|bad|locked|<storageClass> load pool <PoolName> [<StorageInfoPattern>](maintenance) admin >...some time later...(maintenance) admin >task info Task ---- Name : copy Module Args : define module copy diskCacheV111.*** Task Args : create task copy copy Parameter --------- ***The task keyword may be omited as long as the command is not ambiguous.
In order to create a new task or to attach to another, already existing one, one has to detach from the current task.
(maintenance) admin >detach Detached from : <my-first-task>If a session is idle for more than an hour, it automatically detaches from the currently attached task, if it had been connected. In order to continue working with that task, one has to reattach :
(maintenance) admin >attach my-first-task Task <my-first-task> attached to (us) [alm-admin-101@adminDoorDomain]
define module <ModuleName> <ModuleClass>Assigns a java class to a module name. Subsequently this module may be instantiated using the module name only. This command is typically executed during startup in
maintenance.batch.
undefine module <ModuleName>Undefines a module name. Tasks still running the module are not affected.
ls -l moduleLists all available modules.
ls -l taskLists all active tasks.
ls -l sessionLists all session together with tasks they are currently attached to.
ceate task <taskName> <moduleName>Creates a new task based on the specified module. The <taskName> must be unique. The current session is automatically attached to the new task.
attach <taskName>Attached to an already active task. The <taskName> must exists. The current session must not be attached to any other task. So it might become necesssary to detach first.
detachDetaches this session from the currently attached task.
task <task specific command>Forward the command <task specific command> to the attached task for execution. If the command is not ambiguous, the task keywork may be omitted.
| Copyright dCache.org © 2003 - 2008 |