[Tux3] Generic filesystem freeze
Daniel Phillips
phillips at phunq.net
Mon Jan 12 03:24:38 PST 2009
On Monday 12 January 2009 02:19, Michael Keulkeul wrote:
> Hi
>
> Yes it does fail to guarantee consistency between filesystem
> and application state, but it's a tool to guarantee it :
>
> if you want to take a consistent snapshot of you database :
> 1- put your DB in backup mode, or make our app layer happy
> 2- freeze your FS
> 3- sync everything
> 4- take a snapshot (of the block devices)
> 5- unfreeze FS
> 6- DB back in standard mode
>
>
> If you skip the freeze step, disk write still can happen between end of 3
> and end of 4 so you can get dirty ondisk images.
What do you mean by dirty? Unwanted writes came from the DB, or unwanted
writes came from another application?
If the former, then the DB was not really in backup mode. If the latter,
then the unwanted IO from another application could just as easily have
occurred before freezing the FS.
> As discussed in a earlier
> thread, tux3 design should enable to "tux3freeze" a filesystem (get a clean
> ondisk image) without blocking writes (just throttle N io/sec until buffers
> P% full, then return something and unfreeze).
>
> And this would enable us to do something like this :
>
> Repeat
> 1- put your DB in backup mode, or freeze app io/s...
> 2- tux3freeze your FS
> 3- sync everything (maybe not necessary)
> 4- DB or app back in standard mode
> 5- take a snapshot (of the block devices)
> Until my fs still tux3freezed at that moment
> (not unfreeze as we go back to normal state when we're full)
But with Tux3's snapshot model, that is the same as:
1 - Put your DB in backup mode, or freeze app io/s...
2 - Set a Tux3 snapshot
3 - DB or app back in standard mode
The snapshot will include the latest writes to disk, not include any
writes after the snapshot, and the snapshot command will not return
until the snapshot has committed to disk. Meanwhile, IO from other
applications can continue, and it will go into the next snapshot. So
why have a freeze?
By the way, are you thinking about a specific database, or databases in
general?
Regards,
Daniel
_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3
More information about the Tux3
mailing list