Presentation is loading. Please wait.

Presentation is loading. Please wait.

XROOTD Tutorial Part 2 – the bundles Fabrizio Furano.

Similar presentations


Presentation on theme: "XROOTD Tutorial Part 2 – the bundles Fabrizio Furano."— Presentation transcript:

1 XROOTD Tutorial Part 2 – the bundles Fabrizio Furano

2 Why bundles? We have just had an experience with a very simple setup, with no clustering, no tapes, no WAN stuff… We have just had an experience with a very simple setup, with no clustering, no tapes, no WAN stuff… The config can become very complex, a lot of parameters can be modified/tuned The config can become very complex, a lot of parameters can be modified/tuned Several plugins (also third-party) may be needed Several plugins (also third-party) may be needed Many of the parameters are not related to basic file serving Many of the parameters are not related to basic file serving Sometimes the requirements are complex, hence the config can get complex Sometimes the requirements are complex, hence the config can get complex The idea was to have a ‘ready-go’ approach The idea was to have a ‘ready-go’ approach Setup + configure only basic stuff to have a pre-configured full system Setup + configure only basic stuff to have a pre-configured full system Eventually create an RPM Eventually create an RPM The most famous is the one used by ALICE, a very generic setup but with a lot of advanced features The most famous is the one used by ALICE, a very generic setup but with a lot of advanced features There is at least one more example around There is at least one more example around XROOTD tutorial - GridKA school 20102

3 The vMSS (1/2) A very good example of encapsulated complexity that comes with the most widely used bundle. A very good example of encapsulated complexity that comes with the most widely used bundle. Different sites can be clustered and participate to a global name space Different sites can be clustered and participate to a global name space They subscribe to the so-called Global Redirector They subscribe to the so-called Global Redirector Each site thinks that it has a tape-like backend Each site thinks that it has a tape-like backend Instead it is not tape, it’s the possibility of fetching files from an external xrootd cluster Instead it is not tape, it’s the possibility of fetching files from an external xrootd cluster This cluster can be external or can be made by the same sites clusterized together This cluster can be external or can be made by the same sites clusterized together Testing this thing is very difficult. This is why it comes in an encapsulated way. Testing this thing is very difficult. This is why it comes in an encapsulated way. Also… an error in a site may be caused by an issue in another one. Also… an error in a site may be caused by an issue in another one. XROOTD tutorial - GridKA school 20103

4 The vMSS (2/2) XROOTD tutorial - GridKA school 20104 Xrootd site A globalized cluster global redirector Local clients work Normally at each site Missing a file? The storage asks to the global redirector Gets redirected to the right collaborating cluster, and fetches it. Immediately. A smart client could point here Any other Xrootd site Cmsd Xrootd Virtual Mass Storage System … built on data Globalization

5 Xrd-installer xrd-installer [--install] [-h] [-l] [n] [-p packagename] [--prefix install-prefix] [--version version] [--compiledir compile-directory] [--noclean] where the meaning of the switches is: -l : list packages -p name : select package -n : don't install autotools --noclean : don't cleanup the compilation directory --install : install all packages or the selected packages with -p option --prefix : set the installation prefix (default /home/alientest/xrdserver) --version : select the version to install (default is PRO) --compiledir XROOTD tutorial - GridKA school 20105

6 Simplified setup The xrd-installer setup is similar to a meta-package The xrd-installer setup is similar to a meta-package Originally developed by A.Peters and D.Feichtinger Originally developed by A.Peters and D.Feichtinger Usage: same of before Usage: same of before Download the installer script Download the installer script wget http://project-arda-dev.web.cern.ch/project-arda-dev/xrootd/tarballs/installbox/xrd- installer wget http://project-arda-dev.web.cern.ch/project-arda-dev/xrootd/tarballs/installbox/xrd- installer Run it as NON-root user Run it as NON-root user xrd-installer –install –prefix= [--version= ] xrd-installer –install –prefix= [--version= ] Then, a small file contains the important parameters (about 10) Then, a small file contains the important parameters (about 10) Geeks can also use the internal xrootd config file template Geeks can also use the internal xrootd config file template And have access to really everything And have access to really everything Needed only for very particular things, i.e. almost never Needed only for very particular things, i.e. almost never XROOTD tutorial - GridKA school 20106

