|
||
|
|
||
| Tue, 28 Feb 2006 |
|
||
|
Okay, so this is just really cool. The idea is that you want a snapshot of your filesystem at one moment in time. The larger your dataset is, the harder this becomes. If, while making a backup, something changes within your data, the snapshot is corrupt.... some data is newer than others, it's out of sync. So, some would resort to shutting down all services while the backup takes place. The problem here is obvious, there are cases where shutting down service is undesirable. LVM Snapshots to the rescue. We take an LVM partition... lets say it's 200GB, and we use the lvm tools to make a snapshot of it, onto a 1GB partition. If we look at the new 1GB partition, we see all the data there that's available on the 200GB partition. Since our snapshot is created, if we create new data on the 200GB partition, it does *not* show up on the 1GB snapshot. So, how in the world do we fit 200GB into 1GB? I'm tempted to simply say magic. But the real answer is that we don't have to. Remember, it's a snapshot, a copy of a partition at one point in time. So really, we only need to make the 1GB partition look the way the 200GB partition did, when the snapshot was taken. Basically, what that means is that any time there is a request to change data on the 200GB partition, we just copy the existing data over to the 1GB partition first, before it's changed. That is, the kernel blocks the update for just a moment while it makes the copy. The only data stored on the 1GB partition is the data that changed since the snapshot was taken. So, though it looks like the 1GB partition has 200GB of data, really, most of it still resides on the original partition. Now we can make a backup of the snapshot, then remove the partition. Very slick. |
||
| /Blog/Computers/Organizations/Home | Permanent Link | Comments (1) | ||
|
|
||
|
Also, be sure to check out the OpenThought Web Application Environment |
|
Copyright 2003 Eric Andreychek |