How to extend i node Value(df -i) or delete unwanted files

Asked by ramesh raman

Hi Team,

I am facing i node issue in /usr partition .Because of this problem i am getting problem while installing new Kernel . Please advise me how to extend inode in the partition . And give me solution to disable automatic kernel installation from ubuntu source.
Please find the

jaiken@live:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VG1-lv_root
                      7.4G 1.4G 5.6G 21% /
none 6.0G 196K 6.0G 1% /dev
tmpfs 6.0G 0 6.0G 0% /dev/shm
none 6.0G 116K 6.0G 1% /var/run
none 6.0G 0 6.0G 0% /var/lock
none 6.0G 0 6.0G 0% /lib/init/rw
/dev/mapper/VG1-lv_tmp
                      4.6G 544M 3.9G 13% /tmp
/dev/sda1 184M 81M 94M 47% /boot
/dev/mapper/VG1-lv_home
                       23G 17G 4.8G 78% /home
/dev/mapper/VG1-lv_usr
                      4.6G 1.9G 2.6G 43% /usr
/dev/mapper/VG1-lv_var
                      4.6G 3.3G 1.1G 76% /var
192.168.100.143:/localdatastore/backup/application
                      114G 78G 31G 72% /backup
/dev/sda3 158G 55G 96G 37% /apps
jaiken@live:~$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/VG1-lv_root
                      488640 64819 423821 14% /
none 179861 705 179156 1% /dev
tmpfs 182169 1 182168 1% /dev/shm
none 182169 79 182090 1% /var/run
none 182169 5 182164 1% /var/lock
none 182169 3 182166 1% /lib/init/rw
/dev/mapper/VG1-lv_tmp
                      305216 8416 296800 3% /tmp
/dev/sda1 48768 230 48538 1% /boot
/dev/mapper/VG1-lv_home
                     1525920 604384 921536 40% /home
/dev/mapper/VG1-lv_usr
                      305216 226790 78426 75% /usr
/dev/mapper/VG1-lv_var
                      305216 6630 298586 3% /var
192.168.100.143:/localdatastore/backup/application
                     7536640 546499 6990141 8% /backup
/dev/sda3 10485760 16931 10468829 1% /apps
jaiken@live:~$ htop

jaiken@live:~$ uname -a; lsb_release -a; dpkg -l | grep linux-image
Linux live.pharmalife.co.uk 2.6.32-42-generic-pae #95-Ubuntu SMP Wed Jul 25 16:1 3:09 UTC 2012 i686 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid
rc linux-image-2.6.32-37-generic-pae 2.6.32-37.81 Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-38-generic-pae 2.6.32-38.83 Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-39-generic-pae 2.6.32-39.86 Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-40-generic-pae 2.6.32-40.87 Linux kernel image for version 2.6.32 on x86
ii linux-image-2.6.32-41-generic-pae 2.6.32-41.91 Linux kernel image for version 2.6.32 on x86
ii linux-image-2.6.32-42-generic-pae 2.6.32-42.96 Linux kernel image for version 2.6.32 on x86
ii linux-image-2.6.32-43-generic-pae 2.6.32-43.97 Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-44-generic-pae 2.6.32-44.98 Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-45-generic-pae 2.6.32-45.104 Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-46-generic-pae 2.6.32-46.108 Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-47-generic-pae 2.6.32-47.109 Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-48-generic-pae 2.6.32-48.110 Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-49-generic-pae 2.6.32-49.111 Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-50-generic-pae 2.6.32-50.112 Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-51-generic-pae 2.6.32-51.113 Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-53-generic-pae 2.6.32-53.115 Linux kernel image for version 2.6.32 on x86
ii linux-image-2.6.32-54-generic-pae 2.6.32-54.116 Linux kernel image for version 2.6.32 on x86
ii linux-image-2.6.32-55-generic-pae 2.6.32-55.117 Linux kernel image for version 2.6.32 on x86
ii linux-image-generic-pae 2.6.32.55.62 Generi c Linux kernel image
jaiken@live:~$

Thanks in Advance
Ramesh R

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu zabbix Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

My advice is not to disable the installation of new kernel versions that bring in error corrections, but to do regular housekeeping.

Whenever a new kernel is installed, you should remove one old kernel version and the related kernel header package, to have just two versions of the kernel installed (the newest and for backup purposes one older one).

If you have a problem with space and/or inodes on /usr, this is most probably caused by kernel headers (the files of the kernels are mainly below /lib)

What is the output of

dpkg -l | grep linux-header

Revision history for this message
ramesh raman (rbmramesh) said :
#2

Hi Manfred,

