User Tools

Site Tools


system-wide_administration_commands_pdsh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
system-wide_administration_commands_pdsh [2021/04/30 15:38]
brandonm [Help with pdsh] Add missing period
system-wide_administration_commands_pdsh [2021/05/19 14:59] (current)
meadline [Some Important Points about pdsh] clarified #4
Line 39: Line 39:
 ==== Using pdsh to Copy Files ==== ==== Using pdsh to Copy Files ====
  
-There may be timeswhen a file needs to be updated across the cluster. Be aware that important files are managed by either [[Warewulf Worker Node Images|Warewulf]] or [[ Using the Apache Ambari Cluster Manager|Ambari ]] and there is no need to manipulate these files "by hand."+There may be times when a file needs to be updated across the cluster. Be aware that important files are managed by either [[Warewulf Worker Node Images|Warewulf]] or [[ Using the Apache Ambari Cluster Manager|Ambari ]] and there is no need to manipulate these files "by hand."
  
-In addition, there are two NFS mounted directories that appear across the cluster. On all systems ''/home'' is available on all nodes. This configuration is important for HPC systems and actually not really needed on Data Analytics systems (Hadoop). The second system wide NFS mount depends on the type of system. +In addition, there are two NFS-mounted directories that appear across the cluster. On all systems ''/home'' is available on all nodes. This configuration is important for HPC systems and actually not really needed on Data Analytics systems (Hadoop). The second system-wide NFS mount depends on the type of system. 
  
   * On HPC systems, ''/opt/ohpc'' is mounted on all nodes.    * On HPC systems, ''/opt/ohpc'' is mounted on all nodes. 
Line 47: Line 47:
   * On Data Analytics (Hadoop) systems. ''/opt/cluster'' is mounted on all nodes.    * On Data Analytics (Hadoop) systems. ''/opt/cluster'' is mounted on all nodes. 
  
-Under both these mounts is a private ''admin/etc'' path. Files needed on all nodescan be conveniently located in these system-wide directories and thus eliminate the need to copy files. +Under both these mounts is a private ''admin/etc'' path. Files needed on all nodes can be conveniently located in these system-wide directories and thus eliminate the need to copy files. 
  
-In the event that copying a file is absolutely necessary, the following procedure is the preferred way to copy a file to the nodes:+In the event that copying a file is absolutely necessary, the following procedure is the preferred way to copy a file to the nodes (Assume the file name is ''TEMP-FILE''):
  
-  - Copy the file to the NFS shared ''admin/etc'' directory on the headnode (use ''/opt/ohpc/admin/etc''on HPC systems): <code> # cp TEMP-FILE /opt/cluster/admin/etc </code>+  - Copy the file to the NFS shared ''admin/etc'' directory on the headnode (use ''/opt/ohpc/admin/etc'' on HPC systems): <code># cp TEMP-FILE /opt/cluster/admin/etc </code>
   - Next, use ''pdsh'' to copy the file to the ''/root'' directory on all the nodes (**surround the command with " or '**): <code># pdsh "/opt/cluster/admin/etc/TEMP-FILE /root" </code>   - Next, use ''pdsh'' to copy the file to the ''/root'' directory on all the nodes (**surround the command with " or '**): <code># pdsh "/opt/cluster/admin/etc/TEMP-FILE /root" </code>
   - Check that the file arrived: <code># pdsh ls /root/TEMP-FILE   - Check that the file arrived: <code># pdsh ls /root/TEMP-FILE
Line 58: Line 58:
 n0: /root/TEMP-FILE n0: /root/TEMP-FILE
 </code> </code>
-  - Finally, to remove the file on all nodes:<code>#pdsh rm /root/TEMP-FILE</code>+  - Finally, to remove the file on all nodes:<code># pdsh rm /root/TEMP-FILE</code>
  
-By keeping a copy of the file in the NFS mounted ''~/admin/etc'' path, a convenient record of file movement/changes can be consulted in the future. +By keeping a copy of the file in the NFS-mounted ''~/admin/etc'' path, a convenient record of file movement/changes can be consulted in the future. 
  
  
Line 66: Line 66:
  
 While ''pdsh'' is an immensely useful command, it does have some limitations and cautions.  While ''pdsh'' is an immensely useful command, it does have some limitations and cautions. 
-  - ''pdsh'' only works on the headnode (login node) 
  
-  - ''pdsh'' cannot be used for interactive commands (e.g. ''pdsh top'' will not work. It shoudl be used with commands that "finish." You can break out of ''pdsh'' using multiple ''ctrl-c'' commands. +  - The ''pdsh'' command only works from the headnode (login node) It is not available on the worker nodes. 
-  - If you want multiple commands to execute on the node, then the command must be surrounded by single or double quotes. For example, if the above sort command was surround by quotes, the sort will take place "on the node" and not on the issuing node. The following example "sorts" on each node (there is nothing to sort) and the results are returned unordered:<code> # pdsh "uptime|sort" +  - ''pdsh'' cannot be used for interactive commands (e.g. ''pdsh top'' will not work). It should be used with commands that "finish." You can break out of ''pdsh'' using multiple ''ctrl-c'' commands. 
-0:  09:08:14 up 153 days, 18:38,  0 users,  load average: 0.09, 0.08, 0.02+  - If you want multiple commands to execute on the node, then the command must be surrounded by single or double quotes. For example, if the above sort command were surrounded by quotes, the sort would take place on the target nodes and not on the issuing node. The following example "sorts" on each node (there is nothing to sort) and the results are returned unordered:<code> # pdsh "uptime|sort" 
 +n0:  09:08:14 up 153 days, 18:38,  0 users,  load average: 0.09, 0.08, 0.02
 n2:  09:08:14 up 153 days, 18:38,  0 users,  load average: 0.04, 0.05, 0.01 n2:  09:08:14 up 153 days, 18:38,  0 users,  load average: 0.04, 0.05, 0.01
 n1:  09:08:14 up 153 days, 18:39,  0 users,  load average: 0.02, 0.04, 0.04 n1:  09:08:14 up 153 days, 18:39,  0 users,  load average: 0.02, 0.04, 0.04
 </code> </code>
- +  - Although tempting, using ''pdsh'' to make permanent changes on the nodes is **not recommended**. On HPC systems, any changes will go away on the next restart of the nodes, The Warewulf Cluster toolkit provides a mechanism to globally manage all node configuration details (see [[ Warewulf Worker Node Images| VNFS images]]). \\ \\ On Data Analytics Systems (Hadoop)changing nodes by-hand may cause "node personalities" to develop (an unmanaged and unique collection of files and directories) and eventually make managing the system confusing or almost impossible. With few exceptions, full management of the Analytics systems (Hadoop) should be possible through the [[ Using the Apache Ambari Cluster Manager|Ambari Cluster Manager]].
-  - Although tempting, using ''pdsh'' to make changes on the nodes is **not recommended**. On HPC systems, the changes will go away on the next restart of the nodes (see [[ Warewulf Worker Node Images| VNFS images]]). On Data Analytics Systems (Hadoop) changing nodes may cause "personalities" to develop and eventual make managing the system confusing or almost impossible. With few exceptions, full management of the Analytics systems (Hadoop) should be possible through the [[ Using the Apache Ambari Cluster Manager||Ambari Cluster Manager]].+
  
  
system-wide_administration_commands_pdsh.1619797109.txt.gz · Last modified: 2021/04/30 15:38 by brandonm