Filling unused partition space with zeros

Post here if you want to request a features that has not been implemented yet
Post Reply
gwpl
Posts: 2
Joined: Mon Aug 06, 2012 9:19 am

Filling unused partition space with zeros

Post by gwpl » Mon Aug 06, 2012 3:05 pm

Hello.

I've been looking for a tool for filling unused partition space with zeros - in "smart" way, I mean without touching and changing internal data structures. (This can be used, for deduplication purposes of partition images; compression of such backup partition imagesl , their analysis and research based on them).

Thanks to folks from stackexchange:

http://unix.stackexchange.com/questions ... -ext3-ext4

I've found

Code: Select all

Zerofree
tool. But it's for ext2,3,4. I'd like to have things like that for other filesystems as well (especially btrfs - http://unix.stackexchange.com/questions ... eros-btrfs ).

As far as I know FSArchiver, copies only "used" space of partition (with it's all metadata, attrs, xattrs etc).
I suppose it needs to have a kind of function

Code: Select all

is_this_block_used()
for checking if some block is used or not.

Would it be a problem to implement tool, like Zerofree, for filling unused space of partitions (especially file images of partitions) with zeros based on FSArchiver codebase ?

admin
Site Admin
Posts: 550
Joined: Sat Feb 21, 2004 12:12 pm

Re: Filling unused partition space with zeros

Post by admin » Mon Sep 03, 2012 9:02 pm

fsarchiver works at the file level so it does not need this.

gwpl
Posts: 2
Joined: Mon Aug 06, 2012 9:19 am

Re: Filling unused partition space with zeros

Post by gwpl » Tue Sep 18, 2012 7:02 pm

I thought that it following date are available to fsarchiver :

B - a set of all blocks on partition
U - a set of used blocks, containing data (those have to be backup)

so what am I asking is as simple as:

F - a set of free blocks
F = B-U

Post Reply