Already i removed some old kernels. but the i-node value is still in 75%.
This is production server.
Please fins the details.
jaiken@live:~$ dpkg -l | grep linux-header
ii linux-headers-2.6.32-37 2.6.32-37.81
Header files related to Linux kernel version
ii linux-headers-2.6.32-37-generic-pae 2.6.32-37.81
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-38 2.6.32-38.83
Header files related to Linux kernel version
ii linux-headers-2.6.32-38-generic-pae 2.6.32-38.83
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-39 2.6.32-39.86
Header files related to Linux kernel version
ii linux-headers-2.6.32-39-generic-pae 2.6.32-39.86
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-40 2.6.32-40.87
Header files related to Linux kernel version
ii linux-headers-2.6.32-40-generic-pae 2.6.32-40.87
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-41 2.6.32-41.91
Header files related to Linux kernel version
ii linux-headers-2.6.32-41-generic-pae 2.6.32-41.91
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-42 2.6.32-42.96
Header files related to Linux kernel version
ii linux-headers-2.6.32-42-generic-pae 2.6.32-42.96
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-43 2.6.32-43.97
Header files related to Linux kernel version
ii linux-headers-2.6.32-43-generic-pae 2.6.32-43.97
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-44 2.6.32-44.98
Header files related to Linux kernel version
ii linux-headers-2.6.32-44-generic-pae 2.6.32-44.98
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-45 2.6.32-45.104
Header files related to Linux kernel version
ii linux-headers-2.6.32-45-generic-pae 2.6.32-45.104
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-46 2.6.32-46.108
Header files related to Linux kernel version
ii linux-headers-2.6.32-46-generic-pae 2.6.32-46.108
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-47 2.6.32-47.109
Header files related to Linux kernel version
ii linux-headers-2.6.32-47-generic-pae 2.6.32-47.109
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-48 2.6.32-48.110
Header files related to Linux kernel version
ii linux-headers-2.6.32-48-generic-pae 2.6.32-48.110
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-49 2.6.32-49.111
Header files related to Linux kernel version
ii linux-headers-2.6.32-49-generic-pae 2.6.32-49.111
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-50 2.6.32-50.112
Header files related to Linux kernel version
ii linux-headers-2.6.32-50-generic-pae 2.6.32-50.112
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-53 2.6.32-53.115
Header files related to Linux kernel version
ii linux-headers-2.6.32-53-generic-pae 2.6.32-53.115
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-54 2.6.32-54.116
Header files related to Linux kernel version
ii linux-headers-2.6.32-54-generic-pae 2.6.32-54.116
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-55 2.6.32-55.117
Header files related to Linux kernel version
ii linux-headers-2.6.32-55-generic-pae 2.6.32-55.117
Linux kernel headers for version 2.6.32 on x
ii linux-headers-generic-pae 2.6.32.55.62
Generic Linux kernel headers
jaiken@live:~$

Regards,
Ramesh R

On Wed, Feb 12, 2014 at 9:16 PM, Manfred Hampl <
<email address hidden>> wrote:

> Your question #243817 on zabbix in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> My advice is not to disable the installation of new kernel versions that
> bring in error corrections, but to do regular housekeeping.
>
> Whenever a new kernel is installed, you should remove one old kernel
> version and the related kernel header package, to have just two versions
> of the kernel installed (the newest and for backup purposes one older
> one).
>
> If you have a problem with space and/or inodes on /usr, this is most
> probably caused by kernel headers (the files of the kernels are mainly
> below /lib)
>
> What is the output of
>
> dpkg -l | grep linux-header
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R
*9789243339, 7845264507*

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

What is the output of:

apt-cache policy gedit

Thanks

Revision history for this message
ramesh raman (rbmramesh) said :
#4

Hi Team,
Please Find the details.

jaiken@live:~$ apt-cache policy gedit
gedit:
  Installed: (none)
  Candidate: 2.30.3-0ubuntu0.1
  Version table:
     2.30.3-0ubuntu0.1 0
        500 http://mirror.rackspace.com/ubuntu/ lucid-updates/main Packages
     2.30.0git20100413-0ubuntu1 0
        500 http://mirror.rackspace.com/ubuntu/ lucid/main Packages
jaiken@live:~$

Regards,
Ramesh R

On Wed, Feb 12, 2014 at 10:21 PM, actionparsnip <
<email address hidden>> wrote:

> Your question #243817 on zabbix in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> Status: Open => Needs information
>
> actionparsnip requested more information:
> What is the output of:
>
> apt-cache policy gedit
>
> Thanks
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R
*9789243339, 7845264507*

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Lucid is no longer supported on the desktop. It is only supported on the server. I suggest you upgrade to Precise (Ubuntu 12.04) which you can do in one jump as it is an LTS to LTS upgrade.

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

As expected I see around 15 outdated kernel header packages (each pair is order of magnitude 15K files with 80 MB size)

Try the following command for cleanup:

