[DRBD-user] DRBD below or on top of LVM

H.D. devnull at deleted.on.request
Thu Feb 15 14:38:45 CET 2007

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


OK, thank you for your detailed answer again, it really helps me!

On 15.02.2007 14:34, Graham Wood wrote:
> 
>> To me that reads `LVM is only capable of creating an "almost
>> consistent" snapshot'.
> Of a running MySQL database... The issue is at the MySQL level, rather 
> than the LVM level.  Without grabbing the read lock that document 
> mentions, you can easily have transactions partially commited to disk, 
> without a consistent state on disk.
> 
>> Is that true?
> Restoring from a snapshot is the same (almost) as recovering from a 
> power failure at the time the snapshot was taken.  If (for example) 
> MySQL is in the process of commiting a transaction in 2 places on the 
> disk when the snapshot is taken, because it is instantaneous you might 
> only have 1 of them commited at the time the snapshot is taken, and 
> it'll be inconsistent.
> 
> In the case of Oracle you can put the database into a hot backup mode, 
> take the snapshot, and then take it out.  When you do the recovery you 
> can then replay the log it generated in that time to recover.  This was 
> intended for tape backups (since they can take a long time, and 
> therefore will NOT be consistent),  and actually allows you to replay to 
> any time between start and finish....
> 
> Looking on google for references to postgreSQL and snapshot backups, it 
> looks like you've got the same functionality as provided by InnoDB on 
> MySQL (and pretty much every other DB out there) - log replay 
> functionality all the time.
> 
> As long as the logs are snapshotted at the same time as the main 
> database, on recovery it can replay the log to get back to a consistent 
> state.  If you've got the log files on a different device to the main 
> database then you ideally want to snapshot the two at exactly the same 
> time (theoretically impossible)....
> 
> However, I think if you snapshot the main device, and then the log 
> files, you are almost definitely going to be "OK".  The only problem 
> would be if the logs had rotated and lost information from when the main 
> devices were snapshotted.  At that point, your snapshots are going to be 
> smoking anyway, so you're going to have other problems.
> 
> Graham

-- 
Regards,
H.D.



More information about the drbd-user mailing list