Hey fellow techies! I'm planning a home setup using ext4 on top of LVM, and I'm toying with a live backup strategy that involves e2image and snapshots. The idea is to use an LVM snapshot only while e2image is running and then delete it afterward. However, I want to keep all available disk space for the file system and not have any reserved for temporary snapshots. So, I'm considering the use of a ramdisk to extend the volume group temporarily during this backup process. My machine has plenty of RAM, so reserving 32GB should work fine for handling writes while the snapshot is active. I understand the risk that any outage during the backup would mean losing the data on the ramdisk, but that's acceptable to me. Does this plan make sense? Here's a rough outline of what I'm thinking:
1. Create a 32GB ramdisk and add it to the volume group (VG).
2. Create a snapshot called 'lv-backup' of size 32GB.
3. Run e2image on 'lv-backup' with output directed to another storage solution (probably NAS over NFS or similar).
4. Delete the snapshot afterward.
5. Remove the ramdisk from the VG and delete the ramdisk once done.
3 Answers
You can definitely try that, though it’s a bit unconventional. Just keep in mind that recovering from a crash could be a hassle since LVM might not recognize the missing storage on reboot, which might require some manual fixes.
Snapshots don’t actually use up extra disk space. They just mark the blocks as read-only at the time of the snapshot. New or changed blocks are stored elsewhere next to the original. You still need snapshots if you want atomic operations; otherwise, there’ll be a lag while transferring that 32GB from disk to RAM. So, I’m not really seeing the upsides of your approach.
Seems like you’re on the right track with the ramdisk idea. It allows for an atomic backup using a temporary snapshot without permanently using disk space for snapshot volumes.
Honestly, this will probably add more complexity than it's worth. I’d reconsider if I were you.

Just to clarify, while the system stays live during backup, any background writes will still go to the origin as you mentioned. Overwriting old data gets saved to the snapshot, which uses dynamic space. I don’t have any extra disk space for snapshots since everything’s allocated to the origin FS, hence my plan for the ramdisk during operations. And yes, I do use a snapshot as part of my plan—there's no copying; the snapshot volume captures overwritten data and is tossed after the backup is complete.