RW wrote:
What has not been addressed here is the question of what created those
files. It isn't something you do with a shell script usually.

Many things can do this, or could use this.

So if you have, just as an example, a database program that does make
such a file it is often possible to dump the database in such a way as
to load it into another instance. Maybe a remote replication is
possible.

As an example that I sure can provide. Not sure if many are still using it, but a quick example I come up with is the dns cache file use by webalizer. One of the example I provided what the simple dns cache file use by webalizer. Not a big deal if your servers are not busy, but on very busy web server for example it could grow pretty quickly. In my case as an example, to address this sparse file, I simply delete that file after a few days. Yes, it grow in my case to multiple GB in just a few weeks and yes it is also faster to do reverse dns lookup using it as well and I do also run cache dns, etc.

So, what evil little daemon do you have toiling away making TB files
that only use 2k (joke!) and, is it not possible to teach the little
bastard how to reconstruct its data on another drive?

So, I am not sure if that was what you wee asking, but I thought to give you that simple example as it is more common then what I may be using I think. (;> In my case, you give it about 3 weeks if you want and I will have that file grow to may be 15GB with only 1GB or 2GB of valid data in it.

Then I delete it and restart it from scratch.

As for database, there isn't any needs for that as for example MySQL can use replication pretty well, but no need to copy files across servers. Or if you want to copy files, then you just optimize it before doing so and then the empty space is taken care of before end.

Hope it answer your question and give you an example.

Daniel

Reply via email to