sudo dpkg -p \
linux-headers-2.6.32-37 \
linux-headers-2.6.32-37-generic-pae \
linux-headers-2.6.32-38 \
linux-headers-2.6.32-38-generic-pae \
linux-headers-2.6.32-39 \
linux-headers-2.6.32-39-generic-pae \
linux-headers-2.6.32-40 \
linux-headers-2.6.32-40-generic-pae \
linux-headers-2.6.32-41 \
linux-headers-2.6.32-41-generic-pae \
linux-headers-2.6.32-43 \
linux-headers-2.6.32-43-generic-pae \
linux-headers-2.6.32-44 \
linux-headers-2.6.32-44-generic-pae \
linux-headers-2.6.32-45 \
linux-headers-2.6.32-45-generic-pae \
linux-headers-2.6.32-46 \
linux-headers-2.6.32-46-generic-pae \
linux-headers-2.6.32-47 \
linux-headers-2.6.32-47-generic-pae \
linux-headers-2.6.32-48 \
linux-headers-2.6.32-48-generic-pae \
linux-headers-2.6.32-49 \
linux-headers-2.6.32-49-generic-pae \
linux-headers-2.6.32-50 \
linux-headers-2.6.32-50-generic-pae \
linux-headers-2.6.32-53 \
linux-headers-2.6.32-53-generic-pae \
linux-headers-2.6.32-54 \
linux-headers-2.6.32-54-generic-pae

I assume that this system is a server, and it seems that the system has not been restarted for quite a while (it is running the -42 kernel from September 2012, even though a -55 version from January 2014 is already installed).

I recommend developing a housekeeping schedule with periodic restarts of the server and regular cleanup actions.

Revision history for this message
ramesh raman (rbmramesh) said :
#7

Hi Manfred,
This is server only . If i did anything wrong total production will affect.
So kindly advise me to do further.

Regards,
Ramesh R

On Thu, Feb 13, 2014 at 1:31 PM, Manfred Hampl <
<email address hidden>> wrote:

> Your question #243817 on zabbix in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> Manfred Hampl proposed the following answer:
> As expected I see around 15 outdated kernel header packages (each pair
> is order of magnitude 15K files with 80 MB size)
>
> Try the following command for cleanup:
>
> sudo dpkg -p \
> linux-headers-2.6.32-37 \
> linux-headers-2.6.32-37-generic-pae \
> linux-headers-2.6.32-38 \
> linux-headers-2.6.32-38-generic-pae \
> linux-headers-2.6.32-39 \
> linux-headers-2.6.32-39-generic-pae \
> linux-headers-2.6.32-40 \
> linux-headers-2.6.32-40-generic-pae \
> linux-headers-2.6.32-41 \
> linux-headers-2.6.32-41-generic-pae \
> linux-headers-2.6.32-43 \
> linux-headers-2.6.32-43-generic-pae \
> linux-headers-2.6.32-44 \
> linux-headers-2.6.32-44-generic-pae \
> linux-headers-2.6.32-45 \
> linux-headers-2.6.32-45-generic-pae \
> linux-headers-2.6.32-46 \
> linux-headers-2.6.32-46-generic-pae \
> linux-headers-2.6.32-47 \
> linux-headers-2.6.32-47-generic-pae \
> linux-headers-2.6.32-48 \
> linux-headers-2.6.32-48-generic-pae \
> linux-headers-2.6.32-49 \
> linux-headers-2.6.32-49-generic-pae \
> linux-headers-2.6.32-50 \
> linux-headers-2.6.32-50-generic-pae \
> linux-headers-2.6.32-53 \
> linux-headers-2.6.32-53-generic-pae \
> linux-headers-2.6.32-54 \
> linux-headers-2.6.32-54-generic-pae
>
> I assume that this system is a server, and it seems that the system has
> not been restarted for quite a while (it is running the -42 kernel from
> September 2012, even though a -55 version from January 2014 is already
> installed).
>
> I recommend developing a housekeeping schedule with periodic restarts of
> the server and regular cleanup actions.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817/+confirm?answer_id=5
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R
*9789243339, 7845264507*

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

The "sudo dpkg -P ...headers..." command given above should not do any harm to the server but remove thousands of unneeded files.

Noone expects that a car will be able to run without regular maintenance. Why do so many "system managers" believe that it is sufficient to install a server, and it will run forever without any need for supervison?
It should be possible to agree a schedule of rebooting the server once a quarter or once every six months to make sure that the most current versions of programs are loaded to get patches and error corrections activated.
And of course for each crucial server there should be a test system that it is possible to test beforehand, whether the new program versions still deliver the results as expected.
And I hope that I need not stress the importance of regular backups.

Revision history for this message
ramesh raman (rbmramesh) said :
#9

Hi Manfred,

