On 08/07/2012 08:21 AM, Bastian Friedrich wrote:
> Am Freitag, 27. Juli 2012, 11:33:26 schrieb Bastian Friedrich:
>> Hi,
>>
>> Am Dienstag, 24. Juli 2012, 15:28:54 schrieb Bastian Friedrich:
>>> we are using Bacula's raw block device backup features for backing up
>>> virtual machines that use raw devices (logical volumes, or DRBD) as their
>>> storage. As advised by the bacula documentation (obviously, for the
>>> purpose
>>> of sparing storage space), we set "sparse = yes" for the respective file
>>> sets.
>>>
>>> Recently, we discovered a problem with systems backed up in this way.
>>>
>>> Bacula does not only back up sparse data; it also restores the data in
>>> such
>>> a way, which can result in problems. Imagine a virtual machine that has a
>>> (non- sparse!) file with large chunks of zero data in its file system.
>>> When
>>> these data are backed up, these null data are stored as a sparse stream.
>>>
>>> During restore, however, this can result in a problem: The sparse data
>>> (all
>>> zeros) are not written to the disk; instead, the respective chunk is just
>>> skipped (via seek). As a result, the virtual machine now has random data
>>> in
>>> its (formerly all-zero) file.
>> the attached patch modifies Bacula's behavior during restore of data that
>> originates from a block device with the "sparse" option set.
> Short notice: the patch as sent is still flawed.
>
> We will use a more comprehensive patch internally. Feel free to contact me if
> you'd like to get that revised patch (not yet finished). As it seems, the
> patch will not get upstream.

The patch could possibly "get upstream" were it to ensure that it did not
change the current behavior of the sparse file handling in any case (as
I believe that it currently does because it fills in holes), or if
its need is clearly documented and the patch is conditioned on some other
directive name other than "Sparse = yes".  I suspect that an appropriate 
level
of gzip would probably work better in your case than what you are proposing
since gzip *will* write everything back thus filling holes.

Best regards,
Kern


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to