Score:0

Cloudmin backup size

us flag

we are using Cloudmin under CentOS 7.9. to manage Xen virtual machines that use LVM. It's all backed up once a week (via Cloudmin's built-in backup system, which I think just uses dd). Last week I noticed one thing: on one system, I deleted 150GB of data, but the backup remained 300GB, as if I had not deleted anything. Who has experienced this?

anx avatar
fr flag
anx
You can query all block devices free space reclamation configuration (or lack thereof, indicated with a zero result) from sysfs, e.g. `grep -rH /sys/block/*/queue/discard_max_bytes`
anx avatar
fr flag
anx
For logical volumes, investigate the options e.g. `lvdisplay --columns --options lv_full_name,discards`
Dmitry avatar
us flag
Thank for your reply, @anx. `grep -rH /sys/block/*/queue/discard_max_bytes` returns no output `lvdisplay --columns --options lv_full_name,discards` - nothing special, just LV name, and empty "Discards" field.
anx avatar
fr flag
anx
There should be *some* block device somewhere, and I would expect the logical volumes configured for passing through discard operations to be marked specified with `passdown`. Go from the bottom up, the kernel in control of the hardware first, lvm before filesystems, and find which component or configuration has a non-functional TRIM operation, and why. Mind that if you are using exceedingly old software (CentOS 7 does not sounds good), such operations might be disabled on purpose for (well justified) concern about (only in recent years mitigated) serious bugs.
Score:2
cn flag

Unfortunately, block devices with file systems on them tend to not get smaller. Unlinked files leaves data in free blocks, which even if compressed still take up space in an image of the entire disk.

Try trimming free space on block devices. fstrim -va once, and note if mounted volumes trimmed or failed. If successful, enable a weekly or so background job, like fstrim.timer that probably exists on systemd Linux.

Or, restoring from backup is an opportunity to only copy used space. Hopefully leaving unused blocked as easy to compress zeros. As what you have is another block device, look at file system aware tools like xfs_copy or e2image -rap that do not copy empty blocks. Create a new disk (starting zeroed), take the system down, and restore from the backup. Bonus, might count towards on occasional backup restore test in the business continuity plan.

Or, when the files using the space are still around, various "secure remove" utilities can be run in a mode that zeros then unlinks them. Just zeroing, because writing all over a SSD many times is not great for its wear. GNU coreutils can do zero and unlink: shred -v -n 0 --zero --remove=unlink --

Although all this is a lot of work to save a mere 150 GB. Your protection storage used for backup should have several times the size of the primary disks, to keep backups around for the retention you require. A safe thing to do is just let the backups be ~300 GB.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.