7 Watchdog The xrd-installer related scripts provide a very useful watchdogging feature The xrd-installer related scripts provide a very useful watchdogging feature Every 5 minutes the status of the daemons is checked Every 5 minutes the status of the daemons is checked If it’s not OK then they are restarted If it’s not OK then they are restarted Clients do not crash, they are able to cope with that Clients do not crash, they are able to cope with that This means that, if the intervention time is small, one can upgrade servers without draining jobs This means that, if the intervention time is small, one can upgrade servers without draining jobs Some setups accept the WAN traffic, so the concept of ‘draining’ does not apply Some setups accept the WAN traffic, so the concept of ‘draining’ does not apply In my experience, the downtime for an upgrade is <1 minute In my experience, the downtime for an upgrade is <1 minute XROOTD tutorial - GridKA school 20107

8 Pre-requirements (1/3) Software pre-requirements Software pre-requirements Libxml2 (lib+headers) Libxml2 (lib+headers) Often used by authz plugins Often used by authz plugins openssl (lib+headers) openssl (lib+headers) The xrootd authz plugins are built around this The xrootd authz plugins are built around this Autoconf/libtool Autoconf/libtool Several 3 rd party plugins use this Several 3 rd party plugins use this Swig Swig Needed to build the perl interface to xrootd Needed to build the perl interface to xrootd Zlib Zlib Needed to calculate checksums in xrdcp Needed to calculate checksums in xrdcp XROOTD tutorial - GridKA school 20108

9 Pre-requirements (2/3) These are the names for SLC5.4 These are the names for SLC5.4 For other distros they could be slightly different For other distros they could be slightly different XROOTD tutorial - GridKA school 20109

10 Pre-requirements (3/3) The fds … before The fds … before Bad! Bad! … after … after Good! Good! XROOTD tutorial - GridKA school 201010

11 Bundled setup XROOTD tutorial - GridKA school 201011

12 Several bundles The idea is that an experiment (or a group) relies on a pre- configured bundle for an homogeneous set of sites The idea is that an experiment (or a group) relies on a pre- configured bundle for an homogeneous set of sites Built on their requirements Built on their requirements Hence, we may think as if several flavors exist Hence, we may think as if several flavors exist Once one has the name of the flavor, this can be specified with the --version= parameter Once one has the name of the flavor, this can be specified with the --version= parameter We will play with the most used one. We will play with the most used one. A generic setup with advanced features A generic setup with advanced features Global redirection support Global redirection support 2 ALICE plugins (that will be left disabled, we don’t need) 2 ALICE plugins (that will be left disabled, we don’t need) We are going to setup our class-wide cluster! We are going to setup our class-wide cluster! XROOTD tutorial - GridKA school 201012

13 Compilation All the packages are compiled for the platform in use All the packages are compiled for the platform in use If all the pre-reqs are met generally there are no troubles If all the pre-reqs are met generally there are no troubles If any of the results looks like “FAILED”, well … If any of the results looks like “FAILED”, well … We must understand why, fix the problem We must understand why, fix the problem And redo it again And redo it again XROOTD tutorial - GridKA school 201013

14 Compilation troubles? All the packages, d/l logs, configure logs, make logs are kept into /tmp/xrd-installer All the packages, d/l logs, configure logs, make logs are kept into /tmp/xrd-installer Have a check on the directory structure: one directory per plugin Have a check on the directory structure: one directory per plugin XROOTD tutorial - GridKA school 201014

15 System.cnf This is the meta-configuration file, available in This is the meta-configuration file, available in<path>/etc/xrootd/system.cnf It hosts only “easy” parameters It hosts only “easy” parameters Internally, it is processed and the true xrootd config files are created from it. Internally, it is processed and the true xrootd config files are created from it. It’s supposed to cover: It’s supposed to cover: 90% of the generic requirements about xrootd deployment 90% of the generic requirements about xrootd deployment 101% of the requirements of the group/experiment that creates a bundle for its sites 101% of the requirements of the group/experiment that creates a bundle for its sites XROOTD tutorial - GridKA school 201015

