How To: Recover the Disk Space on the LANDESK Management Gateway

Version 8

    Description

     

    The Management Gateway may run out of disk space causing it to not function.

     

    Cause

     

    Log are not properly purged.  Logs are normally stored in /var/log.  There are also logs that are entered into the Local MYSQL database.

     

    Sometimes this is due to a lack of configuration of the System e-mail settings in the web interface.  Without the email settings, the logs accumulate on the Gateway while with proper settings, the logs would normally be sent via e-mail and reduced.

     

    Resolution

     

    1. Log into the Management Gateway.

    2. Press Alt-F2 to switch to a different screen.
       

      Note:

      To switch back to the main screen press Ctrl+Alt+F5 note in older versions it may be Alt-F1.  The windows manager that the Gateway uses is Fluxbox.

    3. Right-click anywhere on the desktop to get the Fluxbox menu to appear.  It will display some options as follows:

      • xterm

      • Admin Console

      • fluxbox menu

        • Logout

        • Reboot

        • Shutdown

    4. Choose xterm.  This opens an xterm command prompt.

    5. In the command prompt, open a shell running as root:

      sudo sh

       

      Warning!

      Now every command is issued as root. Entering a wrong command can potentially damage the Gateway installation

    6. To check the disk space utilization issue the command:

      df -h


      Check the Used column. If the usage is near to 100% there is definitely a disk space problem. 

    7. See if there are any files in /var larger than 20 MB.

      sudo find /var -size +20M


        

      Important

      Do not delete the large database files manually as doing this could cause corruption. 
        

    8. If the issue is with text log files, do the following: 

      1. Check the /var/log directory by entering the following commands:

        cd /var/log ls -lah


        A list of files with the size will be displayed. 

      2. If any text log files are found, such as the debug file, consider deleted and recreating them.  If deleting the file, run the following commands:

         #View current file permissions sudo ls -lAF somefile # Remove the file sudo rm somefile # Recreate the file sudo touch somefile # Set the permissions back to what they were above chown 644 somefile

         

    9. Check again with the command df -h the space left on the device. If the situation is improved and no database files seem large, do not continue. If the database files are large then it is necessary to purge the logs that are stored in the MySQL database. To purge the logs in the MySQL database do the following 

      1. Stop the gateway service. 

      2. Obtain the MySQL password.

        sudo cat /root/.dbtool

         

      3. Log into MySQL. 

        sudo mysql -p

         

      4. Delete all rows from the log table form the syslog database.

        use syslog; delete from logs;

         

        Note:

        If many errors are occurring and the database logs continue to fill up, you may want to delete from logs regularly.  Also, you may want to contact support and discuss the errors you are seeing that are causing the logs to fill up.