BMC Helix - Clean up of the disk space for the docker container.

Version 2
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    BMC Helix Platform


    APPLIES TO:

    Customer Connectors, Docker



    QUESTION:

    How to perform house keeping actions on a Docker Container node?


    ANSWER:

     

    First, you need to check the available space in the Docker box.

      
       
    • You can run df -hT  to validate the space left on the disk and partitions.
      
      # df -hT  
    Filesystem     Type      Size  Used Avail Use% Mounted on  
    /dev/sda3      xfs        85G   15G   70G  18% /  
    devtmpfs       devtmpfs  7.9G     0  7.9G   0% /dev  
    tmpfs          tmpfs     7.9G  4.0K  7.9G   1% /dev/shm  
    tmpfs          tmpfs     7.9G  8.6M  7.9G   1% /run  
    tmpfs          tmpfs     7.9G     0  7.9G   0% /sys/fs/cgroup  
    /dev/sda1      xfs       950M  141M  810M  15% /boot  
    tmpfs          tmpfs     1.6G     0  1.6G   0% /run/user/0 
      

       
       
    •  Run docker ps that will print all your containers in the terminal
    •  
    •  Start desired docker container docker exec -it <conntainer_id or container_name> bash
    •  
    • When you get into the container, you can use the regular Linux commands to list file, check on disk space.
      
      # df -hT  
    Filesystem     Type      Size  Used Avail Use% Mounted on  
    /dev/sda3      xfs        85G   15G   70G  18% /  
    devtmpfs       devtmpfs  7.9G     0  7.9G   0% /dev  
    tmpfs          tmpfs     7.9G  4.0K  7.9G   1% /dev/shm  
    tmpfs          tmpfs     7.9G  8.6M  7.9G   1% /run  
    tmpfs          tmpfs     7.9G     0  7.9G   0% /sys/fs/cgroup  
    /dev/sda1      xfs       950M  141M  810M  15% /boot  
    tmpfs          tmpfs     1.6G     0  1.6G   0% /run/user/0 
      
       
    • On this example, we will get rid of the core dump files that are consuming most of the disk space:
                   find ./  -type f  -name "*core*"   -mtime +1 -exec ls -lrth {} \;
                find ./ -type f  -name "*core*"    -mtime +1 -exec gzip  -v9 {} \;
                find ./ -type f  -name "*core.gz*" -mtime +1 -exec rm -f {} \;
      
       
    • After that, you should be able to start your connector.
      
      

     


    Article Number:

    000175621


    Article Type:

    FAQ/Procedural



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles