qubes-core-admin-linux/system-config/lvm-cleanup.cron-daily
Marek Marczykowski-Górecki 2ec29a4d4c
Cleanup lvm archived metadata files
Those files may easily accumulate in large quantities, to the point
where just listing the /etc/lvm/archive directory takes a long time.
This affects every lvm command call, so every VM start/stop.
Those archive files are rarely useful, as Qubes do multiple LVM
operations at each VM startup, so older data is really out of date very
quickly.

Automatically remove files in /etc/lvm/archive older than one day.

Fixes QubesOS/qubes-issues#4927
Fixes QubesOS/qubes-issues#2963
2019-04-02 18:04:26 +02:00

4 lines
73 B
Bash
Executable File

#!/bin/sh
find /etc/lvm/archive/ -type f -mtime +1 -name '*.vg' -delete