HardyFullDiskHandling

Revision 2 as of 2007-11-14 06:32:13

Clear message

Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.

Summary

This spec describes a tool that helps the user to free diskspace by offering to remove temporary files.

Release Note

A new tool that helps freeing up diskspace is now part of the default install.

Rationale

If a machine runs low on diskspace the user is on his own. There is no good GUI tool to help him freeing space. The "system-cleanup" tool adresses this issue.

Use Cases

  1. Alice runs out of diskspace because her apt cache is too big
  2. Bob has a very small /boot parition and with the addition of new kernels it eventually runs out of space.

Design

The tools needs to be written in a way that makes it easy to add new GUI frontends (like qt/text) and to make it very easy to add custom free space plugins to make community participation easy.

When gnome-volume-manager (or kded) detect that the diskspace runs low, it pops up a notification. This notification should include a button to launch the system-cleanup helper with the appropriate fs that runs low on diskspace. The cleanup wizard should also be run when the dist-quota is full.

Some of the areas where space can be freed require administrative privileges. We will only show them if the user is in the admin group (or the distro specific equivalent).

Possible targets:

  • User:
    • tracker/strigi cache: maybe a problem because it can not be re-generated
      • (make sure to never remove "metadata")
    • thumbnail cache
    • firefox/epiphany/konqueror cache
    • Trash
    • ~/.thunderbird/*/ImapMail (dangerous)

    • ~/.evolution/mail (dangerous)
    • psp font cache from OpenOffice

    • google earth cache
    • xchat/pidin logs may be worth to be compressed (upstream!)
    • ccache
    • button to spawn baobab
    • debclean on all debian branches
  • System:
    • old rotated Logs
    • apt cache
    • apt-get autoremove / deborphan
    • old kernels
    • Unused / less used software : is there any way to list them?
      • (use the popcon heuristics for this?)

Depending on the partition layout the tool needs to make intelligent decisions. E.g.:

  • /var - cleanup apt cache
  • /boot - cleanup old kernels
  • /tmp - old cruft, but we need to be *very* careful (check out temp-reaper/tmp-watch)

Additionally it should offer to run something like "fdupes" to find duplicated files in the users homedir. If the tool runs out of ideas, it should offer to run baobab and let the user continue the cleanup manually.

It is important that we ensure that it is possible to login into gnome even if $HOME is full. We should add a automatic test for this.

Implementation

Each cleanup target is implemented as a plugin. The directory with the mount point that runs low on diskspace is passed to the plugin and it then declares how much space it can free where (symlinks needs to be considered too). Support for a global plugin dir where applications can store plugins (e.g. opera to delete its own cache) as well as user plugins should be added.

Test/Demo Plan

It's important that we are able to test new features, and demonstrate them to users. Use this section to describe a short plan that anybody can follow that demonstrates the feature is working. This can then be used during CD testing, and to show off after release.

This need not be added or completed until the specification is nearing beta.

Outstanding Issues

What to do for kde? they don't have a daemon that checks the disk space.

BoF agenda and discussion

gnome-volume-manager has some heuristics to take the velocity of disk-fill up into account (do some learning here to try to figure out the users disk-usage pattern?)

Random:

  • Like the out of memory killer of the kernel, the tool could stop/kill application that will conduct to disk full


CategorySpec