16 A note on the file descriptors The purpose of a server is to handle clients The purpose of a server is to handle clients What else? Otherwise it is useless What else? Otherwise it is useless Hence the machine has to be configured as a server, meaning typically: Hence the machine has to be configured as a server, meaning typically: Good TCP configuration Good TCP configuration The SLC defaults are often very bad The SLC defaults are often very bad Look here: http://monalisa.cern.ch/FDT/documentation_syssettings.html Look here: http://monalisa.cern.ch/FDT/documentation_syssettings.html http://monalisa.cern.ch/FDT/documentation_syssettings.html All the OS resources are available All the OS resources are available Max overall number of file descriptors (per machine, not per user) Max overall number of file descriptors (per machine, not per user) The max # of file descriptors per user is >65000 The max # of file descriptors per user is >65000 In the Alien Howtos there is a good recipe for that In the Alien Howtos there is a good recipe for that http://alien.cern.ch/twiki/bin/view/AliEnHowToInstallXrootdNew http://alien.cern.ch/twiki/bin/view/AliEnHowToInstallXrootdNew http://alien.cern.ch/twiki/bin/view/AliEnHowToInstallXrootdNew Even too much for most distros. Follow it until the requirement is met. Even too much for most distros. Follow it until the requirement is met. Xrootd will not start if this is not met. Xrootd will not start if this is not met. XROOTD tutorial - GridKA school 2010 16

17 Important config options Important config options VMSS_SOURCE: where this cluster tries to fetch files from, in the case they are absent. LOCALPATHPFX: the prefix of the namespace which has to be made "facultative” (not needed by everybody) LOCALROOT is the local (relative to the mounted disks) place where all the data (or the namespace) is put/kept by the xrootd server. OSSCACHE: probably your server has more than one disk to use to store data. Here you list the mountpoints where the data is stored. MANAGERHOST: the redirector’s name SERVERONREDIRECTOR: is this machine both a server and redirector? OFSLIB: the filesystem plugin library to be used in xrootd. May be the ALICE particular authz plugin. METAMGRHOST, METAMGRPORT: host and port number of the meta-manager (global redirector) where to subscribe. XRDUSER The name of the user which runs the daemons (e.g. xrootd, aliprod) XROOTD tutorial - GridKA school 201017

18 Config options MANAGERHOST MANAGERHOST The name of the machine hosting the redirector The name of the machine hosting the redirector Execute in the redirector machine: Execute in the redirector machine: hostname –f and copy/paste the result hostname –f and copy/paste the result The redirector and all the data servers will understand their role from this information The redirector and all the data servers will understand their role from this information Automagically Automagically So, this string must be the same for all the machines of the cluster So, this string must be the same for all the machines of the cluster XROOTD tutorial - GridKA school 2010 18

19 Config options SERVERONREDIRECTOR SERVERONREDIRECTOR Is your cluster small (1-2-3 machines)? Is your cluster small (1-2-3 machines)? If so, you can use a machine to host BOTH the redirector services and the data server services. If you like this, put “1” If so, you can use a machine to host BOTH the redirector services and the data server services. If you like this, put “1” You need decent hw to do that You need decent hw to do that Reconsider this when you add new servers Reconsider this when you add new servers Otherwise put “0” (zero) Otherwise put “0” (zero) XROOTD tutorial - GridKA school 2010 19

20 Config options XRDUSER XRDUSER The daemons will be run under a user’s credentials The daemons will be run under a user’s credentials Typically everybody uses “xrootd” Typically everybody uses “xrootd” Write here the name of this system user Write here the name of this system user MAKE SURE IT EXISTS MAKE SURE IT EXISTS MAKE SURE IT HAS A HOME DIRECTORY MAKE SURE IT HAS A HOME DIRECTORY MAKE SURE IT’S NOT ROOT MAKE SURE IT’S NOT ROOT XROOTD tutorial - GridKA school 2010 20

21 Config options METAMGRHOST, METAMGRPORT METAMGRHOST, METAMGRPORT This is the address of the Global redirector This is the address of the Global redirector Through this, this cluster is accessible in the global domain Through this, this cluster is accessible in the global domain VMSS_SOURCE VMSS_SOURCE Also this is the URL prefix that points to the Global Redirector Also this is the URL prefix that points to the Global Redirector Through this, the cluster auto-feeds itself from the global domain in the case of missing files opened for READ Through this, the cluster auto-feeds itself from the global domain in the case of missing files opened for READ XROOTD tutorial - GridKA school 2010 21

22 Config options OFSLIB OFSLIB Namely, the name of the filesystem plugin used Namely, the name of the filesystem plugin used The way the ALICE strong auth works The way the ALICE strong auth works Specify TokenAuthzOfs to enable the ALICE authz Specify TokenAuthzOfs to enable the ALICE authz Mandatory for ALICE Mandatory for ALICE Writing is only allowed via the auth of the central services Writing is only allowed via the auth of the central services Specify Ofs to use the default xrootd plugin Specify Ofs to use the default xrootd plugin XROOTD tutorial - GridKA school 2010 22

23 Config options LOCALROOT LOCALROOT The place where the xrootd daemon puts the written data The place where the xrootd daemon puts the written data Something like: Something like: /mydisk1/xrdfiles/ /mydisk1/xrdfiles/ If you are aggregating multiple partitions (OSSCACHE option) then you will put something like this: If you are aggregating multiple partitions (OSSCACHE option) then you will put something like this: /mydisk1/data/xrdnamespace /mydisk1/data/xrdnamespace This is going to be your most important directory This is going to be your most important directory Keep it separated from the others! Keep it separated from the others! Technically you don’t need to back it up, in the case of disasters the best thing to do is to recreate it Technically you don’t need to back it up, in the case of disasters the best thing to do is to recreate it XROOTD tutorial - GridKA school 2010 23

24 Config options LOCALPATHPFX LOCALPATHPFX Makes a part of the paths optional. In order to create an internal aliasing. Makes a part of the paths optional. In order to create an internal aliasing. If the path does not start with this pfx, then it is prepended If the path does not start with this pfx, then it is prepended If the path already starts with this pfx, it’s left as it is If the path already starts with this pfx, it’s left as it is The “old style” local prefix to the ALICE data (if this is an ALICE SE…) The “old style” local prefix to the ALICE data (if this is an ALICE SE…) Almost nobody is using it (hopefully) Almost nobody is using it (hopefully) Hence, it’s generally an empty string, except for very particular cases Hence, it’s generally an empty string, except for very particular cases XROOTD tutorial - GridKA school 2010 24

25 Config options OSSCACHE OSSCACHE Here you list (with the xrootd syntax) the xrootd config lines that configure the cache file system, separated by “\n” Here you list (with the xrootd syntax) the xrootd config lines that configure the cache file system, separated by “\n” e.g. if your machine can use as raw storage e.g. if your machine can use as raw storage /data/disk1 and /data/disk1 and /data/disk2 /data/disk2 HINT: don’t put data in the root dir of a mountpoint. It works but it’s uncomfortable… then do: HINT: don’t put data in the root dir of a mountpoint. It works but it’s uncomfortable… then do: “oss.cache public /data/disk1/xrddata\noss.cache public /data/disk2/xrddata” “oss.cache public /data/disk1/xrddata\noss.cache public /data/disk2/xrddata” XROOTD tutorial - GridKA school 2010 25

26 Setup: start and stop XROOTD tutorial - GridKA school 2010 Check the status of the daemons Check the status of the daemons /xrd.sh /xrd.sh Check the status of the daemons and start the ones which are currently not running (and make sure they are checked every 5 mins). Also do the log rotation. Check the status of the daemons and start the ones which are currently not running (and make sure they are checked every 5 mins). Also do the log rotation. / xrd.sh -c / xrd.sh -c Force a restart of all daemons Force a restart of all daemons /xrd.sh -f /xrd.sh -f Stop all daemons Stop all daemons /xrd.sh -k /xrd.sh -k 26

27 Logfiles The logfiles are gathered in the same place: The logfiles are gathered in the same place:<install_path>/logs<install_path>/logs/server (if this machine is running a data server) <install_path>/logs/manager (if this machine is running a manager/redirector) We are interested mainly in ‘xrdlog’ and ‘cmslog’ We are interested mainly in ‘xrdlog’ and ‘cmslog’ This is what you are asked for in the case of reports or requests for assistance This is what you are asked for in the case of reports or requests for assistance XROOTD tutorial - GridKA school 201027

