Contents

Upgrading Standalone and HA Netscaler

Website Visitors:

Upgrading a Standalone NetScaler

Before upgrading the system software, make sure that you have the required licenses. You have the option to use the configuration utility or the command line interface. Citrix recommends to perform the upgrade by using the command line interface.

In the following procedure, and represent the release version you are upgrading to, and represents the build number that you are upgrading to. See the table below for specific values. The procedure includes optional steps to avoid losing any updates that are pushed to the /etc directory during the upgrade.

Save the configuration, Create a full backup on the NetScaler, download it and move it to your machine before starting any NetScaler firmware upgrade.

Upgrade a Standalone NetScaler using the CLI

Login to Citrix website and download the firmware file to your machine.

  1. Use an SSH client, such as PuTTy, to open an SSH connection to the appliance.

  2. Log on to the appliance by using the administrator credentials. Save the running configuration. At the prompt, type: save config

  3. Create a copy of the ns.conf file. At the shell prompt, type:

    1. cd /nsconfig
    2. cp ns.conf ns.conf.NS

    You should backup the configuration file to another computer.

  4. (Optional) If you have modified some of the following files in the /etc directory, and copied them to /nsconfig to maintain persistency, any updates that are pushed to the /etc directory during the upgrade might be lost:

    • ttys
    • resolv.conf
    • sshd_config
    • host.conf
    • newsyslog.conf
    • host.conf
    • httpd.conf
    • rc.conf
    • syslog.conf
    • crontab
    • monitrc

    To avoid losing these updates, create a /var/nsconfig_backup directory, and move the customized files to this directory. That is, move any files that you modified in /etc directory and copied to /nsconfig by running the following command:

    mv /nsconfig/ /var/nsconfig_backup

    Example:

    mv /nsconfig/syslog.conf /var/nsconfig_backup

  5. Create a location for the installation package. At the shell prompt type

    1. cd /var/nsinstall
    2. mkdir build_<targetbuildnumber>
    3. cd build_<targetbuildnumber>
  6. Download or copy the installation package (build--_nc.tgz) to the directory that you created for it. To download the installation package from the Citrix Web site, do the following:

    1. Go to MyCitrix.com, log on with your credentials, and click Downloads.
    2. In Select a Product, select NetScaler.
    3. Under Firmware, click the release and build number to download.
    4. Click Get Firmware.
  7. Extract the contents of the installation package. Example:

    tar –xvzf build_10.1-49.3_nc.tgz

  8. Run the installns script to install the new version of the system software. The script updates the /etc directory. Example:

    ./installns

    If the free space available on the flash drive is insufficient to install the new build, the appliance prompts you to initiate a cleanup of the flash drive. For more information, see “Auto Cleanup“.

  9. Enter Y to delete old kernel files and signature files. After the update is complete, enter Y to restart the machine when prompted.

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
login: nsroot
Password: nsroot
Last login: Mon Apr 19 03:37:27 2014 from 10.102.29.9
Done

save config
shell
Last login: Mon Apr 10 03:51:42 from 10.103.25.64
root@NSnnn# cd /var/nsinstall
root@NSnnn# mkdir build_49
root@NSnnn# cd build_49

# Using winscp copy the build file to netscaler.
root@NSnnn# tar -xzvf build-10.5-49_nc.tgz
root@NSnnn# ./installns
installns version (10.5-49) kernel (ns-10.5-49_nc.gz)
...
...
...
Copying ns-10.5-49_nc.gz to /flash/ns-10.5-49_nc.gz ...
...
Installation has completed.
Reboot NOW? [Y/N] Y

Upgrade a standalone NetScaler using GUI

Login to Citrix website and download the firmware file to your machine.

  1. In a Web browser, type the IP address of the NetScaler, such as http://10.102.29.50.

  2. In User Name and Password, type the administrator credentials and then click Login, as shown in the following figure.

    https://www.mediafire.com/convkey/ec08/q2n3zb89vyrr33p7g.jpg
    NS_Login
  3. In the configuration utility, in the navigation pane, click System.

  4. In the System Overview page, click System Upgrade.

  5. Upload the firmware update file and check “reboot after successful installation”. Follow the instructions to upgrade the software.

    Note: After the upgrade, close all browser instances and clear your computer’s cache before accessing the appliance.

