Allow Debian Docker root on NVMe root filesystem

This commit is contained in:
juvdiaz 2026-06-29 11:14:59 -06:00
parent b49df4f2eb
commit 3c24f05ff6
7 changed files with 21 additions and 26 deletions

View File

@ -108,7 +108,7 @@ On the Debian host:
minor, currently `v1.36` minor, currently `v1.36`
- SSH access to worker nodes - SSH access to worker nodes
- SSH access to the OCI edge host - SSH access to the OCI edge host
- enough persistent storage for `/data/openebs/local` and `/data/docker` - enough persistent storage for `/data/openebs/local` and Docker's data root
After a clean Debian reinstall, bootstrap the host package set and desktop After a clean Debian reinstall, bootstrap the host package set and desktop
configuration first: configuration first:
@ -672,11 +672,10 @@ destroy/create cycles. Those critical volumes are declared explicitly as
retained local PVs so a rebuilt cluster binds back to the same host paths retained local PVs so a rebuilt cluster binds back to the same host paths
instead of creating fresh directories. instead of creating fresh directories.
For the current lab, the HP Debian laptop's NVMe is managed by LVM volume group For the current lab, the HP Debian laptop's root filesystem is on NVMe, so the
`data-vg` and mounted under `/data`. OpenEBS retained hostpath data lives under standard Docker root `/var/lib/docker` is acceptable. OpenEBS retained hostpath
`/data/openebs/local`, and Docker data should live under `/data/docker` where data still lives under `/data/openebs/local`, and larger service data such as
the host is configured that way. This keeps retained PVs, container layers, Gitea, Ollama models, and app volumes should stay under `/data`.
Buildx state, and image caches from filling `/`.
## Gitea ## Gitea
@ -685,9 +684,8 @@ always-on Docker Compose service from `infra/gitea/docker-compose.yml`, not as a
Kubernetes workload. This keeps Git available when the Kubernetes cluster is Kubernetes workload. This keeps Git available when the Kubernetes cluster is
destroyed and rebuilt. destroyed and rebuilt.
The default data path is `/data/homelab-gitea/data` on the HP laptop NVMe. The The default data path is `/data/homelab-gitea/data` on the HP laptop NVMe.
Docker root is also expected to live on the `/data` storage path rather than the Docker may use the standard `/var/lib/docker` root because `/` is also on NVMe.
root filesystem.
Public source browsing stays available through Public source browsing stays available through
`https://lab2025.duckdns.org/git/`. Registration is disabled and anonymous users `https://lab2025.duckdns.org/git/`. Registration is disabled and anonymous users

View File

@ -108,7 +108,7 @@ On the Debian host:
minor, currently `v1.36` minor, currently `v1.36`
- SSH access to worker nodes - SSH access to worker nodes
- SSH access to the OCI edge host - SSH access to the OCI edge host
- enough persistent storage for `/data/openebs/local` and `/data/docker` - enough persistent storage for `/data/openebs/local` and Docker's data root
After a clean Debian reinstall, bootstrap the host package set and desktop After a clean Debian reinstall, bootstrap the host package set and desktop
configuration first: configuration first:
@ -672,11 +672,10 @@ destroy/create cycles. Those critical volumes are declared explicitly as
retained local PVs so a rebuilt cluster binds back to the same host paths retained local PVs so a rebuilt cluster binds back to the same host paths
instead of creating fresh directories. instead of creating fresh directories.
For the current lab, the HP Debian laptop's NVMe is managed by LVM volume group For the current lab, the HP Debian laptop's root filesystem is on NVMe, so the
`data-vg` and mounted under `/data`. OpenEBS retained hostpath data lives under standard Docker root `/var/lib/docker` is acceptable. OpenEBS retained hostpath
`/data/openebs/local`, and Docker data should live under `/data/docker` where data still lives under `/data/openebs/local`, and larger service data such as
the host is configured that way. This keeps retained PVs, container layers, Gitea, Ollama models, and app volumes should stay under `/data`.
Buildx state, and image caches from filling `/`.
## Gitea ## Gitea
@ -685,9 +684,8 @@ always-on Docker Compose service from `infra/gitea/docker-compose.yml`, not as a
Kubernetes workload. This keeps Git available when the Kubernetes cluster is Kubernetes workload. This keeps Git available when the Kubernetes cluster is
destroyed and rebuilt. destroyed and rebuilt.
The default data path is `/data/homelab-gitea/data` on the HP laptop NVMe. The The default data path is `/data/homelab-gitea/data` on the HP laptop NVMe.
Docker root is also expected to live on the `/data` storage path rather than the Docker may use the standard `/var/lib/docker` root because `/` is also on NVMe.
root filesystem.
Public source browsing stays available through Public source browsing stays available through
`https://lab2025.duckdns.org/git/`. Registration is disabled and anonymous users `https://lab2025.duckdns.org/git/`. Registration is disabled and anonymous users

View File

@ -25,7 +25,7 @@
<h2>debian</h2> <h2>debian</h2>
<p><strong>Address:</strong> 192.168.100.73</p> <p><strong>Address:</strong> 192.168.100.73</p>
<p><strong>Tailscale:</strong> 100.85.138.30</p> <p><strong>Tailscale:</strong> 100.85.138.30</p>
<p><strong>Storage:</strong> /data/docker</p> <p><strong>Storage:</strong> /var/lib/docker</p>
</article> </article>
<article class="catalog-card service-host"> <article class="catalog-card service-host">
<span>dns-edge-worker</span> <span>dns-edge-worker</span>

View File