I already faced /boot partition to get 95 % That time i get support from
your team
They proposed below script to run and purge old kernel images. Kindly
advise me, how to do step by step

Please find the details (Question #229013)
Mark Rijckenberg proposed the following answer:
I have created the following kernel removal script which might be a bit
more user-friendly.

I have no further suggestions to make.

#!/bin/bash
# TYPE: Bash script.
# PURPOSE: This bash shell script allows to easily remove GNU/Linux kernels.
# The script should be copied to /usr/bin/removekernel.bash and set as
executable.
# It is a poor man's alternative to Ubuntu Tweak.
# REQUIRES: bash, Ubuntu 10.04 LTS or newer
# REVISED: 20130517
# AUTHOR: Mark Rijckenberg

   echo "Please press one of the 4 numbers below and then hit the
<ENTER> key to execute"

select CHOICE in list-installed-kernels remove-a-specific-kernel
remove-all-previous-kernels quit
   do
case "$CHOICE" in

     list-installed-kernels)

     echo "List of currently installed Linux kernels"
     dpkg --list | grep linux-image | egrep '^[r,i]i' | cut -d" " -f3

     ;;
     remove-a-specific-kernel)

     echo "List of currently installed Linux kernels"
     dpkg --list | grep linux-image | egrep '^[r,i]i' | cut -d" " -f3
     echo "Please enter kernel package to uninstall from your pc (for
example: linux-image-3.9.0-030900rc5-generic) "
     read KERNELVERSION
     apt-cache search $KERNELVERSION|cut -d" " -f1|xargs sudo apt-get
remove -y

     ;;
     remove-all-previous-kernels)

     echo "Will now purge all the following kernel packages:"
     dpkg -l 'linux-*' | grep -v libc| sed '/^ii/!d;/'"$(uname -r | sed
"s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'
     dpkg -l 'linux-*' | grep -v libc| sed '/^ii/!d;/'"$(uname -r | sed
"s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'
| xargs sudo apt-get -y purge

     ;;
     quit)

     exit

     ;;
        esac

done

Regards,
Ramesh R

On Thu, Feb 13, 2014 at 3:46 PM, Manfred Hampl <
<email address hidden>> wrote:

> Your question #243817 on zabbix in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> The "sudo dpkg -P ...headers..." command given above should not do any
> harm to the server but remove thousands of unneeded files.
>
> Noone expects that a car will be able to run without regular maintenance.
> Why do so many "system managers" believe that it is sufficient to install a
> server, and it will run forever without any need for supervison?
> It should be possible to agree a schedule of rebooting the server once a
> quarter or once every six months to make sure that the most current
> versions of programs are loaded to get patches and error corrections
> activated.
> And of course for each crucial server there should be a test system that
> it is possible to test beforehand, whether the new program versions still
> deliver the results as expected.
> And I hope that I need not stress the importance of regular backups.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817/+confirm?answer_id=7
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R
*9789243339, 7845264507*

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

You have to be aware of the following:
About once a month there is a new kernel image version published, accompanied by the respective kernel header package.
The kernel image installs mainly to /boot and /lib, and the header files are mainly installed in /usr.

When such new package is installed, there is no automatic removal of the older ones, you have to care for that yourself. Newer releases of Ubuntu have added code that marks the older packages unnecessary, that they can easily be removed with sudo apt-get autoremove. (I am not sure which Ubuntu release provided that change, but for sure far later that 10.04.)

As far as I can see, the script provided by Marc Rijckenberg tries to remove either a single kernel image, or all kernel images and header files except those for the kernel that is booted at that time.
I am not sure whether that script fully takes into account the situation when you have not booted into the most current kernel (it might end up with dependency problems with the linux-image-generic-pae and linux-headers-generic-pae packages).

What I do not understand is that there was a question about running out of free space on a server named 351973-app4 https://answers.launchpad.net/ubuntu/+source/ntp/+question/233621 and now a similar problem pops up on this server.

Why have the recommandations for regular housekeeping given in other question documents not been applied to ALL your servers?

To put it very blunt:
Care for regular backup (unless the server and its data do not have any significance).
Permanently keep an eye on free space and free inodes on the file systems.
Regularly check error logs for messages that indicate the need for action.
Make sure to periodically reboot the systems to take benefit from the most current kernel and application versions.
When that reboot action is successful, purge outdated kernel image packages and kernel header packages.

Revision history for this message
ramesh raman (rbmramesh) said :
#11

Hi Manfred,
Thanks, Advise me to do purge old kernels one by one and related source
file in the /usr partition.

Regards,
Ramesh R

On Thu, Feb 13, 2014 at 5:16 PM, Manfred Hampl <
<email address hidden>> wrote:

