[clug] Who has better dd foo than I?

Ben Coughlan ben.coughlan at gmail.com
Mon Aug 6 20:26:06 MDT 2012

Not sure about your actual question, but an alternative solution would be to use LVM.  You can create a small volume and gradually increase it when you need to.  Modern kernels can do the filesystem resize online.  You could even do it without LVM by just resizing the partition on the disk, but that doesn't feel as safe.


On 07/08/2012, at 11:53 AM, Andrew Janke wrote:

> 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
> -- 
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.samba.org/pipermail/linux/attachments/20120807/f75a8fc3/attachment.pgp>

More information about the linux mailing list