LVM snapshots that run out of space, results?
I was just wondering, what happens when an LVM snapshot runs out of space? Documentation clearly warns against letting this happen, and I've never even come close, but what would the end result be? Do you just end up with a "filesystem full" scenerio? Can you recover the data that was modified up until the time the snapshot filled? Do you risk filesystem corruption?
I run automated backups in the middle of the night that create snapshots, run backups, then remove the snapshots. I've always feared the "lvremove --force ..." might somehow fail and leave a snapshot active. For now I just make really big snapshots (bigger than the filesystem itself), since I have the disk space to allow this.
Another question for you LVM users - do you snapshot before backing up, or just backup a live filesystem? Generally I use rsync or tar on snapshots. If I want to do a dd I boot Knoppix first. Has anybody tried unionfs for snapshotting non-LVM filesystems? Am I the only one so obsessed about not backing up from a live filesystem???!!! :confused:
Backing up a live fileystem is Ok. Naturally you won't get open files and such but that's normal. All the same, you won't necessarily get everything with a snapshot either but the chances are better that you will.
When a snapshot runs out of space, it just fills the disks. Not really that big a deal except that your backup will not work right and it could knock the system offline making it only available by console.
Naturally, you can only recover data, if necessary, from your last good backup. Also, I've not personally seen any filesystem corruption when the system does fill up. This has happened to me on occasion. You just kill your snapshot process, whack the full partitions and start over.
If you have the time available that the whole process requires, take a snapshot just before you start your backup so that you have the most current data. In my case this is not always possible because the backup takes longer than 24 hours sometimes and the next cron starts. This causes havoc but only temporarily.
Hope that helps.
Thanks for the reply. What I understand you saying is that if your snapshot fills, it's trashed, you delete it, and you then end up with the underlying filesystem reverted back to the point in time when the snapshot was created? While it's never desireable to lose data, this scenerio is what I'd expect to happen, and it's not the end of the world.
If the underlying filesystem gets trashed along with the snapshot when the snapshot fills then that would be a serious problem. This is what I hope WOULD NOT happen! Lose a little data ... OK given the circumstances, trash a filesystem ... not acceptable under any circumstance!
|All times are GMT -5. The time now is 07:30 PM.|