> Your question #243817 on zabbix in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> You have to be aware of the following:
> About once a month there is a new kernel image version published,
> accompanied by the respective kernel header package.
> The kernel image installs mainly to /boot and /lib, and the header files
> are mainly installed in /usr.
>
> When such new package is installed, there is no automatic removal of the
> older ones, you have to care for that yourself. Newer releases of Ubuntu
> have added code that marks the older packages unnecessary, that they can
> easily be removed with sudo apt-get autoremove. (I am not sure which
> Ubuntu release provided that change, but for sure far later that 10.04.)
>
> As far as I can see, the script provided by Marc Rijckenberg tries to
> remove either a single kernel image, or all kernel images and header files
> except those for the kernel that is booted at that time.
> I am not sure whether that script fully takes into account the situation
> when you have not booted into the most current kernel (it might end up with
> dependency problems with the linux-image-generic-pae and
> linux-headers-generic-pae packages).
>
> What I do not understand is that there was a question about running out
> of free space on a server named 351973-app4
> https://answers.launchpad.net/ubuntu/+source/ntp/+question/233621 and
> now a similar problem pops up on this server.
>
> Why have the recommandations for regular housekeeping given in other
> question documents not been applied to ALL your servers?
>
> To put it very blunt:
> Care for regular backup (unless the server and its data do not have any
> significance).
> Permanently keep an eye on free space and free inodes on the file systems.
> Regularly check error logs for messages that indicate the need for action.
> Make sure to periodically reboot the systems to take benefit from the most
> current kernel and application versions.
> When that reboot action is successful, purge outdated kernel image
> packages and kernel header packages.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817/+confirm?answer_id=9
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R
*9789243339, 7845264507*

Revision history for this message
Manfred Hampl (m-hampl) said :
#12

Command for purging the header files was already given in https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817 response #6

Command for purging some obsolete kernel images (but not the one that was the active one at the beginning of this question thread):

sudo dpkg -p \
linux-image-2.6.32-37-generic-pae \
linux-image-2.6.32-38-generic-pae \
linux-image-2.6.32-39-generic-pae \
linux-image-2.6.32-40-generic-pae \
linux-image-2.6.32-41-generic-pae \
linux-image-2.6.32-43-generic-pae \
linux-image-2.6.32-44-generic-pae \
linux-image-2.6.32-45-generic-pae \
linux-image-2.6.32-46-generic-pae \
linux-image-2.6.32-47-generic-pae \
linux-image-2.6.32-48-generic-pae \
linux-image-2.6.32-49-generic-pae \
linux-image-2.6.32-50-generic-pae \
linux-image-2.6.32-51-generic-pae \
linux-image-2.6.32-53-generic-pae

Revision history for this message
ramesh raman (rbmramesh) said :
#13

Thanks Manfred,
I have checked already i removed some old kernels from server. but the
source files are not removed from /usr/src. I have used Mark Rijckenberg
script to remove old kernels.
Please find the kernal details and src file occupies 830MB..

