[Bug 1089195] Re: linux-headers will eat your inodes on LTS.
John Tucker
johntucker.biz at gmail.com
Sun Dec 15 12:41:28 UTC 2013
I've a Dell Inspiron mini which came with Ubuntu installed. It's
running 12.04 lts and does very little apart from tv listings and
monitoring email (it's too small for regular use). Yet it ran out of
inodes as shown by df -i when the drive was about half-full according to
df -h.
This borked my ability to update packages and resulted in aptitude
reporting broken packages after an update attempt. Worse, it became
impossible to login to a graphical desktop. To recover, I needed to
boot into text mode by amending the grub boot-up commands and deleting
/tmp to free up sufficient inodes to allow the graphical desktop to load
ok. Then I used synaptic to delete the old linux-headers. The result
was inode usage dropped to a more reasonable 54%.
So yeah, untold numbers of Ubuntu installations are in danger of
mysteriously stopping working because ubuntu does not tidy up after
itself when installing new kernels.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1089195
Title:
linux-headers will eat your inodes on LTS.
Status in “update-manager” package in Ubuntu:
Confirmed
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-*-generic-pae package has approx. 6,700 files on
it. Regular headers packages have even more files: around 11,700 files
each.
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/linux-headers-2.6.32-45/arch/s390/include/asm/nmi.h.dpkg-new'
(while processing `./usr/src/linux-headers-2.6.32-45/arch/s390/include/asm/nmi.h'): No space left on device
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-2.6.32-21 [2.6.32-21.32]
Purg linux-headers-2.6.32-22-generic-pae [2.6.32-22.36]
Purg linux-headers-2.6.32-22 [2.6.32-22.36]
Purg linux-headers-2.6.32-23-generic-pae [2.6.32-23.37]
Purg linux-headers-2.6.32-23 [2.6.32-23.37]
Purg linux-headers-2.6.32-24-generic-pae [2.6.32-24.43]
Purg linux-headers-2.6.32-24 [2.6.32-24.43]
Purg linux-headers-2.6.32-25-generic-pae [2.6.32-25.45]
Purg linux-headers-2.6.32-25 [2.6.32-25.45]
Purg linux-headers-2.6.32-26-generic-pae [2.6.32-26.48]
Purg linux-headers-2.6.32-26 [2.6.32-26.48]
Purg linux-headers-2.6.32-27-generic-pae [2.6.32-27.49]
Purg linux-headers-2.6.32-27 [2.6.32-27.49]
Purg linux-headers-2.6.32-28-generic-pae [2.6.32-28.55]
Purg linux-headers-2.6.32-28 [2.6.32-28.55]
Purg linux-headers-2.6.32-29-generic-pae [2.6.32-29.58]
Purg linux-headers-2.6.32-29 [2.6.32-29.58]
Purg linux-headers-2.6.32-30-generic-pae [2.6.32-30.59]
Purg linux-headers-2.6.32-30 [2.6.32-30.59]
Purg linux-headers-2.6.32-31-generic-pae [2.6.32-31.61]
Purg linux-headers-2.6.32-31 [2.6.32-31.61]
Purg linux-headers-2.6.32-32-generic-pae [2.6.32-32.62]
Purg linux-headers-2.6.32-32 [2.6.32-32.62]
Purg linux-headers-2.6.32-33-generic-pae [2.6.32-33.72]
Purg linux-headers-2.6.32-33 [2.6.32-33.72]
Purg linux-headers-2.6.32-34-generic-pae [2.6.32-34.77]
Purg linux-headers-2.6.32-34 [2.6.32-34.77]
Purg linux-headers-2.6.32-35-generic-pae [2.6.32-35.78]
Purg linux-headers-2.6.32-35 [2.6.32-35.78]
Purg linux-headers-2.6.32-36-generic-pae [2.6.32-36.79]
Purg linux-headers-2.6.32-36 [2.6.32-36.79]
Purg linux-headers-2.6.32-37-generic-pae [2.6.32-37.81]
Purg linux-headers-2.6.32-37 [2.6.32-37.81]
Purg linux-headers-2.6.32-38-generic-pae [2.6.32-38.83]
Purg linux-headers-2.6.32-38 [2.6.32-38.83]
Purg linux-headers-2.6.32-39-generic-pae [2.6.32-39.86]
Purg linux-headers-2.6.32-39 [2.6.32-39.86]
Purg linux-headers-2.6.32-40-generic-pae [2.6.32-40.87]
Purg linux-headers-2.6.32-40 [2.6.32-40.87]
Purg linux-headers-2.6.32-41-generic-pae [2.6.32-41.94]
Purg linux-headers-2.6.32-41 [2.6.32-41.94]
Purg linux-headers-2.6.32-42-generic-pae [2.6.32-42.96]
Purg linux-headers-2.6.32-42 [2.6.32-42.96]
Purg linux-headers-2.6.32-43-generic-pae [2.6.32-43.97]
Purg linux-headers-2.6.32-43 [2.6.32-43.97]
Purg linux-headers-generic-pae [2.6.32.45.52]
Purg linux-image-2.6.32-42-generic-pae [2.6.32-42.96]
Purg linux-image-2.6.32-43-generic-pae [2.6.32-43.97]
Then, problem solved:
$ find /usr/src/ -type f | wc -l
28276
$ ls /usr/src/
linux-headers-2.6.32-44 linux-headers-2.6.32-45-generic-pae
linux-headers-2.6.32-44-generic-pae nvidia-current-195.36.24
linux-headers-2.6.32-45 virtualbox-ose-3.1.6
$ df -i --type=ext4
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda5 625856 192891 432965 31% /
/dev/sda6 6225920 95025 6130895 2% /home
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/1089195/+subscriptions
More information about the foundations-bugs
mailing list