linux-headers will eat your inodes on LTS.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
update-manager (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Hello all,
Summary
-----------------
Both linux-image-* and linux-headers-* are installed every time you upgrade the kernel. However, they are never removed by any maintenance process.
Every linux-headers-
Although these packages' files won't occupy much space, after some years (think LTS installation), they will "eat" all the inodes on your root partition.
The first effect you'll encounter will be the you are unable to upgrade your system.
This is a situation that will affect all users, however it will be a greater problem regular non-technical user.
There's no simple, high-level tool to solve this problem.
Case Study
---------------
I have a 2-year-and-8-months old 10.04 installation. I have a ~10GB root partition, which is double of the minimum recommend (5GB).
$ df -h --type=ext4
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 9.4G 6.2G 2.8G 70% /
/dev/sda6 94G 45G 45G 51% /home
It looks that I had plenty of space left to upgrade, but I got this error while upgrading:
unable to create `/usr/src/
(while processing `./usr/
It was because of I was running out of inodes:
$ df -i /
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda5 625856 618015 7841 99% /
Why? Because the huge amount of linux-headers files:
$ find /usr/src -type f | wc -l
355112
That is more than three hundred and fifty thousand files!
These are the packages that I removed:
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-headers-
Purg linux-image-
Purg linux-image-
Then, problem solved:
$ find /usr/src/ -type f | wc -l
28276
$ ls /usr/src/
linux-
linux-
linux-
$ df -i --type=ext4
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda5 625856 192891 432965 31% /
/dev/sda6 6225920 95025 6130895 2% /home
tags: | added: rls-bb-incoming |
This just happened to me on another 10.04.4 server installation. All while trying to upgrade kernel versions. This is an LTS version, and it has support until April 2015, however the old headers are still accumulating and eating inodes.
Please, I beg of you, take notice of this issue.
$ uname -a 50-generic- pae #112-Ubuntu SMP Tue Jul 9 20:44:31 UTC 2013 i686 GNU/Linux
Linux reinhardt 2.6.32-
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.4 LTS
Release: 10.04
Codename: lucid
$ df -i /
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda1 305216 302123 3093 99% /
$ ls -CF /usr/src headers- 2.6.32- 41/ headers- 2.6.32- 41-generic- pae/ headers- 2.6.32- 42/ headers- 2.6.32- 42-generic- pae/ headers- 2.6.32- 43/ headers- 2.6.32- 43-generic- pae/ headers- 2.6.32- 44/ headers- 2.6.32- 44-generic- pae/ headers- 2.6.32- 45/ headers- 2.6.32- 45-generic- pae/ headers- 2.6.32- 46/ headers- 2.6.32- 46-generic- pae/ headers- 2.6.32- 47/ headers- 2.6.32- 47-generic- pae/ headers- 2.6.32- 48/ headers- 2.6.32- 48-generic- pae/ headers- 2.6.32- 49/ headers- 2.6.32- 49-generic- pae/ headers- 2.6.32- 50/ headers- 2.6.32- 50-generic- pae/
linux-
linux-
linux-
linux-
linux-
linux-
linux-
linux-
linux-
linux-
linux-
linux-
linux-
linux-
linux-
linux-
linux-
linux-
linux-
linux-
$ find /usr/src/ -type f | wc -l
140492