ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
827
346
363
cPanel Access Level
DataCenter Provider
How big is the /boot partition? You can get that from SSH by doing the following:

cd /boot
df -h .

The only things that are in the /boot partition are the parts of the kernel needed to boot. If it's filling up, then the only thing you can really do is to tell yum/dnf/apt to save less kernel versions. From memory CentOS based systems will save 5 kernels.
 

dxb04

Well-Known Member
Dec 27, 2020
66
4
8
UAE
cPanel Access Level
Root Administrator
How big is the /boot partition? You can get that from SSH by doing the following:

cd /boot
df -h .

The only things that are in the /boot partition are the parts of the kernel needed to boot. If it's filling up, then the only thing you can really do is to tell yum/dnf/apt to save less kernel versions. From memory CentOS based systems will save 5 kernels.

Filesystem Size Used Avail Use% Mounted on
/dev/md1 487M 424M 39M 92% /boot


It is almost full
How can i adjust ?

I found this too :



The filesystem “/” mounted at “/” reached “warn” status because you currently use 87.1% of its available blocks.



Used:357.83 GB Available:56.27 GB Total:436.34 GB

Is it related to files saved on the drive or it could be something else ?!
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
827
346
363
cPanel Access Level
DataCenter Provider
The only thing you can do to free up space in /boot is to remove kernels. You can figure out how may you have by simply listing the files and counting the number of vmlinuz* files there. A 487 MB boot partition is really small. In /etc/yum.conf you can set "installonly_limit=#" (where # is a number) and that will limit you to only # kernels and any more than that will be removed when a new one is installed. You need at least 2, so you can go back to an older kernel if you have issues. You can also use "package-cleanup --oldkernels --count=#" to manually reduce the number of kernels to #. You'll want to search/read up on "limit number of kernels CentOS" or something like that to get more details etc.

The root partition ("/") is where everything else is stored. The rest of the OS, all your sites/email, MySQL is stored there. Unless you have very large error_log files the only way to clean up space to to reduce the account usage.

You basically have a very small system.
 

dxb04

Well-Known Member
Dec 27, 2020
66
4
8
UAE
cPanel Access Level
Root Administrator
The only thing you can do to free up space in /boot is to remove kernels. You can figure out how may you have by simply listing the files and counting the number of vmlinuz* files there. A 487 MB boot partition is really small. In /etc/yum.conf you can set "installonly_limit=#" (where # is a number) and that will limit you to only # kernels and any more than that will be removed when a new one is installed. You need at least 2, so you can go back to an older kernel if you have issues. You can also use "package-cleanup --oldkernels --count=#" to manually reduce the number of kernels to #. You'll want to search/read up on "limit number of kernels CentOS" or something like that to get more details etc.

The root partition ("/") is where everything else is stored. The rest of the OS, all your sites/email, MySQL is stored there. Unless you have very large error_log files the only way to clean up space to to reduce the account usage.

You basically have a very small system.
If you mean in /Boot
All files are those :

total 411824
dr-xr-xr-x. 6 root root 4096 Mar 4 03:31 .
drwxr-xr-x 20 root root 4096 Mar 18 00:10 ..
-rw-r--r-- 1 root root 153567 Aug 25 2020 config-3.10.0-1127.19.1.el7.x86_64
-rw-r--r-- 1 root root 153596 Dec 18 2020 config-3.10.0-1160.11.1.el7.x86_64
-rw-r--r-- 1 root root 153596 Jun 10 2021 config-3.10.0-1160.31.1.el7.x86_64
-rw-r--r-- 1 root root 153595 Nov 17 2020 config-3.10.0-1160.6.1.el7.x86_64
-rw-r--r-- 1 root root 153619 Jan 25 20:45 config-3.10.0-1160.83.1.el7.x86_64
drwxr-xr-x. 3 root root 1024 Sep 18 2017 efi
drwxr-xr-x. 2 root root 1024 Dec 9 2020 grub
drwx------. 5 root root 1024 Feb 22 00:31 grub2
-rw-------. 1 root root 51313370 Sep 18 2017 initramfs-0-rescue-9063ac396d784f4c997ceacdd0590c25.img
-rw------- 1 root root 52462335 Jun 12 2021 initramfs-3.10.0-1127.19.1.el7.x86_64.img
-rw------- 1 root root 13756102 Jun 12 2021 initramfs-3.10.0-1127.19.1.el7.x86_64kdump.img
-rw------- 1 root root 53847637 Nov 11 05:04 initramfs-3.10.0-1160.11.1.el7.x86_64.img
-rw------- 1 root root 13757946 Jun 17 2021 initramfs-3.10.0-1160.11.1.el7.x86_64kdump.img
-rw------- 1 root root 53850884 Nov 11 05:03 initramfs-3.10.0-1160.31.1.el7.x86_64.img
-rw------- 1 root root 52465237 Jun 12 2021 initramfs-3.10.0-1160.6.1.el7.x86_64.img
-rw------- 1 root root 54257895 Feb 22 00:31 initramfs-3.10.0-1160.83.1.el7.x86_64.img
-rw------- 1 root root 13800046 Mar 4 03:31 initramfs-3.10.0-1160.83.1.el7.x86_64kdump.img
drwx------ 2 root root 12288 Dec 9 2020 lost+found
-rw-r--r-- 1 root root 320536 Aug 25 2020 symvers-3.10.0-1127.19.1.el7.x86_64.gz
-rw-r--r-- 1 root root 320678 Dec 18 2020 symvers-3.10.0-1160.11.1.el7.x86_64.gz
-rw-r--r-- 1 root root 320759 Jun 10 2021 symvers-3.10.0-1160.31.1.el7.x86_64.gz
-rw-r--r-- 1 root root 320667 Nov 17 2020 symvers-3.10.0-1160.6.1.el7.x86_64.gz
-rw-r--r-- 1 root root 320743 Jan 25 20:46 symvers-3.10.0-1160.83.1.el7.x86_64.gz
-rw------- 1 root root 3612420 Aug 25 2020 System.map-3.10.0-1127.19.1.el7.x86_64
-rw------- 1 root root 3617106 Dec 18 2020 System.map-3.10.0-1160.11.1.el7.x86_64
-rw------- 1 root root 3620234 Jun 10 2021 System.map-3.10.0-1160.31.1.el7.x86_64
-rw------- 1 root root 3617083 Nov 17 2020 System.map-3.10.0-1160.6.1.el7.x86_64
-rw------- 1 root root 3623845 Jan 25 20:45 System.map-3.10.0-1160.83.1.el7.x86_64
-rwxr-xr-x. 1 root root 5877760 Sep 18 2017 vmlinuz-0-rescue-9063ac396d784f4c997ceacdd0590c25
-rwxr-xr-x 1 root root 6765160 Aug 25 2020 vmlinuz-3.10.0-1127.19.1.el7.x86_64
-rw-r--r-- 1 root root 172 Aug 25 2020 .vmlinuz-3.10.0-1127.19.1.el7.x86_64.hmac
-rwxr-xr-x 1 root root 6769256 Dec 18 2020 vmlinuz-3.10.0-1160.11.1.el7.x86_64
-rw-r--r-- 1 root root 172 Dec 18 2020 .vmlinuz-3.10.0-1160.11.1.el7.x86_64.hmac
-rwxr-xr-x 1 root root 6773352 Jun 10 2021 vmlinuz-3.10.0-1160.31.1.el7.x86_64
-rw-r--r-- 1 root root 172 Jun 10 2021 .vmlinuz-3.10.0-1160.31.1.el7.x86_64.hmac
-rwxr-xr-x 1 root root 6769256 Nov 17 2020 vmlinuz-3.10.0-1160.6.1.el7.x86_64
-rw-r--r-- 1 root root 171 Nov 17 2020 .vmlinuz-3.10.0-1160.6.1.el7.x86_64.hmac
-rwxr-xr-x 1 root root 7051880 Jan 25 20:45 vmlinuz-3.10.0-1160.83.1.el7.x86_64
-rw-r--r-- 1 root root 172 Jan 25 20:45 .vmlinuz-3.10.0-1160.83.1.el7.x86_64.hmac



There is only 11 vmlinuz , which one should i remove ?

* About "installonly_limit=#" , currently it is set to 5 , is it enough ?!

* Also "package-cleanup --oldkernels --count=#" , should it be set to 5 in my case or it doesn't matter to the previous number of ( installonly_limit ) .

* The root partition , it is almost 500 GB of size , i think it could be the Backup files which is taking more space , what command can alow me view the large files / folders ?
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
827
346
363
cPanel Access Level
DataCenter Provider
You currently have 5 kernels installed (I don't believe the rescue kernel counts):


-rwxr-xr-x. 1 root root 5877760 Sep 18 2017 vmlinuz-0-rescue-9063ac396d784f4c997ceacdd0590c25
-rwxr-xr-x 1 root root 6765160 Aug 25 2020 vmlinuz-3.10.0-1127.19.1.el7.x86_64
-rwxr-xr-x 1 root root 6769256 Dec 18 2020 vmlinuz-3.10.0-1160.11.1.el7.x86_64
-rwxr-xr-x 1 root root 6773352 Jun 10 2021 vmlinuz-3.10.0-1160.31.1.el7.x86_64
-rwxr-xr-x 1 root root 6769256 Nov 17 2020 vmlinuz-3.10.0-1160.6.1.el7.x86_64
-rwxr-xr-x 1 root root 7051880 Jan 25 20:45 vmlinuz-3.10.0-1160.83.1.el7.x86_64

You don't want to just remove files, you either need to run the package-cleanup or change the installonly_limit and then yum will clean up properly.

If you are backing up to your root partition, that will eat up a lot of your space. How much depends on how you are backing up (compressed, incremental etc.) and how much you are retaining. You may want to look at off server backup storage.
 

dxb04

Well-Known Member
Dec 27, 2020
66
4
8
UAE
cPanel Access Level
Root Administrator
You currently have 5 kernels installed (I don't believe the rescue kernel counts):


-rwxr-xr-x. 1 root root 5877760 Sep 18 2017 vmlinuz-0-rescue-9063ac396d784f4c997ceacdd0590c25
-rwxr-xr-x 1 root root 6765160 Aug 25 2020 vmlinuz-3.10.0-1127.19.1.el7.x86_64
-rwxr-xr-x 1 root root 6769256 Dec 18 2020 vmlinuz-3.10.0-1160.11.1.el7.x86_64
-rwxr-xr-x 1 root root 6773352 Jun 10 2021 vmlinuz-3.10.0-1160.31.1.el7.x86_64
-rwxr-xr-x 1 root root 6769256 Nov 17 2020 vmlinuz-3.10.0-1160.6.1.el7.x86_64
-rwxr-xr-x 1 root root 7051880 Jan 25 20:45 vmlinuz-3.10.0-1160.83.1.el7.x86_64

You don't want to just remove files, you either need to run the package-cleanup or change the installonly_limit and then yum will clean up properly.

If you are backing up to your root partition, that will eat up a lot of your space. How much depends on how you are backing up (compressed, incremental etc.) and how much you are retaining. You may want to look at off server backup storage.
As i mentioned , installonly_limit already set to 5 ,

so what do you think ?

The backup is on " Compressed " , it is set to daily and monthly .
But my question about this , is there a way to delete old backups , lets say if it is older than a month , the system delete it automatically.