All of lore.kernel.org
 help / color / mirror / Atom feed
* zero out blocks of freed user data for operation a virtual machine environment
@ 2009-05-24 17:00 Thomas Glanzmann
  2009-05-24 17:15 ` Arjan van de Ven
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Thomas Glanzmann @ 2009-05-24 17:00 UTC (permalink / raw)
  To: tytso; +Cc: LKML, linux-ext4

Hello Ted,
I would like to know if there is already a mount option or feature in
ext3/ext4 that automatically overwrites freed blocks with zeros? If this
is not the case I would like to know if you would consider a patch for
upstream? I'm asking this because I currently do some research work on
data deduplication in virtual machine environments and corresponding
backups. It would be a huge space saver if there is such a feature
because todays and tomorrows backup tools for virtual machine
environments work on the block layer (VMware Consolidated Backup, VMware
Data Recovery, and NetApp Snapshots). This is not only true for backup
tools but also for running Virtual machines. The case that this future
addresses is the following: A huge file is downloaded and later delted.
The backup and datadeduplication that is operating on the block level
can't identify the block as unused. This results in backing up the
amount of the data that was previously allocated by the file and as such
introduces an performance overhead. If you're interested in real live
data, I'm able to provide them.

If you don't intend to have such an optional feature in ext3/ext4 I
would like to know if you know a tool that makes it possible to zero out
unused blocks?

The only reference that I found for such a tool for Linux is the
following:

#!/bin/bash
FileSystem=`grep ext /etc/mtab| awk -F" " '{ print $2 }'`

for i in $FileSystem
do
       number=`df -B 512 $i | awk -F" " '{print $4}'`
       percent=$(echo "scale=0; $number * 95 / 100" | bc )
       dd count=`echo $percent` if=/dev/zero of=`echo $i`/zf
       rm -f $i/zf
done

Source: http://blog.core-it.com.au/?p=298

Even if certainly does job I would hardly recommend it to anyone for various
obvious reasons: A lot of I/O overhead that could be avoided, scheduling
this at the bad moment it could lead to full disk situation. And also
the blocksize is left the default and as such is way to low.

Just to be complete: For Microsoft Windows there is a tool called
sdelete which can be used to zero out unused disk blocks, again it has
the same problem as the above script but hopefully is saver to run.

Source: http://technet.microsoft.com/en-us/sysinternals/bb897443.aspx

        Thomas

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2009-05-28 19:27 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-24 17:00 zero out blocks of freed user data for operation a virtual machine environment Thomas Glanzmann
2009-05-24 17:15 ` Arjan van de Ven
2009-05-24 17:39   ` Thomas Glanzmann
2009-05-25 12:03     ` Theodore Tso
2009-05-25 12:34       ` Thomas Glanzmann
2009-05-25 13:14         ` Goswin von Brederlow
2009-05-25 14:01           ` Thomas Glanzmann
     [not found]           ` <f3177b9e0905251023n762b815akace1ae34e643458e@mail.gmail.com>
2009-05-25 17:26             ` Chris Worley
2009-05-25 17:26               ` Chris Worley
2009-05-26 10:22             ` Goswin von Brederlow
2009-05-26 10:22               ` Goswin von Brederlow
2009-05-26 16:52               ` Chris Worley
2009-05-26 16:52                 ` Chris Worley
2009-05-28 19:27                 ` Goswin von Brederlow
2009-05-28 19:27                   ` Goswin von Brederlow
2009-05-25  3:29 ` David Newall
2009-05-25  5:26   ` Thomas Glanzmann
2009-05-25  7:48 ` Ron Yorston
2009-05-25 10:50   ` Thomas Glanzmann
2009-05-25 12:06 ` Theodore Tso
2009-05-25 21:19 ` Bill Davidsen
2009-05-26  4:45   ` Thomas Glanzmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.