Documented wwctl clean

Closes #2034

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2026-03-18 14:22:49 -06:00
parent c13c94ff85
commit db7e859112
4 changed files with 75 additions and 5 deletions

View File

@@ -300,7 +300,8 @@ Override paths to images, overlays, and other Warewulf components.
directory, which stores ``warewulf.conf`` and ``nodes.conf``.
* ``paths::cachedir``: The parent directory for the ``warewulf`` cache of OCI
images during ``wwctl image import``.
images during ``wwctl image import``. The cache is stored at
``$cachedir/warewulf`` and can be cleared with ``wwctl clean``.
* ``paths:ipxesource``: Where to get iPXE binaries. These files are copied to
``warewulf.conf:tftp:tftproot`` by ``wwctl configure tftp``.

View File

@@ -12,6 +12,8 @@ functionality.
to multiple nodes
* ``image``: configures (node) images
* ``overlays``: manages overlays
* ``clean``: removes the OCI image cache and leftover overlay images from
deleted nodes
``wwctl`` also provides additional helpers for interacting with cluster nodes
over SSH and IPMI.
@@ -56,3 +58,29 @@ For each node, there are 4 different stages:
You can use the ``wwctl node status`` to check communication between the
Warewulf server (``warewulfd``) and the Warewulf client (``wwclient``).
Maintenance
===========
``wwctl clean`` reclaims disk space by removing two categories of data that
accumulate over time:
* The OCI blob cache, stored at ``$cachedir/warewulf`` (default:
``/var/cache/warewulf``). This cache is populated during ``wwctl image
import`` and speeds up subsequent imports of images that share layers. It
is safe to remove: the next ``wwctl image import`` will re-download any
needed layers.
* Provisioned overlay images for nodes that have been deleted from the node
database. These are stored under ``$wwprovisiondir/overlays`` and are no
longer needed once the corresponding node is removed.
.. code-block:: console
# wwctl clean
``wwctl clean`` is particularly useful after deleting a large number of nodes,
or when disk space is limited on the Warewulf server. Note that ``wwctl clean``
only removes the current cache location (``$cachedir/warewulf``); if you are
upgrading from v4.5.x, the legacy cache at ``$datastore/oci`` must be removed
manually (see :ref:`oci-blob-cache`).