[clug] Who has better dd foo than I?

Andrew Janke a.janke at gmail.com
Mon Aug 6 19:53:20 MDT 2012


SITREP: I have a big new raid volume that I want to "release" to the
masses slowly. Call it social engineering "oh the disk is 90% full
better clean up before I run that".

In the past I have done this by creating hidden files in the root dir
of the partition and slowly removed them over time. You fill them with
zeros and a backup system that compresses files will take no notice of
them.

ie:

   dd if=/dev/zero of=/export/big-disk01/.10TB count=10000000

This of course takes a while.  Playing games like this (sparse file)
is very quick:

   dd if=/dev/zero of=/export/big-disk01/.10TB count=1 seek=10000000

It does create a file of this size but of course du and df don't take
much notice.  I have also found this:

   http://sandeen.fedorapeople.org/utilities/fallocate.c

But I think it will suffer the same problem, I say think as I haven't tried it.

So: how would you make a big file quickly to fill a disk up (before
the users find it)?

ta



a


More information about the linux mailing list