[ ... ]

>> Ok I completely  agree what  you said. So if I want to deallocate  if any
>> zeros then what is the procedure?

> man cp
> In particular, the --sparse option

That (and other programs like 'rsync' or GNU 'tar' that support
sparse copying) is good if you can make a copy.

If you want to allocate logical blocks full of zeroes, you must
use a file system that implements so called "hole punching"
'ioctl's, and I can only remember (recent versions) of 'ext4',
OCFS2 and (even fairly old versions) of XFS that do.

There is a summary here: http://lwn.net/Articles/415889/

You must then write a program that scans the file and then
issues the "hole punching" 'ioctl's in the places you want, as I
think that there is no such ready-made program (but just checked
and there is one at least for XFS). But it is really simple to
write.

_______________________________________________
rhelv5-list mailing list
rhelv5-list@redhat.com
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to