How to solve jenkins 'Disk space is too low' issue?

前端 未结 8 1352
南笙
南笙 2021-01-31 07:40

I have deployed Jenkins in my CentOS machine, Jenkins was working well for 3 days, but yesterday there was a Disk space is too low. Only 1.019GB left.

8条回答
  •  甜味超标
    2021-01-31 08:43

    Beside above solutions, there is a more "COMMON" way - directly delete the largest space consumer from Linux machine. You can follow the below steps:

    1. Login to Jenkins machine (Putty)
    2. cd to the Jenkins installation path

    Using ls -lart to list out hidden folder also, normally jenkin installation is placed in .jenkins/ folder

    [xxxxx ~]$ ls -lart

    drwxrwxr-x 12 xxxx 4096 Feb 8 02:08 .jenkins/

    1. list out the folders spaces

    Use df -h to show Disk space in high level

    du -sh ./*/ to list out total memory for each subfolder in current path.

    du -a /etc/ | sort -n -r | head -n 10 will list top 10 directories eating disk space in /etc/

    1. Delete old build or other large size folder

    Normally ./job/ folder or ./workspace/ folder can be the largest folder. Please go inside and delete base on you need (DO NOT delete entire folder).

    rm -rf theFolderToDelete

提交回复
热议问题