28 Let’s do it (1/5) Exercise… we will: Exercise… we will: setup an xrootd data server in each machine setup an xrootd data server in each machine clusterize them all into ONE cluster clusterize them all into ONE cluster Play with xrdcp and xrd to familiarize Play with xrdcp and xrd to familiarize XROOTD tutorial - GridKA school 201028

29 Let’s do it (2/5) You are now xrd-installer experts You are now xrd-installer experts Eventually scratch the previous attempts (before you have to kill the daemons with xrd.sh!!) Eventually scratch the previous attempts (before you have to kill the daemons with xrd.sh!!) If you just kill them with kill they will pop up again If you just kill them with kill they will pop up again OR… install the new one in a parallel directory OR… install the new one in a parallel directory E.g. /home/xrootd/xrdinstall2 E.g. /home/xrootd/xrdinstall2 Configure it completely Configure it completely Stop the previous one with /xrd.sh –k Stop the previous one with /xrd.sh –k This also removes the watchdog This also removes the watchdog Start the new one with /xrd.sh –f Start the new one with /xrd.sh –f XROOTD tutorial - GridKA school 201029

30 Let’s do it (3/5) When the crude setup/compilation is done, we have to fill system.cnf When the crude setup/compilation is done, we have to fill system.cnf We want to export the common namespace /gridka2010 We want to export the common namespace /gridka2010 Choose a suitable place where to put 2 fake mountpoints Choose a suitable place where to put 2 fake mountpoints In practice 2 directories In practice 2 directories Use those directories as you would use mountpoints Use those directories as you would use mountpoints XROOTD tutorial - GridKA school 201030

31 Let’s do it (4/5) The clusterization The clusterization I will setup the redirector I will setup the redirector All the data servers should point here All the data servers should point here The machine’s name will be known the day of the tutorial… The machine’s name will be known the day of the tutorial… XROOTD tutorial - GridKA school 201031

32 Let’s do it (5/5) Everybody should use xrdcp to write 10 files, 10M each Everybody should use xrdcp to write 10 files, 10M each Into the cluster of course, not into your server Into the cluster of course, not into your server Full pathname: root://unique_redirector//gridka2010/ _N.dat Full pathname: root://unique_redirector//gridka2010/ _N.dat At the end, each machine should host files at random At the end, each machine should host files at random Verify that some load is spread to your machine Verify that some load is spread to your machine If not, you have to understand why If not, you have to understand why XROOTD tutorial - GridKA school 201032

33 I want to migrate/clean up Too many different situations Too many different situations E.g. Differences in the number of servers, in the partition sizes, in the partition numbers, … E.g. Differences in the number of servers, in the partition sizes, in the partition numbers, … Hence a single recipe is difficult to invent… Hence a single recipe is difficult to invent… Better to understand how it works and be prepared Better to understand how it works and be prepared BUT … The files are there BUT … The files are there They are “in clear” They are “in clear” Easy with one partition per server Easy with one partition per server Just do it with the normal UNIX tools Just do it with the normal UNIX tools But, with OSSCACHE we have also the need to migrate/recreate the namespace part, made of symlinks But, with OSSCACHE we have also the need to migrate/recreate the namespace part, made of symlinks Every case is different, I never saw the same thing twice Every case is different, I never saw the same thing twice In the worst cases a small shell script does the job In the worst cases a small shell script does the job XROOTD tutorial - GridKA school 2010 33

34 In any case There is the help of the community and of the more experienced sysadmins There is the help of the community and of the more experienced sysadmins Mailing lists of the various experiments/groups Mailing lists of the various experiments/groups http://savannah.cern.ch/project/xrootd http://savannah.cern.ch/project/xrootd http://savannah.cern.ch/project/xrootd Xrootd-l@slac.stanford.edu Xrootd-l@slac.stanford.edu Xrootd-l@slac.stanford.edu In general, in case of bad hw failures: In general, in case of bad hw failures: All the data files that can be read with standard UNIX tools are easily recoverable All the data files that can be read with standard UNIX tools are easily recoverable Eventually, one may have to recreate the namespace for the new set of files Eventually, one may have to recreate the namespace for the new set of files XROOTD tutorial - GridKA school 201034


Download ppt "XROOTD Tutorial Part 2 – the bundles Fabrizio Furano."

Similar presentations


Ads by Google