Adjustments for man pages in eos Shell comands.

Activating 'Layout' command. Activating 'adjustreplica' command.
Adding 'cd' command to check if one can change into a directory.
Activating 'replicastripe' command to send transfers into the new external transfer queue.
Removing droptransfers,listtransfers from FST. Adding SOCKS4 proxy support to eosd & eosfs.
Updating man pages & spec file.
parent 1fc9c330
......@@ -658,7 +658,12 @@ int main (int argc, char* argv[]) {
if (getenv("EOS_MGM_URL")) {
serveruri = getenv("EOS_MGM_URL");
}
if (getenv("EOS_SOCKS4_HOST") && getenv("EOS_SOCKS4_PORT")) {
EnvPutString( NAME_SOCKS4HOST, getenv("EOS_SOCKS4_HOST"));
EnvPutString( NAME_SOCKS4PORT, getenv("EOS_SOCKS4_PORT"));
}
XrdOucString urole="";
XrdOucString grole="";
bool selectedrole= false;
......
......@@ -120,20 +120,42 @@ com_access (char* arg1) {
return (0);
com_access_usage:
printf("usage: access ban user|group|host <identifier> : ban user,group or host with identifier <identifier>\n");
printf(" access unban user|group|host <identifier> : unban user,group or host with identifier <identifier>\n");
printf("\n");
printf(" access allow user|group|host <identifier> : allows this user,group or host access\n");
printf(" access unallow user|group|host <identifier> : unallows this user,group or host access\n");
printf("hint: if you add any 'allow' the instance allows only the listed users. A banned identifier will still overrule an allowed identifier!\n");
printf("\n");
printf(" access set redirect <target-host> : allows to set a global redirection to <target-host>\n");
printf(" access rm redirect : removes global redirection\n");
printf(" access set stall <stall-time> : allows to set a global stall time\n");
printf(" access rm stall : removes global stall time\n");
printf("\n");
printf(" access ls [-m] [-n] : print banned,unbanned user,group, hosts\n");
printf(" -m : output in monitoring format with <key>=<value>\n");
printf(" -n : don't translate uid/gids to names\n");
printf("'[eos] access ..' provides the access interface of EOS to allow/disallow hosts and/or users\n");
printf("Usage: access ban|unban|allow|unallow|set|rm|ls ...\n\n");
printf("Options:\n");
printf("access ban user|group|host <identifier> : \n");
printf(" ban user,group or host with identifier <identifier>\n");
printf(" <identifier> : can be a user name, user id, group name, group id, hostname or IP \n");
printf("access unban user|group|host <identifier> :\n");
printf(" unban user,group or host with identifier <identifier>\n");
printf(" <identifier> : can be a user name, user id, group name, group id, hostname or IP \n");
printf("access allow user|group|host <identifier> :\n");
printf(" allows this user,group or host access\n");
printf(" <identifier> : can be a user name, user id, group name, group id, hostname or IP \n");
printf("access unallow user|group|host <identifier> :\n");
printf(" unallows this user,group or host access\n");
printf(" <identifier> : can be a user name, user id, group name, group id, hostname or IP \n");
printf("HINT: if you add any 'allow' the instance allows only the listed users.\nA banned identifier will still overrule an allowed identifier!\n\n");
printf("access set redirect <target-host> :\n");
printf(" allows to set a global redirection to <target-host>\n");
printf(" <target-host> : hostname to which all requests get redirected\n");
printf("access rm redirect :\n");
printf(" removes global redirection\n");
printf("access set stall <stall-time> :\n");
printf(" allows to set a global stall time\n");
printf(" <stall-time> : time in seconds after which clients should rebounce\n");
printf("access rm stall :\n");
printf(" removes global stall time\n");
printf("access ls [-m] [-n] :\n");
printf(" print banned,unbanned user,group, hosts\n");
printf(" -m : output in monitoring format with <key>=<value>\n");
printf(" -n : don't translate uid/gids to names\n");
printf("Examples:\n");
printf(" access ban foo Ban host foo\n");
printf(" access set redirect foo Redirect all requests to host foo\n");
printf(" access rm redirect Remove redirection to previously defined host foo\n");
printf(" access set stall 60 Stall all clients by 60 seconds\n");
printf(" access ls Print all defined access rules\n");
return (0);
}
......@@ -107,50 +107,62 @@ com_attr (char* arg1) {
return (0);
com_attr_usage:
printf("usage: attr [-r] ls <path> : list attributes of path (-r recursive)\n");
printf("usage: attr [-r] set <key>=<value> <path> : set attributes of path (-r recursive)\n");
printf("usage: attr [-r] get <key> <path> : get attributes of path (-r recursive)\n");
printf("usage: attr [-r] rm <key> <path> : delete attributes of path (-r recursive)\n\n");
printf("Help: If <key> starts with 'sys.' you have to be member of the sudoer to see this attributes or modify\n");
printf(" Administrator Variables:\n");
printf(" -----------------------\n");
printf(" attr: sys.forced.space=<space> = enforces to use <space> [configuration dependend]\n");
printf(" attr: sys.forced.layout=<layout> = enforces to use <layout> [<layout>=(plain,replica,raid5)\n");
printf(" attr: sys.forced.checksum=<checksum> = enforces to use file-level checksum <checksum> [<checksum>=(adler,crc32,crc32c,md5,sha)\n");
printf(" attr: sys.forced.blockchecksum=<checksum> = enforces to use block0level checksum <checksum> [<checksum>=(adler,crc32,crc32c,md5,sha)\n");
printf(" attr: sys.forced.nstripes=<n> = enforces to use <n> stripes[<n>= 1..16]\n");
printf(" attr: sys.forced.blocksize=<w> = enforces to use a blocksize of <w> - <w> can be 4k,64k,128k,256k or 1M \n");
printf(" attr: sys.forced.nouserlayout=1 = disables the user settings with user.forced.<xxx>\n");
printf(" attr: sys.forced.nofsselection=1 = disables user defined filesystem selection with environment variables for reads\n");
printf(" attr: sys.forced.bookingsize=<bytes> = set's the number of bytes which get for each new created replica\n");
printf(" attr: sys.stall.unavailable=<sec> = stall clients for <sec> seconds if a needed file system is unavailable\n");
printf(" attr: sys.heal.unavailable=<tries> = try to heal an unavailable file for atleast <tries> times - must be >= 3 !!\n");
printf("'[eos] attr ..' provides the extended attribute interface for directories in EOS.\n");
printf("Usage: attr [OPTIONS] ls|set|get|rm ...\n");
printf("Options:\n");
printf("attr [-r] ls <path> :\n");
printf(" : list attributes of path\n");
printf(" -r : list recursive on all directory children\n");
printf("attr [-r] set <key>=<value> <path> :\n");
printf(" : set attributes of path (-r recursive)\n");
printf(" -r : set recursive on all directory children\n");
printf("attr [-r] get <key> <path> :\n");
printf(" : get attributes of path (-r recursive)\n");
printf(" -r : get recursive on all directory children\n");
printf("attr [-r] rm <key> <path> :\n");
printf(" : delete attributes of path (-r recursive)\n\n");
printf(" -r : delete recursive on all directory children\n");
printf("If <key> starts with 'sys.' you have to be member of the sudoer group to see this attributes or modify.\n\n");
printf("Administrator Variables:\n");
printf(" sys.forced.space=<space> : enforces to use <space> [configuration dependend]\n");
printf(" sys.forced.layout=<layout> : enforces to use <layout> [<layout>=(plain,replica,raid5)]\n");
printf(" sys.forced.checksum=<checksum> : enforces to use file-level checksum <checksum>\n");
printf(" <checksum> = adler,crc32,crc32c,md5,sha\n");
printf(" sys.forced.blockchecksum=<checksum> : enforces to use block-level checksum <checksum>\n");
printf(" <checksuM> = adler,crc32,crc32c,md5,sha\n");
printf(" sys.forced.nstripes=<n> : enforces to use <n> stripes[<n>= 1..16]\n");
printf(" sys.forced.blocksize=<w> : enforces to use a blocksize of <w> - <w> can be 4k,64k,128k,256k or 1M \n");
printf(" sys.forced.nouserlayout=1 : disables the user settings with user.forced.<xxx>\n");
printf(" sys.forced.nofsselection=1 : disables user defined filesystem selection with environment variables for reads\n");
printf(" sys.forced.bookingsize=<bytes> : set's the number of bytes which get for each new created replica\n");
printf(" sys.stall.unavailable=<sec> : stall clients for <sec> seconds if a needed file system is unavailable\n");
printf(" sys.heal.unavailable=<tries> : try to heal an unavailable file for atleast <tries> times - must be >= 3 !!\n");
printf(" - the product <heal-tries> * <stall-time> should be bigger than the expect replication time for a given filesize!\n\n");
printf(" attr: sys.redirect.enoent=<host[:port]> = redirect clients opening non existing files to <host[:port]>\n");
printf(" sys.redirect.enoent=<host[:port]> : redirect clients opening non existing files to <host[:port]>\n");
printf(" => hence this variable has to be set on the directory at level 2 in the eos namespace e.g. /eog/public \n\n");
printf(" attr: sys.acl=<acllist> = set's an ACL which is honoured for open,rm & rmdir operations\n");
printf(" sys.acl=<acllist> : set's an ACL which is honoured for open,rm & rmdir operations\n");
printf(" => <acllist> = <rule1>,<rule2>...<ruleN> is a comma separated list of rules\n");
printf(" => <rule> = u|g|egroup:<name>:{rwo} \n\n");
printf(" Example: u:300:rw,g:400:rwo:egroup:eos-dev:rw\n\n");
printf(" => <rule> = u:<uid|username>>|g:<gid|groupname>|egroup:<name>:{rwo} \n\n");
printf(" e.g.: <acllist=\"u:300:rw,g:z2:rwo:egroup:eos-dev:rw\"\n\n");
printf(" => user id 300 can read + write\n");
printf(" => group id 400 can read + write-once (create new files but can't delete)\n");
printf(" => group z2 can read + write-once (create new files but can't delete)\n");
printf(" => members of egroup 'eos-dev' can read & write\n");
printf(" User Variables:\n");
printf(" -----------------------\n");
printf(" attr: user.forced.space=<space> = s.a.\n");
printf(" attr: user.forced.layout=<layout> = s.a.\n");
printf(" attr: user.forced.checksum=<checksum> = s.a.\n");
printf(" attr: user.forced.blockchecksum=<checksum>= s.a.\n");
printf(" attr: user.forced.nstripes=<n> = s.a.\n");
printf(" attr: user.forced.blocksize=<w> = s.a.\n");
printf(" attr: user.forced.nouserlayout=1 = s.a.\n");
printf(" attr: user.forced.nofsselection=1 = s.a.\n");
printf(" attr: user.stall.unavailable=<sec> = s.a.\n");
printf(" attr: user.acl=<acllist> = s.a.\n");
printf(" attr: user.tag=<tag> = - tag to group files for scheduling and flat file distribution\n");
printf(" - use this tag to define datasets (if <tag> contains space use tag with quotes)\n");
printf("User Variables:\n");
printf(" user.forced.space=<space> : s.a.\n");
printf(" user.forced.layout=<layout> : s.a.\n");
printf(" user.forced.checksum=<checksum> : s.a.\n");
printf(" user.forced.blockchecksum=<checksum> : s.a.\n");
printf(" user.forced.nstripes=<n> : s.a.\n");
printf(" user.forced.blocksize=<w> : s.a.\n");
printf(" user.forced.nouserlayout=1 : s.a.\n");
printf(" user.forced.nofsselection=1 : s.a.\n");
printf(" user.stall.unavailable=<sec> : s.a.\n");
printf(" user.acl=<acllist> : s.a.\n");
printf(" user.tag=<tag> : Tag <tag> to group files for scheduling and flat file distribution. Use this tag to define datasets (if <tag> contains space use tag with quotes)\n");
return (0);
}
......@@ -6,20 +6,33 @@
int
com_cd (char *arg) {
static XrdOucString opwd="/";
static XrdOucString oopwd="/";
XrdOucString lsminuss;
XrdOucString newpath;
XrdOucString oldpwd;
if (!strcmp(arg,"--help") || !strcmp(arg,"-h"))
goto com_cd_usage;
// cd -
if (!strcmp(arg,"-")) {
oopwd = opwd;
arg = (char*) opwd.c_str();
fprintf(stderr,"setting arg to %s\n", arg);
}
opwd=pwd;
XrdOucString newpath=abspath(arg);
XrdOucString oldpwd = pwd;
newpath =abspath(arg);
oldpwd = pwd;
// cd ~ (home)
if (!arg || (!strlen(arg)) || (!strcmp(arg,"~"))) {
if (getenv("EOS_HOME")) {
newpath = abspath(getenv("EOS_HOME"));
} else {
fprintf(stderr,"warning: there is no home directory defined via EOS_HOME\n");
newpath = opwd;
}
}
......@@ -31,7 +44,8 @@ com_cd (char *arg) {
// filter "/./";
while (pwd.replace("/./","/")) {}
// filter "..";
int dppos=0;
int dppos;
dppos=0;
while ( (dppos=pwd.find("/../")) != STR_NPOS) {
if (dppos==0) {
pwd = oldpwd;
......@@ -53,10 +67,24 @@ com_cd (char *arg) {
// check if this exists, otherwise go back to oldpwd
XrdOucString lsminuss = "mgm.cmd=ls&mgm.path="; lsminuss += pwd;lsminuss+= "&mgm.option=s";
lsminuss = "mgm.cmd=cd&mgm.path="; lsminuss += pwd;lsminuss+= "&mgm.option=s";
global_retc = output_result(client_user_command(lsminuss));
if (global_retc) {
pwd = oldpwd;
}
return (0);
com_cd_usage:
printf("'[eos] cd ...' provides the namespace change directory command in EOS.\n");
printf("Usage: cd <dir>|-|..|~\n");
printf("Options:\n");
printf("cd <dir> :\n");
printf(" change into direcotry <dir>. If it does not exist, the current directory will stay as before!\n");
printf("cd - :\n");
printf(" change into the previous directory\n");
printf("cd .. :\n");
printf(" change into the directory one level up\n");
printf("cd ~ :\n");
printf(" change into the directory defined via the environment variable EOS_HOME\n");
return (0);
}
......@@ -34,9 +34,10 @@ com_chown (char* arg1) {
return (0);
com_chown_usage:
printf("usage: chown [-r] <owner>[:<group>] <path> : set owner for <path> (-r recursive)\n");
printf(" <owner> has to be a virtual user id\n");
printf(" <group> has to be a virtual group id\n");
printf("Usage: chown [-r] <owner>[:<group>] <dir-path>\n");
printf("'[eos] chown ..' provides the change owner interface of EOS.\n");
printf("<dir-path> is the directory to modify, <owner> has to be a user id or user name. <group> is optional and has to be a group id or group name. Remark: EOS has no ownership on file level!\n\n");
printf("Options:\n");
printf(" -r : recursive\n");
return (0);
}
......@@ -5,6 +5,12 @@
/* Clear the terminal screen */
int
com_clear (char *arg) {
if (!strcmp(arg,"-h") || (!strcmp(arg,"--help"))) {
printf("Usage: clear\n");
printf("'[eos] clear' is equivalent to the interactive shell command to clear the screen.\n");
return (0);
}
int rc = system("clear");
return (rc);
return (rc);
}
......@@ -174,24 +174,36 @@ com_config (char* arg1) {
}
com_config_usage:
printf("usage: config ls [--backup|-b] : list existing configurations\n");
printf("usage: config dump [--fs|-f] [--vid|-v] [--quota|-q] [--policy|-p] [--comment|-c] [--global|-g] [--access|-a] [<name>]\n");
printf(" : dump current configuration or configuration with name <name>\n");
printf(" -f : dump only file system config\n");
printf(" -v : dump only virtual id config\n");
printf(" -q : dump only quota config\n");
printf(" -p : dump only policy config\n");
printf(" -g : dump only global config\n");
printf(" -a : dump only access config\n");
printf("Usage: config ls|dump|load|save|diff|changelog|reset|autosave [OPTIONS]\n");
printf("'[eos] config' provides the configuration interface to EOS.\n\n");
printf("Options:\n");
printf("config ls [--backup|-b] :\n");
printf(" list existing configurations\n");
printf(" --backup|-b : show also backup & autosave files\n");
printf("usage: config save [-f] [<name>] [--comment|-c \"<comment>\"] ] : save config (optionally under name)\n");
printf(" -f : overwrite existing config name and create a timestamped backup\n");
printf(" => if no name is specified the current config file is overwritten \n");
printf("usage: config load <name> : load config (optionally with name)\n");
printf("usage: config diff : show changes since last load/save operation\n");
printf("usage: config changelog [-#lines] : show the last <#> lines from the changelog - default is -10 \n");
printf("usage: config reset : reset all configuration to empty state\n");
printf("usage: config autosave [on|off] : without on/off just prints the state otherwise set's autosave to on or off\n");
printf("config dump [--fs|-f] [--vid|-v] [--quota|-q] [--policy|-p] [--comment|-c] [--global|-g] [--access|-a] [<name>]: \n");
printf(" dump current configuration or configuration with name <name>\n");
printf(" -f : dump only file system config\n");
printf(" -v : dump only virtual id config\n");
printf(" -q : dump only quota config\n");
printf(" -p : dump only policy config\n");
printf(" -g : dump only global config\n");
printf(" -a : dump only access config\n");
printf("config save [-f] [<name>] [--comment|-c \"<comment>\"] ] :\n");
printf(" save config (optionally under name)\n");
printf(" -f : overwrite existing config name and create a timestamped backup\n");
printf("=> if no name is specified the current config file is overwritten\n\n");
printf("config load <name> :\n");
printf(" load config (optionally with name)\n");
printf("config diff :\n");
printf(" show changes since last load/save operation\n");
printf("config changelog [-#lines] :\n");
printf(" show the last <#> lines from the changelog - default is -10 \n");
printf("config reset :\n");
printf(" reset all configuration to empty state\n");
printf("config autosave [on|off] :\n");
printf(" without on/off just prints the state otherwise set's autosave to on or off\n");
return (0);
}
......@@ -12,46 +12,55 @@ com_debug (char* arg1) {
XrdOucString nodequeue = subtokenizer.GetToken();
XrdOucString filterlist="";
if (level == "this") {
printf("info: toggling shell debugmode to debug=%d\n",debug);
debug = !debug;
if (debug) {
eos::common::Logging::SetLogPriority(LOG_DEBUG);
} else {
eos::common::Logging::SetLogPriority(LOG_NOTICE);
}
return (0);
}
if ( level.length() ) {
XrdOucString in = "mgm.cmd=debug&mgm.debuglevel="; in += level;
if (nodequeue.length()) {
if (nodequeue == "-filter") {
filterlist = subtokenizer.GetToken();
in += "&mgm.filter="; in += filterlist;
if ( (level != "-h") && (level != "--help") ) {
if (level == "this") {
printf("info: toggling shell debugmode to debug=%d\n",debug);
debug = !debug;
if (debug) {
eos::common::Logging::SetLogPriority(LOG_DEBUG);
} else {
in += "&mgm.nodename="; in += nodequeue;
nodequeue = subtokenizer.GetToken();
eos::common::Logging::SetLogPriority(LOG_NOTICE);
}
return (0);
}
if ( level.length() ) {
XrdOucString in = "mgm.cmd=debug&mgm.debuglevel="; in += level;
if (nodequeue.length()) {
if (nodequeue == "-filter") {
filterlist = subtokenizer.GetToken();
in += "&mgm.filter="; in += filterlist;
} else {
in += "&mgm.nodename="; in += nodequeue;
nodequeue = subtokenizer.GetToken();
if (nodequeue == "-filter") {
filterlist = subtokenizer.GetToken();
in += "&mgm.filter="; in += filterlist;
}
}
}
}
global_retc = output_result(client_admin_command(in));
return (0);
}
global_retc = output_result(client_admin_command(in));
return (0);
}
}
printf(" debug <level> [-filter <unitlist>] : set the mgm where this console is connected to into debug level <level>\n");
printf(" debug <node-queue> <level> [-filter <unitlist>] : set the <node-queue> into debug level <level>\n");
printf(" <unitlist> is a string list of units which should be filtered out in the message log !");
printf(" Examples: > debug info *\n");
printf(" > debug info /eos/*/fst\n");
printf(" > debug info /eos/*/mgm\n");
printf(" > debug debug -filter MgmOfsMessage\n");
printf(" debug this : toggle the debug flag for the shell itself\n");
printf("Usage: debug [node-queue] this|<level> [-filter <unitlist>]\n");
printf("'[eos] debug ...' allows to modify the verbosity of the EOS log files in MGM and FST services.\n\n");
printf("Options:\n");
printf("debug <level> [-filter <unitlist>] :\n");
printf(" set the MGM where the console is connected to into debug level <level>\n");
printf("debug <node-queue> <level> [-filter <unitlist>] :\n");
printf(" set the <node-queue> into debug level <level>. <node-queue> are internal EOS names e.g. '/eos/<hostname>:<port>/fst'\n");
printf(" <unitlist> : a comma seperated list of strings of software units which should be filtered out in the message log ! The default filter list is 'Process,AddQuota,UpdateHint,UpdateQuotaStatus,SetConfigValue,Deletion,GetQuota,PrintOut,RegisterNode,SharedHash'.\n\n");
printf("The allowed debug levels are: debug info warning notice err crit alert emerg\n\n");
printf("Examples:\n");
printf(" debug info * set MGM & all FSTs into debug mode 'info'\n\n");
printf(" debug err /eos/*/fst set all FSTs into debug mode 'info'\n\n");
printf(" debug crit /eos/*/mgm set MGM into debug mode 'crit'\n\n");
printf(" debug debug -filter MgmOfsMessage set MGM into debug mode 'debug' and filter only messages comming from unit 'MgmOfsMessage'.\n\n");
return (0);
}
......@@ -343,27 +343,36 @@ com_file (char* arg1) {
return (0);
com_file_usage:
printf("usage: file drop <path> <fsid> [-f] : drop the file <path> from <fsid> - force removes replica without trigger/wait for deletion (used to retire a filesystem) \n");
printf(" file move <path> <fsid1> <fsid2> : move the file <path> from <fsid1> to <fsid2>\n");
printf(" file replicate <path> <fsid1> <fsid2> : replicate file <path> part on <fsid1> to <fsid2>\n");
printf(" file adjustreplica <path>|fid:<fid-dec>|fxid:<fid-hex> [space [subgroup]]\n");
printf(" : tries to bring a files with replica layouts to the nominal replica level [ need to be root ]\n");
printf(" file check <path> [%%size%%checksum%%nrep%%force%%output%%silent] : retrieves stat information from the physical replicas and verifies the correctness\n");
printf("Usage: file drop|move|replicate|adjustreplica|check|info|layout|verify ...\n");
printf("'[eos] file ..' provides the file management interface of EOS.\n");
printf("Options:\n");
printf("file drop <path> <fsid> [-f] :\n");
printf(" drop the file <path> from <fsid> - force removes replica without trigger/wait for deletion (used to retire a filesystem) \n");
printf("file move <path> <fsid1> <fsid2> :\n");
printf(" move the file <path> from <fsid1> to <fsid2>\n");
printf("file replicate <path> <fsid1> <fsid2> :\n");
printf(" replicate file <path> part on <fsid1> to <fsid2>\n");
printf("file adjustreplica <path>|fid:<fid-dec>|fxid:<fid-hex> [space [subgroup]] :\n");
printf(" tries to bring a files with replica layouts to the nominal replica level [ need to be root ]\n");
printf("file check <path> [%%size%%checksum%%nrep%%force%%output%%silent] :\n");
printf(" retrieves stat information from the physical replicas and verifies the correctness\n");
printf(" - %%size : return with an error code if there is a mismatch between the size meta data information\n");
printf(" - %%checksum : return with an error code if there is a mismatch between the checksum meta data information\n");
printf(" - %%nrep : return with an error code if there is a mismatch between the layout number of replicas and the existing replicas\n");
printf(" - %%silent : suppresses all information for each replic to be printed\n");
printf(" - %%force : forces to get the MD even if the node is down\n");
printf(" - %%output : prints lines with inconsitency information\n");
printf(" file info <path> : convenience function aliasing to 'fileinfo' command\n");
printf(" file layout <path>|fid:<fid-dec>|fxid:<fid-hex> -stripes <n> : change the number of stripes of a file with replica layout to <n>\n");
printf(" file verify <path>|fid:<fid-dec>|fxid:<fid-hex> [<fsid>] [-checksum] [-commitchecksum] [-commitsize] [-rate <rate>] \n");
printf(" : verify a file against the disk images\n");
printf(" <fsid> : verifies only the replica on <fsid>\n");
printf(" -checksum : trigger the checksum calculation during the verification process\n");
printf(" -commitchecksum : commit the computed checksum to the MGM\n");
printf(" -commitsize : commit the file size to the MGM\n");
printf(" -rate <rate> : restrict the verification speed to <rate> per node\n");
printf("file info <path> :\n");
printf(" convenience function aliasing to 'fileinfo' command\n");
printf("file layout <path>|fid:<fid-dec>|fxid:<fid-hex> -stripes <n> :\n");
printf(" change the number of stripes of a file with replica layout to <n>\n");
printf("file verify <path>|fid:<fid-dec>|fxid:<fid-hex> [<fsid>] [-checksum] [-commitchecksum] [-commitsize] [-rate <rate>] : \n");
printf(" verify a file against the disk images\n");
printf(" <fsid> : verifies only the replica on <fsid>\n");
printf(" -checksum : trigger the checksum calculation during the verification process\n");
printf(" -commitchecksum : commit the computed checksum to the MGM\n");
printf(" -commitsize : commit the file size to the MGM\n");
printf(" -rate <rate> : restrict the verification speed to <rate> per node\n");
return (0);
}
......@@ -120,6 +120,14 @@ The EOS shell client.
# documentation
%doc %_mandir/man1/eos.1.gz
%doc %_mandir/man1/eos::fs.1.gz
%doc %_mandir/man1/eos::access.1.gz
%doc %_mandir/man1/eos::attr.1.gz
%doc %_mandir/man1/eos::cd.1.gz
%doc %_mandir/man1/eos::chown.1.gz
%doc %_mandir/man1/eos::clear.1.gz
%doc %_mandir/man1/eos::config.1.gz
%doc %_mandir/man1/eos::debug.1.gz
%doc %_mandir/man1/eos::file.1.gz
#######################################################################################
......
......@@ -7,7 +7,6 @@ add_library (XrdEosFst MODULE
layout/ReplicaLayout.cc
layout/ReplicaParLayout.cc
checksum/CheckSum.cc
transfer/Transfer.cc
storage/Storage.cc
Config.cc
Load.cc
......
......@@ -2,7 +2,6 @@
#include "fst/Messaging.hh"
#include "fst/Deletion.hh"
#include "fst/Verify.hh"
#include "fst/transfer/Transfer.hh"
#include "fst/XrdFstOfs.hh"
/*----------------------------------------------------------------------------*/
......@@ -97,44 +96,6 @@ Messaging::Process(XrdMqMessage* newmessage)
}
}
if (cmd == "pull") {
eos_info("pull");
XrdOucEnv* capOpaque=NULL;
int caprc = 0;
if ((caprc=gCapabilityEngine.Extract(&action, capOpaque))) {
// no capability - go away!
if (capOpaque) delete capOpaque;
eos_err("Cannot extract capability for transfer - errno=%d",caprc);
} else {
int envlen=0;
eos_debug("opaque is %s", capOpaque->Env(envlen));
Transfer* newtransfer = Transfer::Create(capOpaque, saction);
if (newtransfer) {
gOFS.Storage->transferMutex.Lock();
if (gOFS.Storage->transfers.size() < 1000000) {
XrdOucString squeuefront = capOpaque->Get("mgm.queueinfront");
if (squeuefront == "1") {
// this is an express transfer to be queued in front of the list
eos_info("scheduling express transfer %llu", capOpaque->Get("mgm.fid"));
gOFS.Storage->transfers.insert(gOFS.Storage->transfers.begin(), newtransfer);
} else {
// this is a regual transfer to be appended to the end of the list
eos_info("scheduling regular transfer %llu", capOpaque->Get("mgm.fid"));
gOFS.Storage->transfers.push_back(newtransfer);
}
} else {
eos_err("transfer list has already 1 Mio. entries - discarding transfer message");
}
gOFS.Storage->transferMutex.UnLock();
} else {
eos_err("Cannot create a transfer entry - illegal opaque information");
}
}
}
if (cmd == "verify") {
eos_info("verify");
......@@ -187,26 +148,6 @@ Messaging::Process(XrdMqMessage* newmessage)
}
gOFS.Storage->verificationsMutex.UnLock();
}
if (cmd == "droptransfers") {
gOFS.Storage->transferMutex.Lock();
eos_notice("dropping %u transfers", gOFS.Storage->transfers.size());
gOFS.Storage->transfers.clear();
gOFS.Storage->transferMutex.UnLock();
}
if (cmd == "listtransfers") {
gOFS.Storage->transferMutex.Lock();
std::list<eos::fst::Transfer*>::iterator it;
for ( it = gOFS.Storage->transfers.begin(); it != gOFS.Storage->transfers.end(); ++it) {
(*it)->Show();
}
eos_notice("%u transfers in transfer queue", gOFS.Storage->transfers.size());
if (gOFS.Storage->runningTransfer) {
gOFS.Storage->runningTransfer->Show("running");
}
gOFS.Storage->transferMutex.UnLock();
}
}
EOSFSTNAMESPACE_END
......@@ -161,8 +161,6 @@ Storage::Storage(const char* metadirectory)
{
SetLogId("FstOfsStorage");
runningTransfer = 0;
// make metadir
XrdOucString mkmetalogdir = "mkdir -p "; mkmetalogdir += metadirectory; mkmetalogdir += " >& /dev/null";
system(mkmetalogdir.c_str());
......@@ -220,13 +218,6 @@ Storage::Storage(const char* metadirectory)
zombie = true;
}
eos_info("starting replication thread");
if ((rc = XrdSysThread::Run(&tid, Storage::StartFsPulling, static_cast<void *>(this),
0, "Data Pulling Thread"))) {
eos_crit("cannot start pulling thread");
zombie = true;
}
eos_info("starting report thread");
if ((rc = XrdSysThread::Run(&tid, Storage::StartFsReport, static_cast<void *>(this),
0, "Report Thread"))) {
......@@ -521,15 +512,6 @@ Storage::StartFsRemover(void * pp)
/*----------------------------------------------------------------------------*/
void*
Storage::StartFsPulling(void * pp)
{
Storage* storage = (Storage*)pp;
storage->Pulling();
return 0;
}
/*----------------------------------------------------------------------------*/
void*
Storage::StartFsReport(void * pp)
{
Storage* storage = (Storage*)pp;
......@@ -836,58 +818,6 @@ Storage::Remover()
/*----------------------------------------------------------------------------*/
void
Storage::Pulling()
{
// this thread pulls files from other nodes
while(1) {
sleep(1);
transferMutex.Lock();
if (transfers.size())
eos_static_debug("%u files to transfer",transfers.size());
bool more = false;
std::list<Transfer*>::iterator it;
do {
more = false;
for ( it = transfers.begin(); it != transfers.end(); ++it) {
int retc=0;
(*it)->Debug();
if ( (*it)->ShouldRun() ) {
Transfer* transfer=*it;
more = true;
// remove it from the list
runningTransfer = transfer;
transfers.erase(it);
transferMutex.UnLock();
retc = transfer->Do();
// try the transfer here
transferMutex.Lock();
runningTransfer = 0;
if (retc) {
if (transfer->ShouldRetry()) {
// reschedule
transfer->Reschedule(300);
// push it back on the list
transfers.push_back(transfer);
}
break;
} else {
// delete the transfer object
delete transfer;
break;
}
}
}
} while (more);
transferMutex.UnLock();
}
}
/*----------------------------------------------------------------------------*/
void
Storage::Report()
{
// this thread send's report messages from the report queue
......
......@@ -6,7 +6,6 @@
#include "common/Statfs.hh"
#include "common/FileSystem.hh"
#include "common/RWMutex.hh"
#include "fst/transfer/Transfer.hh"
#include "fst/Deletion.hh"
#include "fst/Verify.hh"
#include "fst/Load.hh"
......@@ -98,7 +97,6 @@ public:
static void* StartFsScrub(void * pp);
static void* StartFsTrim(void* pp);
static void* StartFsRemover(void* pp);
static void* StartFsPulling(void* pp);
static void* StartFsReport(void* pp);
static void* StartFsVerify(void* pp);
static void* StartFsPublisher(void* pp);
......@@ -106,7 +104,6 @@ public:
void Scrub();
void Trim();
void Remover();