Upgrading a High Availability Pair

To upgrade the system software on NetScaler units in a high availability (HA) pair, first upgrade the secondary node, and then the primary node.

Note: If the two nodes in an HA configuration are running different NetScaler software releases, the following information does not get synchronized on the primary and secondary nodes:

  • States of the services
  • Connection failover sessions
  • Persistence sessions
https://www.mediafire.com/convkey/dfe6/q6y2qyw3egq7lsv7g.jpg
Upgrade HA pair

In the following procedure, machine A is the primary node and machine B is the secondary node before the upgrade.

Upgrade NetScaler HA pair using the GUI

On machine B (original secondary node)

  1. Download and Upload the firmware tgz file to the netscaler using winscp. Login to secondary netscaler GUI and save the configuration. Next, goto system/system upgrade. Select the firmware file from the netscaler and check “reboot after successful installation” option. Follow the instructions to upgrade the software.

  2. After the appliance restarts, log on with the administrator credentials through putty and enter the show ha node command to verify that the appliance is a secondary node.

  3. Test the new build by entering the force failover command on the secondary node (machine B). At the putty session, typeforce failover. When you do so, machine B becomes the primary node. If machine B does not function as expected, enter the force failover command on the new primary node (machine B) forcing it to again become the secondary node, and contact Citrix Customer Service before proceeding.

  4. Enter the show ha node command to verify that machine B is the new primary node.

    Example

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    
    login: nsroot
    Password: nsroot
    Last login: Mon Mar  26 08:37:26 2008 from 10.102.29.9
    Done
    show ha node
            2 nodes:
    1)      Node ID:      0
            IP:        10.0.4.2
            Node State: UP
            Master State: Primary
            ...
            Sync State: AUTO DISABLED
            Propagation: AUTO DISABLED
            ...
    Done
    

    Note: After machine B is upgraded successfully, both synchronization and propagation are automatically disabled until you upgrade machine A.

    On machine A (original primary node)

  5. Login to secondary netscaler GUI, goto system/system upgrade. Upload the firmware update file and check “reboot after successful installation”. Follow the instructions to upgrade the software.

  6. After the appliance restarts, log on by using the administrator credentials, and enter the show ha node command to verify that the appliance is a secondary node and that synchronization is disabled.

    Note: After both nodes are upgraded successfully, synchronization and propagation are automatically enabled.

    On machine A and machine B

  7. After successfully upgrading both the nodes, run the show ha node command to verify that synchronization and propagation are enabled on the primary node and synchronization is successful and propagation is enabled on the secondary node.

    Example

    On Primary node (Machine B)

    show ha node

        Node ID:      0
        IP:   10.0.4.2
        Node State: UP
        Master State: Primary
        INC State: DISABLED
        Sync State: ENABLED
        Propagation: ENABLED
        Enabled Interfaces : 1/1
        Disabled Interfaces : None
        HA MON ON Interfaces : 1/1
        Local node information
        Critical Interfaces: 1/1
    

    On Secondary node (Machine A)

    Show ha node

        Node ID:      0
        IP:   10.0.4.11
        Node State: UP
        Master State: Secondary
        INC State: DISABLED
        Sync State: SUCCESS
        Propagation: ENABLED
        Enabled Interfaces : 1/1
        Disabled Interfaces : None
        HA MON ON Interfaces : 1/1
        Local node information:
        Critical Interfaces: 1/1
    

    On machine B (new primary node)

  8. Enter the save ns config command to save the configuration.

Machine B (original secondary node) is now the primary node and machine A (original primary node) is now the secondary node.

Note: You can enter the force failover command again to make machine A (original primary node) as the primary node and machine B (original secondary node) as the secondary node.

Upgrade NetScaler in a HA pair by using the CLI

