Exercise 2: Sizing a Snapshot for a 6-Hour, 2GB/Hour Backup Window — Possible Solution ==================================================================== Recommended size: at least 12GB reserved, with real headroom on top -- e.g. 18-20GB, not exactly 12GB. Explanation: Per the chapter's own warn-box, "the -L size on an LVM snapshot needs to cover the total amount of data expected to change on the origin during the snapshot's entire lifetime -- not the origin's total size." The origin's total size (200GB) is explicitly the WRONG number to size against here -- what matters is how much data will actually change while the snapshot exists, which is a function of the write rate and how long the snapshot needs to stay alive, not how big the database is overall. At 2GB of writes per hour over a planned 6-hour backup window, the baseline expected change volume is 2GB x 6 = 12GB. Sizing the snapshot at exactly 12GB, however, leaves no margin at all -- per the chapter's own warn-box, "a heavily-written database left snapshotted for hours can overflow a snapshot that seemed generously sized, silently invalidating it." A 6-hour backup window is an estimate, not a guarantee (the backup could run long, or the database's write rate could spike above its usual 2GB/hour average during that window for reasons unrelated to the backup itself), and per the chapter, an overflow doesn't degrade gracefully -- it "silently invalidates" the entire snapshot, losing the point-in-time state the backup depended on. A reserved size with real headroom -- roughly 1.5x to 2x the baseline estimate, e.g. 18-20GB -- absorbs a slower-than-expected backup run or a temporary spike in write activity without risking an overflow that would otherwise force the entire backup to be redone from a fresh snapshot. WHY THIS WORKS AS AN ANSWER ------------------------------ This sizes against the chapter's own stated correct basis (expected change volume over the snapshot's lifetime, not total data size), computes the baseline from the given numbers, and then explains why that exact baseline is still too risky per the chapter's own overflow warning, recommending headroom rather than a bare minimum.