system node run

Run interactive or non-interactive commands in the nodeshell

Availability: This command is available to cluster administrators at the admin privilege level.

Description

Use the system node run command to run certain commands from the nodeshell CLI on a specific node in the cluster. You can run a single nodeshell command from the clustershell that returns immediately, or you can start an interactive nodeshell session from which you can run multiple nodeshell commands.

Nodeshell commands are useful for root volume management and system troubleshooting. Commands that are available through the nodeshell are scoped to a single node in the cluster. That is, they affect only the node specified by the value of the -node parameter and do not operate on other nodes in the cluster. To see a list of available nodeshell commands, type '?' at the interactive nodeshell prompt. For more information on the meanings and usage of the available commands, use the man command in the nodeshell.

Only one interactive nodeshell session at a time can be run on a single node. Up to 24 concurrent, non-interactive sessions can be run at a time on a node.

When running the nodeshell interactively, exit the nodeshell and return to the clustershell by using the exit command. If the nodeshell does not respond to commands, terminate the nodeshell process and return to the clustershell by pressing Ctrl-D.

The system node run command is not available from the GUI interface.

Note: An alternate way to invoke the system node run command is by typing the run as a single word.

Parameters

-node {<nodename>|local} - Node
Use this parameter to specify the name of the node on which you want to run the nodeshell command. If you specify only this parameter, the command starts an interactive nodeshell session that lasts indefinitely. You can exit the nodeshell to the clustershell by pressing Ctrl-D or by typing the exit command.
{ [-command <text>, ...] - Command to Run
This optionally specifies the name of a single nodeshell command to run on the specified node. To see a list of available nodeshell commands, type '?' at an interactive nodeshell prompt.
| [-reset [true]]} - Reset Existing Connection
If this parameter is specified with the true value, it terminates any existing interactive nodeshell session on the specified node. The default value is false.

Examples

The following example runs the nodeshell command sysconfig -V on a node named node1:

cluster1::> system node run -node node1 -command sysconfig -V
volume node1_aggr0 (1 RAID group):
        group 0: 3 disks

The following example starts a nodeshell session on a node named node2 and then runs the nodeshell sysconfig -V command. The system remains in the nodeshell after running the sysconfig -V command.

cluster1::> run -node node2
Type 'exit' or 'Ctrl-D' to return to the CLI
node2> sysconfig -V
volume node2_aggr0 (1 RAID group):
        group 0: 3 disks
node2>

The following example starts a nodeshell session on a node named node1 and then runs two nodeshell commands, aggr status first and vol status second. Use quotation marks and semicolons when executing multiple nodeshell commands with a single run command.

cluster1::> run -node node1 -command "aggr status; vol status"
           Aggr State           Status            Options
          aggr0 online          raid_dp, aggr     root
                                parity uninit'd!
                                32-bit
          aggr1 online          raid_dp, aggr
                                parity uninit'd!
                                32-bit
         Volume State           Status            Options
           vol0 online          raid_dp, flex     root, nvfail=on
                                parity uninit'd!
       root_vs0 online          raid_dp, flex     create_ucode=on,
                                cluster           convert_ucode=on,
                                parity uninit'd!  maxdirsize=102400