root@live:/usr# du -shm * | sort -nr | head
860 src
486 lib
237 share
71 bin
48 local
20 include
14 sbin
1 lost+found
1 games
root@live:/usr# cd src/
root@live:/usr/src# ll -rth
total 92K
drwxr-xr-x 11 root root 4.0K 2011-12-22 12:32 ../
drwxr-xr-x 24 root root 4.0K 2012-03-23 06:47 linux-headers-2.6.32-40/
drwxr-xr-x 7 root root 4.0K 2012-03-23 06:47
linux-headers-2.6.32-40-generic-pae/
drwxr-xr-x 24 root root 4.0K 2012-07-23 07:38 linux-headers-2.6.32-41/
drwxr-xr-x 7 root root 4.0K 2012-07-23 07:38
linux-headers-2.6.32-41-generic-pae/
drwxr-xr-x 24 root root 4.0K 2012-09-05 07:50 linux-headers-2.6.32-42/
drwxr-xr-x 7 root root 4.0K 2012-09-05 07:50
linux-headers-2.6.32-42-generic-pae/
drwxr-xr-x 24 root root 4.0K 2012-09-18 07:30 linux-headers-2.6.32-43/
drwxr-xr-x 7 root root 4.0K 2012-09-18 07:30
linux-headers-2.6.32-43-generic-pae/
drwxrwxr-x 13 rack rack 4.0K 2012-09-22 10:09 zabbix-2.0.0/
drwxr-xr-x 24 root root 4.0K 2012-10-13 07:37 linux-headers-2.6.32-44/
drwxr-xr-x 7 root root 4.0K 2012-10-13 07:37
linux-headers-2.6.32-44-generic-pae/
drwxr-xr-x 24 root root 4.0K 2013-07-04 06:52 linux-headers-2.6.32-49/
drwxr-xr-x 7 root root 4.0K 2013-07-04 06:52
linux-headers-2.6.32-49-generic-pae/
drwxr-xr-x 24 root root 4.0K 2013-07-30 06:43 linux-headers-2.6.32-50/
drwxr-xr-x 7 root root 4.0K 2013-07-30 06:44
linux-headers-2.6.32-50-generic-pae/
drwxr-xr-x 24 root root 4.0K 2013-11-25 09:40 linux-headers-2.6.32-53/
drwxr-xr-x 7 root root 4.0K 2013-11-25 09:40
linux-headers-2.6.32-53-generic-pae/
drwxr-xr-x 24 root root 4.0K 2013-12-03 06:32 linux-headers-2.6.32-54/
drwxr-xr-x 7 root root 4.0K 2013-12-03 06:32
linux-headers-2.6.32-54-generic-pae/
drwxr-xr-x 24 root root 4.0K 2014-01-03 06:39 linux-headers-2.6.32-55/
drwxrwsr-x 23 root src 4.0K 2014-01-03 06:39 ./
drwxr-xr-x 7 root root 4.0K 2014-01-03 06:39
linux-headers-2.6.32-55-generic-pae/
root@live:/usr/src# uname -a; lsb_release -a; dpkg -l | grep linux-image
Linux live.pharmalife.co.uk 2.6.32-42-generic-pae #95-Ubuntu SMP Wed Jul 25
16:13:09 UTC 2012 i686 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid
rc linux-image-2.6.32-37-generic-pae 2.6.32-37.81
Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-38-generic-pae 2.6.32-38.83
Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-39-generic-pae 2.6.32-39.86
Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-40-generic-pae 2.6.32-40.87
Linux kernel image for version 2.6.32 on x86
ii linux-image-2.6.32-41-generic-pae 2.6.32-41.91
Linux kernel image for version 2.6.32 on x86
ii linux-image-2.6.32-42-generic-pae 2.6.32-42.96
Linux kernel image for version 2.6.32 on x86
ii linux-image-2.6.32-43-generic-pae 2.6.32-43.97
Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-44-generic-pae 2.6.32-44.98
Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-45-generic-pae 2.6.32-45.104
Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-46-generic-pae 2.6.32-46.108
Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-47-generic-pae 2.6.32-47.109
Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-48-generic-pae 2.6.32-48.110
Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-49-generic-pae 2.6.32-49.111
Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-50-generic-pae 2.6.32-50.112
Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-51-generic-pae 2.6.32-51.113
Linux kernel image for version 2.6.32 on x86
rc linux-image-2.6.32-53-generic-pae 2.6.32-53.115
Linux kernel image for version 2.6.32 on x86
ii linux-image-2.6.32-54-generic-pae 2.6.32-54.116
Linux kernel image for version 2.6.32 on x86
ii linux-image-2.6.32-55-generic-pae 2.6.32-55.117
Linux kernel image for version 2.6.32 on x86
ii linux-image-generic-pae 2.6.32.55.62
Generic Linux kernel image

If i use your command it will delete all source files also.
Please advise me to do.
Regards,
Ramesh R

On Thu, Feb 13, 2014 at 5:41 PM, Manfred Hampl <
<email address hidden>> wrote:

> Your question #243817 on zabbix in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> Command for purging the header files was already given in
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
> response #6
>
> Command for purging some obsolete kernel images (but not the one that
> was the active one at the beginning of this question thread):
>
> sudo dpkg -p \
> linux-image-2.6.32-37-generic-pae \
> linux-image-2.6.32-38-generic-pae \
> linux-image-2.6.32-39-generic-pae \
> linux-image-2.6.32-40-generic-pae \
> linux-image-2.6.32-41-generic-pae \
> linux-image-2.6.32-43-generic-pae \
> linux-image-2.6.32-44-generic-pae \
> linux-image-2.6.32-45-generic-pae \
> linux-image-2.6.32-46-generic-pae \
> linux-image-2.6.32-47-generic-pae \
> linux-image-2.6.32-48-generic-pae \
> linux-image-2.6.32-49-generic-pae \
> linux-image-2.6.32-50-generic-pae \
> linux-image-2.6.32-51-generic-pae \
> linux-image-2.6.32-53-generic-pae
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817/+confirm?answer_id=11
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R
*9789243339, 7845264507*

Revision history for this message
Manfred Hampl (m-hampl) said :
#14

Oops, sorry just found a small typo error in the commands, it must be a capital P instead of a small p.

sudo dpkg -P ...package names...

Revision history for this message
ramesh raman (rbmramesh) said :
#15

Thanks Manfred,
I have deleted 5 old kernels but the i-node only freed up 4%. I did this
all in UAT server.
Please findd the details
root@351973-app4:~# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/vg1-lv_root
                      488640 72943 415697 15% /
