Add potato image and BTRFS cleanup blog post, update image references
This commit is contained in:
parent
bd22daed57
commit
93286ca828
3 changed files with 123 additions and 1 deletions
|
|
@ -21,7 +21,7 @@ the spec
|
||||||
Every implementation does exactly the same thing:
|
Every implementation does exactly the same thing:
|
||||||
|
|
||||||
1. Accept two query parameters: ``keyword`` and ``target``
|
1. Accept two query parameters: ``keyword`` and ``target``
|
||||||
2. Fetch the content from the target URL
|
2. Fetch the content from the target URI
|
||||||
3. Search for the keyword in that content
|
3. Search for the keyword in that content
|
||||||
4. Return ``true`` or ``false`` as plain text
|
4. Return ``true`` or ``false`` as plain text
|
||||||
|
|
||||||
|
|
@ -36,6 +36,11 @@ To test any implementation, try searching for ``potato`` on `Remarkbox <https://
|
||||||
|
|
||||||
Returns ``true`` because potato exists on Remarkbox.
|
Returns ``true`` because potato exists on Remarkbox.
|
||||||
|
|
||||||
|
.. image:: /uploads/2025/10/potato.jpg
|
||||||
|
:alt: Potato
|
||||||
|
:align: center
|
||||||
|
:width: 480px
|
||||||
|
|
||||||
the implementations
|
the implementations
|
||||||
===================
|
===================
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
unpotato webwords: cleaning up btrfs docker volumes after build-all
|
||||||
|
###################################################################
|
||||||
|
|
||||||
|
:author: Russell Ballestrini
|
||||||
|
:slug: unpotato-webwords-btrfs-cleanup-docker-volumes
|
||||||
|
:date: 2025-10-10 14:00
|
||||||
|
:tags: Code, DevOps, Docker, BTRFS
|
||||||
|
:status: published
|
||||||
|
|
||||||
|
So you ran ``make build-all`` on webwords and now your root filesystem is 100% full. BTRFS doesn't clean up Docker volumes the way you'd expect. Here's how to unpotato your system.
|
||||||
|
|
||||||
|
.. image:: /uploads/2025/10/potato.jpg
|
||||||
|
:alt: Potato
|
||||||
|
:align: center
|
||||||
|
:width: 480px
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
|
||||||
|
the problem
|
||||||
|
===========
|
||||||
|
|
||||||
|
Docker's ``system prune`` doesn't fully clean up BTRFS subvolumes. Even after removing containers and images, the filesystem usage stays high because the underlying BTRFS subvolumes persist.
|
||||||
|
|
||||||
|
identify docker volumes
|
||||||
|
========================
|
||||||
|
|
||||||
|
List all Docker volumes:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
docker volume ls
|
||||||
|
|
||||||
|
Check which containers might be using volumes:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
docker ps -a --filter volume=volume_name
|
||||||
|
|
||||||
|
delete docker volumes
|
||||||
|
======================
|
||||||
|
|
||||||
|
Stop and remove any containers using the volumes:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
docker stop $(docker ps -aq)
|
||||||
|
docker rm $(docker ps -aq)
|
||||||
|
|
||||||
|
Remove all unused volumes:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
docker volume prune -f
|
||||||
|
|
||||||
|
manual btrfs cleanup
|
||||||
|
====================
|
||||||
|
|
||||||
|
If filesystem usage is still high, manually clean up BTRFS subvolumes.
|
||||||
|
|
||||||
|
Check Docker's storage driver:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
docker info --format '{{.Driver}}'
|
||||||
|
|
||||||
|
If it shows ``btrfs``, locate the subvolumes:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
sudo ls /var/lib/docker/btrfs/subvolumes/
|
||||||
|
|
||||||
|
List all BTRFS subvolumes:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
sudo btrfs subvolume list /var/lib/docker
|
||||||
|
|
||||||
|
Delete persistent subvolumes:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
sudo btrfs subvolume delete /var/lib/docker/btrfs/subvolumes/HASH_HERE
|
||||||
|
|
||||||
|
Wait for async deletion to complete:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
sudo btrfs subvolume sync /var/lib/docker
|
||||||
|
|
||||||
|
nuclear option
|
||||||
|
==============
|
||||||
|
|
||||||
|
If manual cleanup doesn't work, stop Docker and remove everything:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
sudo systemctl stop docker
|
||||||
|
sudo rm -rf /var/lib/docker
|
||||||
|
sudo systemctl start docker
|
||||||
|
|
||||||
|
This will delete all Docker data including images, containers, and volumes.
|
||||||
|
|
||||||
|
verify cleanup
|
||||||
|
==============
|
||||||
|
|
||||||
|
Check filesystem usage:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
df -h /
|
||||||
|
|
||||||
|
The usage should drop significantly after proper cleanup.
|
||||||
|
|
||||||
|
prevention
|
||||||
|
==========
|
||||||
|
|
||||||
|
Consider using a separate filesystem for Docker or configuring Docker to use a different storage driver if you frequently build large numbers of containers on BTRFS.
|
||||||
BIN
content/uploads/2025/10/potato.jpg
Normal file
BIN
content/uploads/2025/10/potato.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 231 KiB |
Loading…
Add table
Add a link
Reference in a new issue