@ -16,7 +16,6 @@ debian_pc_ollama_igpu_enable: "false"
debian_pc_persistent_directories: debian_pc_persistent_directories:
- /data/openebs/local/registry - /data/openebs/local/registry
- /data/docker
- /data/ollama/models - /data/ollama/models
- "/home/{{ debian_pc_user }}/git-server" - "/home/{{ debian_pc_user }}/git-server"
- "/home/{{ debian_pc_user }}/backups/gitea" - "/home/{{ debian_pc_user }}/backups/gitea"

View File

@ -9,7 +9,7 @@ Update `homelab.yml`, then run `scripts/render-service-catalog`.
| Host | Role | Address | Tailscale | Storage | | Host | Role | Address | Tailscale | Storage |
| --- | --- | --- | --- | --- | | --- | --- | --- | --- | --- |
| debian | control-plane | 192.168.100.73 | 100.85.138.30 | /data/docker | | debian | control-plane | 192.168.100.73 | 100.85.138.30 | /var/lib/docker |
| rpi4 | dns-edge-worker | 192.168.100.89 | 100.77.80.72 | /nvme-storage/docker | | rpi4 | dns-edge-worker | 192.168.100.89 | 100.77.80.72 | /nvme-storage/docker |
| opi5_pimox | pimox | 192.168.100.80 | | opi5_ssd | | opi5_pimox | pimox | 192.168.100.80 | | opi5_ssd |
| oci_edge | public-edge | 132.145.170.74 | 100.118.255.19 | | | oci_edge | public-edge | 132.145.170.74 | 100.118.255.19 | |

View File

@ -39,7 +39,7 @@ hosts:
user: jv user: jv
lan_ip: 192.168.100.73 lan_ip: 192.168.100.73
tailscale_ip: 100.85.138.30 tailscale_ip: 100.85.138.30
docker_root: /data/docker docker_root: /var/lib/docker
data_root: /data data_root: /data
kubeconfig: /home/jv/.kube/config kubeconfig: /home/jv/.kube/config
rpi4: rpi4:

View File

@ -1067,7 +1067,7 @@ check_gitea_reachable() {
} }
check_debian_docker_root() { check_debian_docker_root() {
local expected_root="${LAB_DEBIAN_DOCKER_ROOT:-/data/docker}" local expected_root="${LAB_DEBIAN_DOCKER_ROOT:-/var/lib/docker}"
local actual_root local actual_root
if ! command -v docker >/dev/null 2>&1; then if ! command -v docker >/dev/null 2>&1; then
@ -1082,7 +1082,7 @@ check_debian_docker_root() {
} }
fix_debian_docker_root() { fix_debian_docker_root() {
local expected_root="${LAB_DEBIAN_DOCKER_ROOT:-/data/docker}" local expected_root="${LAB_DEBIAN_DOCKER_ROOT:-/var/lib/docker}"
local daemon_file="/etc/docker/daemon.json" local daemon_file="/etc/docker/daemon.json"
local current_root="" local current_root=""
@ -1228,7 +1228,7 @@ homelab_preflight() {
echo "Running homelab preflight checks from ${HOMELAB_INVENTORY_FILE:-${REPO_ROOT}/homelab.yml}..." echo "Running homelab preflight checks from ${HOMELAB_INVENTORY_FILE:-${REPO_ROOT}/homelab.yml}..."
preflight_check "Gitea reachable at ${LAB_GITEA_LOCAL_URL:-http://${LAB_GITEA_HOST:-192.168.100.73}:${LAB_GITEA_HTTP_PORT:-3000}/}" check_gitea_reachable || failures=$((failures + 1)) preflight_check "Gitea reachable at ${LAB_GITEA_LOCAL_URL:-http://${LAB_GITEA_HOST:-192.168.100.73}:${LAB_GITEA_HTTP_PORT:-3000}/}" check_gitea_reachable || failures=$((failures + 1))
preflight_check "Debian Docker root is ${LAB_DEBIAN_DOCKER_ROOT:-/data/docker}" check_debian_docker_root || failures=$((failures + 1)) preflight_check "Debian Docker root is ${LAB_DEBIAN_DOCKER_ROOT:-/var/lib/docker}" check_debian_docker_root || failures=$((failures + 1))
preflight_check "Debian Tailscale IP ${LAB_DEBIAN_TAILSCALE_IP:-unset}" check_debian_tailscale_ip || failures=$((failures + 1)) preflight_check "Debian Tailscale IP ${LAB_DEBIAN_TAILSCALE_IP:-unset}" check_debian_tailscale_ip || failures=$((failures + 1))
preflight_check "RPi Docker root is NVMe or fallback" check_rpi_docker_root_state || failures=$((failures + 1)) preflight_check "RPi Docker root is NVMe or fallback" check_rpi_docker_root_state || failures=$((failures + 1))
preflight_warn "RPi Tailscale IP ${LAB_RPI_TAILSCALE_IP:-unset}" check_rpi_tailscale_ip preflight_warn "RPi Tailscale IP ${LAB_RPI_TAILSCALE_IP:-unset}" check_rpi_tailscale_ip
@ -4340,7 +4340,7 @@ status_report() {
printf 'date: %s\n' "$(date -Is)" printf 'date: %s\n' "$(date -Is)"
printf 'uptime: %s\n' "$(uptime -p 2>/dev/null || uptime)" printf 'uptime: %s\n' "$(uptime -p 2>/dev/null || uptime)"
status_run "memory" free -h status_run "memory" free -h
status_run "disk" df -h / /data /data/docker /data/openebs/local status_run "disk" df -h / /data /data/openebs/local
status_section "Systemd" status_section "Systemd"
status_systemd_units ssh docker containerd kubelet tailscaled homelab-gitea-runner status_systemd_units ssh docker containerd kubelet tailscaled homelab-gitea-runner