From de6c806af7e289c11196a53c0e1ff1736f3c2e8e Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sun, 12 Oct 2025 07:48:51 +0200 Subject: [PATCH] chore(dblab): destroy automatic snapshot, manually --- knowledge base/dblab engine.md | 43 ++++++++++++++++++++++++++++++++++ snippets/dblab.fish | 4 ++++ 2 files changed, 47 insertions(+) diff --git a/knowledge base/dblab engine.md b/knowledge base/dblab engine.md index da9fb8f..2cf16a8 100644 --- a/knowledge base/dblab engine.md +++ b/knowledge base/dblab engine.md @@ -14,6 +14,7 @@ The [website] hosts the SaaS version. 1. [Clean up](#clean-up) 1. [Automatically full refresh data without downtime](#automatically-full-refresh-data-without-downtime) 1. [Troubleshooting](#troubleshooting) + 1. [Cannot destroy automatic snapshot in the pool](#cannot-destroy-automatic-snapshot-in-the-pool) 1. [The automatic full refresh fails claiming it cannot find available pools](#the-automatic-full-refresh-fails-claiming-it-cannot-find-available-pools) 1. [Further readings](#further-readings) 1. [Sources](#sources) @@ -395,6 +396,48 @@ without downtime. ## Troubleshooting +### Cannot destroy automatic snapshot in the pool + +Error message example: + +```plaintext +2025/10/07 09:49:32 cannot destroy automatic snapshot in the pool +``` + +Root cause: still unknown. + +Short term solution: manually delete the ZFS snapshots and restart the Engine. + +
+ +1. Decide what snapshots need to be deleted. + + ```sh + $ zfs list -t 'snapshot' + NAME USED AVAIL REFER MOUNTPOINT + dblab_pool_0@snapshot_20250924055533 92.3G - 266G - + dblab_pool_1@snapshot_20250923130042 132G - 144G - + dblab_pool_1@snapshot_20250915224319 142G - 145G - + dblab_pool_1@snapshot_20251002175419 87.5K - 145G - + ``` + +1. Ensure no clone is using those snapshots.\ + Reset those that do if necessary. +1. Destroy the chosen ZFS snapshots. + + ```sh + sudo zfs destroy 'dblab_pool_1@snapshot_20250923130042' + ``` + +1. Restart the DBLab Engine's container.\ + Needed to make it recognize the snapshots are gone. + + ```sh + sudo docker container restart 'dblab_server' + ``` + +
+ ### The automatic full refresh fails claiming it cannot find available pools Root cause: in version 4.0.0, the DBLab Engine happened to consider a pool used by clones, even if those clones were diff --git a/snippets/dblab.fish b/snippets/dblab.fish index b75589b..dfeda3a 100644 --- a/snippets/dblab.fish +++ b/snippets/dblab.fish @@ -122,6 +122,10 @@ dblab clone destroy 'some-clone' curl -X 'DELETE' 'https://dblab.example.org:1234/api/clone/some-clone' \ -H "Verification-Token: $(gopass show -o 'dblab')" +# Delete snapshots +# Cannot currently delete automatic snapshots via API +zfs destroy 'dblab_pool_1@snapshot_20250826190434' + # Get admin config in YAML format curl 'https://dblab.example.org:1234/api/admin/config.yaml' -H "Verification-Token: $(gopass show -o 'dblab')"