Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[SRX/J-series] How to copy a file from one node to another node in a JSRP chassis cluster

0

0

Article ID: KB17410 KB Last Updated: 25 Mar 2020Version: 12.0
Summary:

This article explains how to copy a file from one node to another node in a JSRP chassis cluster.

 

Symptoms:

When the chassis cluster is enabled, you may want to transfer a file from one node to another node. For example, if a secondary node is not reachable via FXP0 and you want to move the Junos image from one node to another node to upgrade both of the nodes.

Another example is when debug log files are collected on the secondary node (node1), but node1 does not have FXP0 connected to a management network. Therefore, they cannot be retrieved. However, the primary node (node0) has FXP0 connected to the management network. The workaround is to copy the debug log files that are captured on node1 to node0. Then the files can be retrieved from the network for further analysis.

 

Solution:

Perform the following procedure:

 
  1. Check the status of the chassis cluster:

    >show chassis cluster status

    The target node should not be shown as lost. If it is, then check if the CTRL link is up, or if the other device is powered on.

  2. Check if the fabric link is up:

    >show interfaces terse fab*

    Or

    >show interfaces terse | match fab

    The fabric links should be shown as Admin up and Link up. If not, check the cables/lights on the ports and reseat them.

    If the other node is down, then reboot it. After the reboot, check Steps 1 and 2. If the links still do not show up, then refer to KB20687 - Troubleshooting steps to correct a Fabric Link that is down in a Chassis Cluster.


  3. After confirming the target node and fabric link are up, proceed with copying the file. For this example, assume that the source file is /var/tmp/abc.log and the target directory is /var/log/. Also, assume that the target node is node1:

    Use either of the following methods:

    Via the CLI

    >file copy /var/tmp/abc.log node1:/var/log/

    Or

    Run the following commands, as per the order, via the shell:

    >start shell user root
    %rcp -T /var/tmp/abc.log node1:/var/log/

    Note: The first method is faster than the second method; RCP is slower.


  4. If the commands in Step 3 fail, then the last resort method is via USB. Assuming that the source node is node0 and the target node is node1, take the following steps:

    1. Insert a MSDOS/FAT formatted USB drive in node0 and wait for the device ID to show up. Assume that it shows up as da1.

    2. Mount the USB drive via the shell and copy the file by using the following commands:

      %mount -t msdosfs /dev/da1s1 /mnt
      %cp /var/tmp/abc.log /mnt/   This command will copy the file to the USB drive
    3. Remove the USB drive.

    4. Insert the USB drive in node1.

    5. Mount the USB drive and copy it's content to node1 by performing step b. The source will be /mnt/abc.log and the target will be /var/log//.


  5. To verify the presence of the file in node1 from node0 itself, perform the following procedure:
    1. Log in to node1:

      > request routing-engine login node 1

      For high-end devices, use the following command via the shell:

      %rlogin -Jk -T node1
    2. Now check the target directory in node1:

      >file list /var/log/ details | match abc.log

      The file should be displayed if the process is successful.

 

SCP Between the Nodes:

 

While the above mentioned methods do the job, for critical instances we may require a faster file transfer between the nodes. One available method is via SCP (Secure Copy over SSH) which should work if both nodes have an IP address on the fxp0.0 interface belonging on the same subnet and are connected to a switch.

 

Note: Since this is an SSH connection between the nodes, the device will require the user to save the key file to allow the SSH connection.

 

Example:

The authenticity of host '1.1.1.1 (1.1.1.1)' can't be established.
ED25519 key fingerprint is de:5c:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ef:fc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '1.1.1.1' (ED25519) to the list of known hosts.

Using SCP, we can pull (download) or push (upload the file):

 
  • Download: scp <username>@<hostname_or_IP>:<source_file_path_+_file_name> <destination_file_path_+_file_name>

  • Upload: scp <source_file_path_+_file_name> <username>@<hostname_or_IP>:<destination_file_path_+_file_name>

Node0: fxp0.0 - 1.1.1.1/24
Node1: fxp0.0 - 1.1.1.2/24
 

Download (node0 to Node1):

% scp root@1.1.1.1:/var/tmp/abc.txt /var/tmp/

The authenticity of host '1.1.1.1 (1.1.1.1)' can't be established.
ED25519 key fingerprint is de:5c:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ef:fc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '1.1.1.1' (ED25519) to the list of known hosts.

This copies the file /var/tmp/abc.txt from Node0 to /var/tmp/ with the same name (abc.txt) on Node1.

 

Upload(node0 to Node1):

% scp /var/tmp/xyz.txt root@1.1.1.2:/var/tmp/

The authenticity of host '1.1.1.2 (1.1.1.2)' can't be established.
ED25519 key fingerprint is a1:2d:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:e4:1c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '1.1.1.2' (ED25519) to the list of known hosts.
 

This copies the file /var/tmp/xyz.txt from Node0 to /var/tmp/ with the same name (xyz.txt) on Node1.

 

Once the transfer is complete, we can verify the checksum of the file using the file checksum command:

 
> file checksum md5 <file_name>

 

Modification History:

2020-02-25: Article reviewed for accuracy; no changes required.

 

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search