Thanks so much  for all the help.  Writing of script will be the best choice..
Thanks again to all of you....


________________________________
From: Peter Grandi <pg_...@el5.for.sabi.co.uk>
To: RH EL5 <rhelv5-list@redhat.com> 
Sent: Wednesday, January 4, 2012 5:30 PM
Subject: Re: [rhelv5-list] Regarding sparse file

[ ... ]

>> 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
_______________________________________________
rhelv5-list mailing list
rhelv5-list@redhat.com
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to