none 206471 720 205751 1% /dev
tmpfs 208781 1 208780 1% /dev/shm
none 208781 59 208722 1% /var/run
none 208781 5 208776 1% /var/lock
none 208781 3 208778 1% /lib/init/rw
/dev/mapper/vg1-lv_tmp
                      121920 82 121838 1% /tmp
/dev/sda1 48768 224 48544 1% /boot
/dev/sdb1 7536640 546499 6990141 8% /localdatastore
/dev/mapper/vg1-lv_usr
                      183264 131267 51997 72% /usr
/dev/sda4 2293760 593090 1700670 26% /home
/dev/mapper/vg1-lv_var
                      610800 24573 586227 5% /var
root@351973-app4:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg1-lv_root
                      7.4G 3.3G 3.8G 47% /
none 2.0G 204K 2.0G 1% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
none 2.0G 120K 2.0G 1% /var/run
none 2.0G 0 2.0G 0% /var/lock
none 2.0G 0 2.0G 0% /lib/init/rw
/dev/mapper/vg1-lv_tmp
                      1.9G 109M 1.7G 7% /tmp
/dev/sda1 184M 67M 109M 38% /boot
/dev/sdb1 114G 78G 31G 72% /localdatastore
/dev/mapper/vg1-lv_usr
                      2.8G 1.5G 1.2G 56% /usr
/dev/sda4 35G 27G 6.1G 82% /home
/dev/mapper/vg1-lv_var
                      9.2G 5.4G 3.4G 62% /var
root@351973-app4:~# dpkg -l | grep linux-header
pi linux-headers-2.6.32-39 2.6.32-39.86
Header files related to Linux kernel version
ii linux-headers-2.6.32-40 2.6.32-40.87
Header files related to Linux kernel version
ii linux-headers-2.6.32-42 2.6.32-42.96
Header files related to Linux kernel version
ii linux-headers-2.6.32-50 2.6.32-50.112
Header files related to Linux kernel version
ii linux-headers-2.6.32-51 2.6.32-51.113
Header files related to Linux kernel version
ii linux-headers-2.6.32-52 2.6.32-52.114
Header files related to Linux kernel version
ii linux-headers-2.6.32-52-generic-pae 2.6.32-52.114
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-53 2.6.32-53.115
Header files related to Linux kernel version
ii linux-headers-2.6.32-53-generic-pae 2.6.32-53.115
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-54 2.6.32-54.116
Header files related to Linux kernel version
ii linux-headers-2.6.32-54-generic-pae 2.6.32-54.116
Linux kernel headers for version 2.6.32 on x
ii linux-headers-2.6.32-55 2.6.32-55.117
Header files related to Linux kernel version
ii linux-headers-2.6.32-55-generic-pae 2.6.32-55.117
Linux kernel headers for version 2.6.32 on x
ii linux-headers-generic-pae 2.6.32.55.62
Generic Linux kernel headers

What can i do next further to achieve 50% free inode. Please advise me.

Regards,
Ramesh R

On Thu, Feb 13, 2014 at 6:07 PM, Manfred Hampl <
<email address hidden>> wrote:

> Your question #243817 on zabbix in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> Oops, sorry just found a small typo error in the commands, it must be a
> capital P instead of a small p.
>
> sudo dpkg -P ...package names...
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817/+confirm?answer_id=13
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R
*9789243339, 7845264507*

Revision history for this message
Manfred Hampl (m-hampl) said :
#16

"What can i do next further to achieve 50% free inode. Please advise me."
On what file system do you want to achieve that value?

see my response #10

Revision history for this message
ramesh raman (rbmramesh) said :
#17

Many Thanks,

I will check and update you. Please advise me how to stop auto kernel
installation.
Regards,
Ramesh R

On Thu, Feb 13, 2014 at 8:06 PM, Manfred Hampl <
<email address hidden>> wrote:

> Your question #243817 on zabbix in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> "What can i do next further to achieve 50% free inode. Please advise me."
> On what file system do you want to achieve that value?
>
> see my response #10
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
>
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817/+confirm?answer_id=15
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R
*9789243339, 7845264507*

Revision history for this message
ramesh raman (rbmramesh) said :
#18

Hi Manfred,

I purged 4 old kernals. I have checked only 2% i node only released. the
source files are occupied 860MB.
Kindly advise shall i delete this file is there any impact if i delete
Please find the details / usr/src

