| 8 | | <title>&slony1; Administration Scripts</title> |
|---|
| 9 | | |
|---|
| 10 | | <indexterm><primary>administration scripts for &slony1;</primary></indexterm> |
|---|
| 11 | | |
|---|
| 12 | | <para> A number of tools have grown over the course of the history of |
|---|
| 13 | | &slony1; to help users manage their clusters. This section along with |
|---|
| 14 | | the ones on <xref linkend="monitoring"/> and <xref |
|---|
| 15 | | linkend="maintenance"/> discusses them. </para> |
|---|
| 16 | | |
|---|
| 17 | | <sect2 id="altperl"> <title>altperl Scripts</title> |
|---|
| 18 | | |
|---|
| 19 | | <indexterm><primary>altperl scripts for &slony1;</primary></indexterm> |
|---|
| 20 | | |
|---|
| 21 | | <para>There is a set of scripts to simplify administeration |
|---|
| 22 | | of set of &slony1; instances. The scripts support having arbitrary numbers of |
|---|
| 23 | | nodes. They may be installed as part of the installation process:</para> |
|---|
| | 8 | <title>Scripts d'administration</title> |
|---|
| | 9 | |
|---|
| | 10 | <indexterm><primary>scripts d'administration de &slony1;</primary></indexterm> |
|---|
| | 11 | |
|---|
| | 12 | <para> Un certain nombre de scripts ont été developpés tout au long de l'histoire de |
|---|
| | 13 | &slony1; pour aider les utilisateurs à gérer leurs clusters. Cette section ainsi |
|---|
| | 14 | que celle sur le <xref linkend="monitoring"/> et la <xref |
|---|
| | 15 | linkend="maintenance"/> décrit leur utilisation. </para> |
|---|
| | 16 | |
|---|
| | 17 | <sect2 id="altperl"> <title>Les scripts altperl</title> |
|---|
| | 18 | |
|---|
| | 19 | <indexterm><primary> Scriptd altperl pour &slony1;</primary></indexterm> |
|---|
| | 20 | |
|---|
| | 21 | <para>Il existe un ensemble de scripts qui simplifie l'administration de plusieurs |
|---|
| | 22 | instances &slony1;. Ces scripts supportent une nombre variable de noeuds. Ils peuvent |
|---|
| | 23 | être installés pendant le processus d'installation :</para> |
|---|
| 29 | | <para>This will produce a number of scripts with the prefix |
|---|
| 30 | | <command>slonik_</command>. They eliminate tedium by always referring |
|---|
| 31 | | to a central configuration file for the details of your site |
|---|
| 32 | | configuration. A documented sample of this file is provided in |
|---|
| 33 | | <filename>altperl/slon_tools.conf-sample</filename>. Most also include |
|---|
| 34 | | some command line help with the "--help" option, making them easier to |
|---|
| 35 | | learn and use. |
|---|
| 36 | | </para> |
|---|
| 37 | | |
|---|
| 38 | | <para>Most generate Slonik scripts that are printed to STDOUT. |
|---|
| 39 | | At one time, the commands were passed directly to <xref linkend="slonik"/> for execution. |
|---|
| 40 | | Unfortunately, this turned out to be a pretty large calibre |
|---|
| 41 | | <quote>foot gun</quote>, as minor typos on the command line led, on a |
|---|
| 42 | | couple of occasions, to pretty calamitous actions. The savvy administrator should review the script |
|---|
| 43 | | <emphasis>before</emphasis> piping it to <xref linkend="slonik"/>.</para> |
|---|
| 44 | | |
|---|
| 45 | | <sect3><title>Support for Multiple Clusters</title> |
|---|
| 46 | | <indexterm><primary>Multiple Cluster support for the altperl tools</primary></indexterm> |
|---|
| 47 | | |
|---|
| 48 | | <para>The UNIX environment variable <envar>SLONYNODES</envar> is used |
|---|
| 49 | | to determine what Perl configuration file will be used to control the |
|---|
| 50 | | shape of the nodes in a &slony1; cluster. If it is not provided, a |
|---|
| 51 | | default <filename>slon_tools.conf</filename> location will be |
|---|
| 52 | | referenced. </para> |
|---|
| 53 | | |
|---|
| 54 | | <para>What variables are set up. |
|---|
| 55 | | <itemizedlist> |
|---|
| 56 | | |
|---|
| 57 | | <listitem><para><envar>$CLUSTER_NAME</envar>=orglogs; # What is the name of the replication cluster?</para></listitem> |
|---|
| 58 | | <listitem><para><envar>$LOGDIR</envar>='/opt/OXRS/log/LOGDBS'; # What is the base directory for logs?</para></listitem> |
|---|
| 59 | | <listitem><para><envar>$APACHE_ROTATOR</envar>="/opt/twcsds004/OXRS/apache/rotatelogs"; # If set, where to find Apache log rotator</para></listitem> |
|---|
| 60 | | <listitem><para><envar>foldCase</envar> # If set to 1, object names (including schema names) will be |
|---|
| 61 | | folded to lower case. By default, your object names will be left |
|---|
| 62 | | alone. Note that &postgres; itself folds object names to lower case; |
|---|
| 63 | | if you create a table via the command <command> CREATE TABLE |
|---|
| 64 | | SOME_THING (Id INTEGER, STudlYName text);</command>, the result will |
|---|
| 65 | | be that all of those components are forced to lower case, thus |
|---|
| 66 | | equivalent to <command> create table some_thing (id integer, |
|---|
| 67 | | studlyname text);</command>, and the name of table and, in this case, |
|---|
| 68 | | the fields will all, in fact, be lower case. </para> |
|---|
| | 29 | <para>Ceci va produire un certain nombre de scripts avec le préfixe |
|---|
| | 30 | <command>slonik_</command>. Ils éliminent les risques de confusion en se référençant |
|---|
| | 31 | à un fichier central de configuration qui contient les détails de la configuration |
|---|
| | 32 | de votre site. Un exemple documenté de ce fichier est fourni dans |
|---|
| | 33 | <filename>altperl/slon_tools.conf-sample</filename>. La pluspart dispose également |
|---|
| | 34 | une aide en ligne grace à l'option "--help", ce qui les rend plus facile à prendre en main |
|---|
| | 35 | et à utiliser. |
|---|
| | 36 | </para> |
|---|
| | 37 | |
|---|
| | 38 | <para>La plupart des scripts de génération Slonik utilise la sortie STDOUT. |
|---|
| | 39 | Pendant un temps, les commandes étaient passées directement à <xref linkend="slonik"/> |
|---|
| | 40 | pour qu'il les éxecute. Malheureusement, il s'agit d'une méthode trop . |
|---|
| | 41 | <quote>agressive</quote>, car de légÚres coquilles dans la ligne de commande |
|---|
| | 42 | peuvent conduire, dans certains cas, Ã des situations calamiteuses. |
|---|
| | 43 | Tout administrateur qui se respecte doit relire le script |
|---|
| | 44 | <emphasis>avant</emphasis> de l'envoyer à <xref linkend="slonik"/>.</para> |
|---|
| | 45 | |
|---|
| | 46 | <sect3><title>Gestion de multiples clusters</title> |
|---|
| | 47 | <indexterm><primary>Gérer de multiples clusters avec les outils altperl</primary></indexterm> |
|---|
| | 48 | |
|---|
| | 49 | <para>La variable d'environnement <envar>SLONYNODES</envar> est utilisée pour déterminer |
|---|
| | 50 | quel fichier de configuration Perl sera utilisé pour controller les noeuds du cluster |
|---|
| | 51 | &slony1;. Si elle n'est pas fournie le fichier <filename>slon_tools.conf</filename> |
|---|
| | 52 | situé dans l'emplacement par défaut sera utilisé. </para> |
|---|
| | 53 | |
|---|
| | 54 | <para>Voici la liste des variables qui peuvent être configurées : |
|---|
| | 55 | <itemizedlist> |
|---|
| | 56 | |
|---|
| | 57 | <listitem><para><envar>$CLUSTER_NAME</envar>=orglogs; # Quel est le nom du cluster de replication ?</para></listitem> |
|---|
| | 58 | <listitem><para><envar>$LOGDIR</envar>='/opt/OXRS/log/LOGDBS'; # Quel est le répertoire des logs ?</para></listitem> |
|---|
| | 59 | <listitem><para><envar>$APACHE_ROTATOR</envar>="/opt/twcsds004/OXRS/apache/rotatelogs"; # Si ce paramÚtre est défini, il indique où trouver le gestionnaire de logs d'Apache</para></listitem> |
|---|
| | 60 | <listitem><para><envar>foldCase</envar> # Si la valeur est 1, les noms d'objet ( y compris les noms de schéma) seront transformés en minuscule. Par défaut, les noms d'objets restent inchangés. Notons que &postgres; lui-même transforme les noms d'objets en minuscule; |
|---|
| | 61 | Si vous créez une table avec la commande <command> CREATE TABLE |
|---|
| | 62 | MA_TABLE (Id INTEGER, MoNChamp text);</command>, le résultat sera |
|---|
| | 63 | équivalent à <command> create table ma_table (id integer, |
|---|
| | 64 | monchamp text);</command>, le nom de la table et ses champs sera transformé en minuscule. |
|---|
| | 65 | </para> |
|---|
| 86 | | my %PARAMS = (host=> undef, # Host name |
|---|
| 87 | | dbname => 'template1', # database name |
|---|
| 88 | | port => 5432, # Port number |
|---|
| 89 | | user => 'postgres', # user to connect as |
|---|
| 90 | | node => undef, # node number |
|---|
| 91 | | password => undef, # password for user |
|---|
| 92 | | parent => 1, # which node is parent to this node |
|---|
| 93 | | noforward => undef # shall this node be set up to forward results? |
|---|
| 94 | | sslmode => undef # SSL mode argument - determine |
|---|
| 95 | | # priority of SSL usage |
|---|
| | 83 | my %PARAMS = (host=> undef, # nom de l'hÃŽte |
|---|
| | 84 | dbname => 'template1', # nom de la base |
|---|
| | 85 | port => 5432, # numéro du port |
|---|
| | 86 | user => 'postgres', # utilisateur de la connexion |
|---|
| | 87 | node => undef, # numéro du noeud |
|---|
| | 88 | password => undef, # mot de passe de l'utilisateur |
|---|
| | 89 | parent => 1, # l'identifiant du noeud pÚre |
|---|
| | 90 | noforward => undef # ce noeud doit-il retransmettre les modifications ? |
|---|
| | 91 | sslmode => undef # mode SSL - détermine la priorité |
|---|
| | 92 | # d'utilisation de la couche SSL |
|---|
| 99 | | </sect3> |
|---|
| 100 | | |
|---|
| 101 | | <sect3><title>Set configuration - cluster.set1, cluster.set2</title> |
|---|
| 102 | | <indexterm><primary>cluster.set1 - replication set configuration for Perl tools</primary></indexterm> |
|---|
| 103 | | |
|---|
| 104 | | <para>The UNIX environment variable <envar>SLONYSET</envar> is used to |
|---|
| 105 | | determine what Perl configuration file will be used to determine what |
|---|
| 106 | | objects will be contained in a particular replication set.</para> |
|---|
| 107 | | |
|---|
| 108 | | <para>Unlike <envar>SLONYNODES</envar>, which is essential for |
|---|
| 109 | | <emphasis>all</emphasis> of the <xref linkend="slonik"/>-generating |
|---|
| 110 | | scripts, this only needs to be set when running |
|---|
| 111 | | <filename>create_set</filename>, as that is the only script used to |
|---|
| 112 | | control what tables will be in a particular replication set.</para> |
|---|
| | 96 | </sect3> |
|---|
| | 97 | |
|---|
| | 98 | <sect3><title>Configuration d'un ensemble de réplication </title> |
|---|
| | 99 | <indexterm><primary>cluster.set1 - configuration d'un ensemble de réplication pour les outils |
|---|
| | 100 | Perl</primary></indexterm> |
|---|
| | 101 | |
|---|
| | 102 | <para>La variable d'environnement UNIX <envar>SLONYSET</envar> est utilisée pout déterminer |
|---|
| | 103 | quel fichier de configuration doit être lu pour connaître les objets qui sont contenus |
|---|
| | 104 | dans un ensemble donné.</para> |
|---|
| | 105 | |
|---|
| | 106 | <para>Contrairement à <envar>SLONYNODES</envar>, qui est essentielle pour |
|---|
| | 107 | <emphasis>tous</emphasis> les scripts de génération <xref linkend="slonik"/>, |
|---|
| | 108 | celle-ci n'est nécessaire que lorsqu'on exécute |
|---|
| | 109 | <filename>create_set</filename>, car il s'agit du seul script qui controlle |
|---|
| | 110 | le placement des tables dans les différents ensemble de réplication. |
|---|
| | 111 | </para> |
|---|
| 257 | | <indexterm><primary>generating slon.conf files for &slony1;</primary></indexterm> |
|---|
| 258 | | |
|---|
| 259 | | <para> This is a shell script designed to rummage through a &slony1; |
|---|
| 260 | | cluster and generate a set of <filename>slon.conf</filename> files |
|---|
| 261 | | that &lslon; accesses via the <command> slon -f slon.conf </command> |
|---|
| 262 | | option. </para> |
|---|
| 263 | | |
|---|
| 264 | | <para> With all of the configuration residing in a configuration file |
|---|
| 265 | | for each &lslon;, they can be invoked with minimal muss and fuss, with |
|---|
| 266 | | no risk of forgetting the <command>-a</command> option and thereby |
|---|
| 267 | | breaking a <link linkend="logshipping"> log shipping </link> |
|---|
| 268 | | node. </para> |
|---|
| 269 | | |
|---|
| 270 | | <para> Running it requires the following environment configuration: </para> |
|---|
| 271 | | |
|---|
| 272 | | <itemizedlist> |
|---|
| 273 | | |
|---|
| 274 | | <listitem><para> Firstly, the environment needs to be set up with |
|---|
| 275 | | suitable parameters for libpq to connect to one of the databases in |
|---|
| 276 | | the cluster. Thus, you need some suitable combination of the |
|---|
| 277 | | following environment variables set:</para> |
|---|
| | 252 | <indexterm><primary>Générer le fichier slon.conf pour &slony1;</primary></indexterm> |
|---|
| | 253 | |
|---|
| | 254 | <para> Ce script shell est conçu parcourir un cluster &slony1; et |
|---|
| | 255 | produire un ensemble de fichiers <filename>slon.conf</filename> |
|---|
| | 256 | qui pourront être utilisé via l'option <command> slon -f slon.conf </command>. |
|---|
| | 257 | </para> |
|---|
| | 258 | |
|---|
| | 259 | <para> Lorsque toute la configuration est placée dans un fichier pour chaque &lslon;, |
|---|
| | 260 | on peut alors facilement les invoquer, sans risquer d'oublier l'option |
|---|
| | 261 | <command>-a</command>, ce qui peut provoquer le crash d'un noeud en mode |
|---|
| | 262 | <link linkend="logshipping"> log shipping </link>. </para> |
|---|
| | 263 | |
|---|
| | 264 | <para> Pour lancer le script, il faut configurer l'environnement de la maniÚre suivante : |
|---|
| | 265 | </para> |
|---|
| | 266 | |
|---|
| | 267 | <itemizedlist> |
|---|
| | 268 | |
|---|
| | 269 | <listitem><para> Tout d'abord, l'environnement doit être configuré avec les paramÚtres |
|---|
| | 270 | adéquats pour que libpq puisse se connecter à une des bases de données du cluster. |
|---|
| | 271 | Vous devez donc définir une combinaison parmi les variables d'environnement suivantes : |
|---|
| | 272 | </para> |
|---|
| 289 | | <listitem><para> <envar>SLONYCLUSTER</envar> - the name of the |
|---|
| 290 | | &slony1; cluster to be <quote>rummaged</quote>. </para></listitem> |
|---|
| 291 | | |
|---|
| 292 | | <listitem><para> <envar>MKDESTINATION</envar> - a directory for |
|---|
| 293 | | configuration to reside in; the script will create |
|---|
| 294 | | <filename>MKDESTINATION/$SLONYCLUSTER/conf</filename> for the &lslon; |
|---|
| 295 | | configuration files, and |
|---|
| 296 | | <filename>MKDESTINATION/$SLONYCLUSTER/pid</filename> for &lslon; to |
|---|
| 297 | | store PID files in. </para></listitem> |
|---|
| 298 | | |
|---|
| 299 | | <listitem><para> <envar>LOGHOME</envar> - a directory for log files to |
|---|
| 300 | | reside in; a directory of the form |
|---|
| 301 | | <command>$LOGHOME/$SLONYCLUSTER/node[number]</command> will be created |
|---|
| 302 | | for each node. </para></listitem> |
|---|
| 303 | | |
|---|
| 304 | | </itemizedlist> |
|---|
| 305 | | |
|---|
| 306 | | <para> For any <quote>new</quote> nodes that it discovers, this script |
|---|
| 307 | | will create a new &lslon; conf file. </para> |
|---|
| 308 | | |
|---|
| 309 | | <warning><para> It is fair to say that there are several conditions to |
|---|
| 310 | | beware of; none of these should be greatly surprising...</para> |
|---|
| 311 | | |
|---|
| 312 | | <itemizedlist> |
|---|
| 313 | | |
|---|
| 314 | | <listitem><para> The DSN is pulled from the minimum value found for |
|---|
| 315 | | each node in <envar>sl_path</envar>. You may very well need to modify |
|---|
| 316 | | this.</para></listitem> |
|---|
| 317 | | |
|---|
| 318 | | <listitem><para> Various parameters are set to default values; you may |
|---|
| 319 | | wish to customize them by hand. </para></listitem> |
|---|
| 320 | | |
|---|
| 321 | | <listitem><para> If you are running &lslon; processes on multiple |
|---|
| 322 | | nodes (<emphasis>e.g.</emphasis> - as when running &slony1; across a |
|---|
| 323 | | WAN), this script will happily create fresh new config files for |
|---|
| 324 | | &lslon;s you wanted to have run on another host. </para> |
|---|
| 325 | | |
|---|
| 326 | | <para> Be sure to check out what nodes it set up before restarting |
|---|
| 327 | | &lslon;s. </para> |
|---|
| 328 | | |
|---|
| 329 | | <para> This would usually only cause some minor inconvenience due to, |
|---|
| 330 | | for instance, a &lslon; running at a non-preferred site, and either |
|---|
| 331 | | failing due to lack of network connectivity (in which no damage is |
|---|
| 332 | | done!) or running a bit less efficiently than it might have due to |
|---|
| 333 | | living at the wrong end of the network <quote>pipe.</quote> </para> |
|---|
| 334 | | |
|---|
| 335 | | <para> On the other hand, if you are running a log shipping node at |
|---|
| 336 | | the remote site, accidentally introducing a &lslon; that |
|---|
| 337 | | <emphasis>isn't</emphasis> collecting logs could ruin your whole |
|---|
| 338 | | week. </para> |
|---|
| | 284 | <listitem><para> <envar>SLONYCLUSTER</envar> - le nom du cluster &slony1; qui |
|---|
| | 285 | doit être <quote>parcouru</quote>. </para></listitem> |
|---|
| | 286 | |
|---|
| | 287 | <listitem><para> <envar>MKDESTINATION</envar> - un répertoire qui accueillera |
|---|
| | 288 | la configuration; le script crée un dossier |
|---|
| | 289 | <filename>MKDESTINATION/$SLONYCLUSTER/conf</filename> pour les fichiers de configuration |
|---|
| | 290 | des démons &lslon; et un dossier |
|---|
| | 291 | <filename>MKDESTINATION/$SLONYCLUSTER/pid</filename> pour que &lslon; y stocke |
|---|
| | 292 | les fichiers PID. </para></listitem> |
|---|
| | 293 | |
|---|
| | 294 | <listitem><para> <envar>LOGHOME</envar> - un répertoire qui accueillera les fichiers |
|---|
| | 295 | de log; un dossier nommé |
|---|
| | 296 | <command>$LOGHOME/$SLONYCLUSTER/node[numéro]</command> sera créé pour chaque noeud. |
|---|
| | 297 | </para></listitem> |
|---|
| | 298 | |
|---|
| | 299 | </itemizedlist> |
|---|
| | 300 | |
|---|
| | 301 | <para> Pour chaque <quote>nouveau</quote> noeud qu'il découvre, ce script |
|---|
| | 302 | va créer un nouveau fichier de configuration &lslon;. </para> |
|---|
| | 303 | |
|---|
| | 304 | <warning><para> Il est important de préciser que ce script présente quelques particularités |
|---|
| | 305 | qu'il faut connaître, même aucune n'est vraiment surprenante. |
|---|
| | 306 | </para> |
|---|
| | 307 | |
|---|
| | 308 | <itemizedlist> |
|---|
| | 309 | |
|---|
| | 310 | <listitem><para> Le DSN est positioné à la plus petite valeur trouvé pour |
|---|
| | 311 | chaque noeud dans le table <envar>sl_path</envar>. Vous devrez probablement |
|---|
| | 312 | modifier cette valeur.</para></listitem> |
|---|
| | 313 | |
|---|
| | 314 | <listitem><para> Plusieurs paramÚtres sont initialisés avec leur valeur par défaut; |
|---|
| | 315 | Vous devrez probablement les réajuster à la main. </para></listitem> |
|---|
| | 316 | |
|---|
| | 317 | <listitem><para> Si vous exécutez les processus &lslon; sur de multiples noeuds (<emphasis>par exemple</emphasis> - si vous utilisez &slony1; à travers un réseau WAN), |
|---|
| | 318 | ce script va joyeusement créer des fichiers de configuration pour des |
|---|
| | 319 | &lslon;s que vous comptez lancer sur un hÎte différent. </para> |
|---|
| | 320 | |
|---|
| | 321 | <para> Vérifiez bien quels noeuds sont configurés avant de redémarrer les &lslon;s. </para> |
|---|
| | 322 | |
|---|
| | 323 | <para> En général, cela provoque des inconvénients mineurs, |
|---|
| | 324 | comme, par exemple, un &lslon; fonctionnant de maniÚre inapproprié, |
|---|
| | 325 | échouant suite à un problÚme de connectivité, (ce qui ne provoque pas |
|---|
| | 326 | de dégats ! ), ou fonctionnant moins efficacement vu qu'il se trouve du mauvais |
|---|
| | 327 | coté du <quote>tuyau</quote>.</para> |
|---|
| | 328 | |
|---|
| | 329 | <para> D'un autre cÎté, si vous faites fonctionner un noeud en mode log shipping sur |
|---|
| | 330 | le site distant, l'arrivée d'un &lslon; que that |
|---|
| | 331 | <emphasis>ne collecte pas</emphasis> les logs peut ruiner une semaine complÚte d'activité. </para> |
|---|
| 353 | | <indexterm><primary>launching &slony1; cluster using slon.conf files</primary></indexterm> |
|---|
| 354 | | |
|---|
| 355 | | <para> This is another shell script which uses the configuration as |
|---|
| 356 | | set up by <filename>mkslonconf.sh</filename> and is intended to either |
|---|
| 357 | | be run at system boot time, as an addition to the |
|---|
| 358 | | <filename>rc.d</filename> processes, or regularly, as a cron process, |
|---|
| 359 | | to ensure that &lslon; processes are running.</para> |
|---|
| 360 | | |
|---|
| 361 | | <para> It uses the following environment variables:</para> |
|---|
| 362 | | |
|---|
| 363 | | <itemizedlist> |
|---|
| 364 | | |
|---|
| 365 | | <listitem><para><envar>PATH</envar> which needs to contain, preferably |
|---|
| 366 | | at the beginning, a path to the &lslon; binaries that should be |
|---|
| 367 | | run.</para></listitem> |
|---|
| 368 | | |
|---|
| 369 | | <listitem><para><envar>SLHOME</envar> indicates the |
|---|
| 370 | | <quote>home</quote> directory for &lslon; configuration files; they |
|---|
| 371 | | are expected to be arranged in subdirectories, one for each cluster, |
|---|
| 372 | | with filenames of the form <filename>node1.conf</filename>, |
|---|
| 373 | | <filename>node2.conf</filename>, and such </para> |
|---|
| 374 | | |
|---|
| 375 | | <para> The script uses the command <command>find $SLHOME/$cluster/conf |
|---|
| 376 | | -name "node[0-9]*.conf"</command> to find &lslon; configuration files.</para> |
|---|
| 377 | | |
|---|
| 378 | | <para> If you remove some of these files, or rename them so their |
|---|
| 379 | | names do not conform to the <command>find</command> command, they |
|---|
| 380 | | won't be found; that is an easy way to drop nodes out of this system.</para> |
|---|
| | 345 | <indexterm><primary>lancer un cluster &slony1; cluster en utilisant les fichiers slon.conf </primary></indexterm> |
|---|
| | 346 | |
|---|
| | 347 | <para> Voici un autre script shell qui utilise la configuration produite |
|---|
| | 348 | par <filename>mkslonconf.sh</filename> et qui peut être utilisé lors du |
|---|
| | 349 | démarrage du systÚme, à la suite des processus <filename>rc.d</filename>, |
|---|
| | 350 | ou dans un processus cron, pour s'assurer que les processus &lslon; |
|---|
| | 351 | fonctionnent.</para> |
|---|
| | 352 | |
|---|
| | 353 | <para> Il utilise les variables d'environnement suivantes :</para> |
|---|
| | 354 | |
|---|
| | 355 | <itemizedlist> |
|---|
| | 356 | |
|---|
| | 357 | <listitem><para><envar>PATH</envar> qui doit contenir, de préférence au début, le |
|---|
| | 358 | chemin vers les binaires &lslon; qui doivent être exécutés.</para></listitem> |
|---|
| | 359 | |
|---|
| | 360 | <listitem><para><envar>SLHOME</envar> indique le répertoire |
|---|
| | 361 | <quote>home</quote> qui contient les fichiers de configuration de &lslon;; |
|---|
| | 362 | ces fichiers doivent être rangés en sous-repertoires, un pour chaque cluster, |
|---|
| | 363 | avec un nom de fichier du type <filename>node1.conf</filename>, |
|---|
| | 364 | <filename>node2.conf</filename>, et ainsi de suite. </para> |
|---|
| | 365 | |
|---|
| | 366 | <para> Le script utilise la commande <command>find $SLHOME/$cluster/conf |
|---|
| | 367 | -name "node[0-9]*.conf"</command> pour trouver les fichiers de configuration &lslon;.</para> |
|---|
| | 368 | |
|---|
| | 369 | <para> Si vous déplacez ces fichiers, ou si vous les renommez, ils ne seront pas trouvés; |
|---|
| | 370 | c'est une façon trÚs simple de supprimer des noeuds.</para> |
|---|