Login to Citrix website and download the firmware file to your machine. To upgrade the HA pair using cli, login to secondary netscaler through putty, save the configuration and run below commands:

  1. Run save config command and cd /var/nsinstall
  2. mkdir build_<targetbuildnumber>
  3. cd build_<targetbuildnumber>
  4. Using winscp, upload the firmware file to this new folder on the netscaler.
  5. Extract the contents of the installation package. Example: tar –xvzf build_10.1-49.3_nc.tgz
  6. Run the installns script to install the new version of the system software. The script updates the /etc directory. Example: ./installns
  7. Enter Y to delete old signature files and kernel images.
  8. After the update is complete, enter Y to restart the machine when prompted.
  9. save config
  10. Run force ha failover command to make the upgraded machineB as primary. If it prompts for version mismatch warning, click y.
  11. Login to the other netscaler, which is machineA.
  12. save config
  13. cd /var/nsinstall/
  14. mkdir build_<targetbuildnumber>
  15. cd build_<targetbuildnumber>
  16. Using winscp, upload the firmware file to this new folder on the netscaler.
  17. Extract the contents of the installation package. Example: tar –xvzf build_10.1-49.3_nc.tgz
  18. Run the installns script to install the new version of the system software. The script updates the /etc directory. Example: 19. Run ./installns command.
  19. Enter Y to delete old signature files and kernel images.
  20. After the update is complete, enter Y to restart the machine when prompted.
  21. Run force ha failover to set machineA to primary back again.

Clear space on /var directory on NetScaler

When the amount of disk space is low in the /var directory of the appliance, you might not be able to sign in to the GUI. In this scenario, you can remove the old log files to create free space in the /var directory.

Ensure that you back up the files before removing the files from the appliance.

To free space in the /var directory of a NetScaler appliance, complete the following procedure:

Log on to the CLI of NetScaler by using SSH.

After you log on to the NetScaler CLI, switch to the shell prompt using the following command. shell

Run the following command to see the availability of space on the NetScaler appliance. df -h

If the memory capacity of the /var directory is filled up to 90 percent, then you must delete few files from this directory.

Run the following commands to view the contents of the /var directory: cd /var ls -l

The directories that are usually of interest are as follows:

/var/nstrace - This directory contains trace files.This is the most common reason for HDD being filled on the NetScaler appliance. This is due to an nstrace being left running for indefinite amount of time. All traces that are not of interest can and should be deleted. To stop an nstrace, go back to the CLI and issue stop nstrace command.

/var/log - This directory contains system specific log files.

/var/nslog - This directory contains NetScaler log files.

/var/tmp/support - This directory contains technical support files, also known as, support bundles. All files not of interest should be deleted.

/var/core - Core dumps are stored in this directory. There will be directories within this directory and they will be labeled with numbers starting with 1. These files can be quite large in size. Clear all files unless the core dumps are recent and investigation is required.

/var/crash - Crash files, such as process crashes are stored in this directory. Clear all files unless the crashes are recent and investigation is required.

/var/nsinstall - Firmware is placed in this directory when upgrading. Clear all files, except the firmware that is currently being used. Verify if any of the directories are using more space.

Commands to check freespace on NetScaler

  • Run the following command to check the availability of space on the appliance: df –h
  • df -ah all the folders to be displayed in a human readable format, with percentages
  • The easiest way to find these files is to run command du -sh /var/* | sort -nr | grep G this will print out the largest directories at the top with the format in gigabytes.
  • du -hs *

Delete the files which are not required: rm -r nstrace/*

If the log or nslog directory is using more space, then run the following commands to open the log directory and view its contents:

cd /var/log ls -l cd /var/nslog ls -l

Ensure that all files are compressed. This is indicated by the .tar.gz file name extension.

If the file is not compressed, perform the following:

For compressing the file to .gz format:

cd /var/log gzip

Compressed file is placed at /var/log

For compressing the file to .tar.gz format:

cd /var/nslog tar -cz .tar.gz

Compressed file is placed at /var/nslog

If you are using NetScaler Console, then verify the /var/ns_system_backup directory. Ensure that NetScaler Console clears the backup files it creates.

Source

Want to learn more on Citrix Automations and solutions???

Subscribe to get our latest content by email.

If you like our content, please support us by sponsoring on GitHub below: