[lkml]   [2009]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: zero out blocks of freed user data for operation a virtual machine environment
    Thomas Glanzmann wrote:
    > 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:
    Astounding use of backquote. I'm not sure about the "percent" bit. I
    think it's some confusion over only 95% of total blocks being available
    for allocation.

    I, too, would not recommend it, but it becomes safer by repeatedly
    allocating only half the remaining disk, stopping when there's only a
    few blocks free, to leave some for all of the other processes.
    Presumably it won't be a problem having (potentially) a few free blocks
    that don't de-duplicate.

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

    for i in $FileSystem
    while number=`df -B 512 $i | awk -F" " '$4 < 10 {exit(1)} {print $4 / 2}'`
    dd count=$number if=/dev/zero || break
    done > $i/zf
    rm -f $i/zf

    Are you proposing to de-duplicate a live filesystem?

     \ /
      Last update: 2009-05-25 05:33    [W:0.039 / U:69.628 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site