jaiken@live:~$ ll /usr/src/
total 92
drwxrwsr-x 23 root src 4096 2014-01-03 06:39 ./
drwxr-xr-x 11 root root 4096 2011-12-22 12:32 ../
drwxr-xr-x 24 root root 4096 2012-03-23 06:47 linux-headers-2.6.32-40/
drwxr-xr-x 7 root root 4096 2012-03-23 06:47
linux-headers-2.6.32-40-generic-pa
e/
drwxr-xr-x 24 root root 4096 2012-07-23 07:38 linux-headers-2.6.32-41/
drwxr-xr-x 7 root root 4096 2012-07-23 07:38
linux-headers-2.6.32-41-generic-pa
e/
drwxr-xr-x 24 root root 4096 2012-09-05 07:50 linux-headers-2.6.32-42/
drwxr-xr-x 7 root root 4096 2012-09-05 07:50
linux-headers-2.6.32-42-generic-pa
e/
drwxr-xr-x 24 root root 4096 2012-09-18 07:30 linux-headers-2.6.32-43/
drwxr-xr-x 7 root root 4096 2012-09-18 07:30
linux-headers-2.6.32-43-generic-pa
e/
drwxr-xr-x 24 root root 4096 2012-10-13 07:37 linux-headers-2.6.32-44/
drwxr-xr-x 7 root root 4096 2012-10-13 07:37
linux-headers-2.6.32-44-generic-pa
e/
drwxr-xr-x 24 root root 4096 2013-07-04 06:52 linux-headers-2.6.32-49/
drwxr-xr-x 7 root root 4096 2013-07-04 06:52
linux-headers-2.6.32-49-generic-pa
e/
drwxr-xr-x 24 root root 4096 2013-07-30 06:43 linux-headers-2.6.32-50/
drwxr-xr-x 7 root root 4096 2013-07-30 06:44
linux-headers-2.6.32-50-generic-pa
e/
drwxr-xr-x 24 root root 4096 2013-11-25 09:40 linux-headers-2.6.32-53/
drwxr-xr-x 7 root root 4096 2013-11-25 09:40
linux-headers-2.6.32-53-generic-pa
e/
drwxr-xr-x 24 root root 4096 2013-12-03 06:32 linux-headers-2.6.32-54/
drwxr-xr-x 7 root root 4096 2013-12-03 06:32
linux-headers-2.6.32-54-generic-pa
e/
drwxr-xr-x 24 root root 4096 2014-01-03 06:39 linux-headers-2.6.32-55/
drwxr-xr-x 7 root root 4096 2014-01-03 06:39
linux-headers-2.6.32-55-generic-pae

Regards,
Ramesh R

On Thu, Feb 13, 2014 at 9:26 PM, ramesh raman <
<email address hidden>> wrote:

> Your question #243817 on zabbix in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
>
> Status: Answered => Open
>
> You are still having a problem:
> Many Thanks,
>
> I will check and update you. Please advise me how to stop auto kernel
> installation.
> Regards,
> Ramesh R
>
>
> On Thu, Feb 13, 2014 at 8:06 PM, Manfred Hampl <
> <email address hidden>> wrote:
>
> > Your question #243817 on zabbix in Ubuntu changed:
> > https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
> >
> > Status: Open => Answered
> >
> > Manfred Hampl proposed the following answer:
> > "What can i do next further to achieve 50% free inode. Please advise me."
> > On what file system do you want to achieve that value?
> >
> > see my response #10
> >
> > --
> > If this answers your question, please go to the following page to let us
> > know that it is solved:
> >
> >
> https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817/+confirm?answer_id=15
> >
> > If you still need help, you can reply to this email or go to the
> > following page to enter your feedback:
> > https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817
> >
> > You received this question notification because you asked the question.
> >
>
>
> --
> Regards
>
> Ramesh R
> *9789243339, 7845264507*
>
> You received this question notification because you asked the question.
>

--
Regards

Ramesh R
*9789243339, 7845264507*

Revision history for this message
Manfred Hampl (m-hampl) said :
#19

In my opinion I have already givven the answers to your questions in https://answers.launchpad.net/ubuntu/+source/zabbix/+question/243817

comment #10: The kernel image installs mainly to /boot and /lib, and the header files are mainly installed in /usr.

So if you want to reduce usage of /usr, you have to purge redundant header files.

comment #6: Try the following command for cleanup: sudo dpkg -p \...

If you have meanwhile deleted some header packages, you have to omit their names from the command given at that time.

To repeat it once again:

A linux system needs a kernel to boot. There are different kernel versions available, about once a month a new version (with improvements and error corrections) is published. It is recommended to use current versions, but for activating a newer one you have to restart your system. When the system satisfactorily runs with a new kernel, all older versions can be deleted (purged). It is standard practice, however, to keep one older kernel version installed for backup and emergency purposes.

Together with each kernel version there is the kernel header package. In some cases (e.g. for installing some additional software) you need the header file for the kernel that you are running (see the terminal command "uname -a" for the version number of the kernel).

That means that you can purge all kernel header packages except those for the kernel that you are running and the one for the kernel version with the highest number available on your system.

Can you help with this problem?

Provide an answer of your own, or ask ramesh raman for more information if necessary.

To post a message you must log in.