Skip to content

feat(check): warn when the LVM metadata archive is kept long - #41

Open
Variiuz wants to merge 2 commits into
mainfrom
feat/check-lvm-archive
Open

Variiuz wants to merge 2 commits into
mainfrom
feat/check-lvm-archive

Conversation

@Variiuz

@Variiuz Variiuz commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

On LVM-thin, every clone and destroy writes a metadata archive to /etc/lvm/archive, kept backup/retain_days (30 by default). A busy job host (about 28,000 archives a day) collected 92k files and 1.9 GB on its root disk in a few days.

mayfly check now asks lvmconfig --type full backup/retain_days and warns when it is over 7, with the archive's size:

warn lvm       /etc/lvm/archive holds 92104 files (1903 MB), kept 30 days: every clone and destroy adds one. Set retain_days = 3 (1 on a busy host) in the backup section of /etc/lvm/lvm.conf

Size alone does not warn: the same host still holds about 1.9 GB at retain_days = 3, so a size limit would keep firing on a fixed host. Nothing is printed without LVM (no lvmconfig) or when its output can't be read. The archive path can be moved with MAYFLY_LVM_ARCHIVE (tests). A test covers the threshold. README: one line under Safety limits.

Tested: cargo fmt, clippy, cargo test.

Notes: mayfly check warns when LVM keeps its metadata archive more than 7 days.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GGBbe8FgqqUCF5fNkd9Ndi

@Variiuz
Variiuz force-pushed the feat/check-lvm-archive branch from 0e130ba to eae60f2 Compare November 11, 2026 14:23
@Variiuz Variiuz changed the title feat(check): warn when the LVM metadata archive is kept long or grows large feat(check): warn when the LVM metadata archive is kept long Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants