1823144 Members
3630 Online
109647 Solutions
New Discussion юеВ

fill up file system

 
Sathish C
Frequent Advisor

fill up file system

Hi
There is requirement to test a software whne the file system is almost full.Is there a quick and easy way to fill up a file system of lets say 400G , without unmounting this file system and recreating it with a lesser file system size .

Thanx
Some cause happiness wherever they go; others, whenever they go
8 REPLIES 8
Mark Grant
Honored Contributor

Re: fill up file system

Apart from shrinking it?

dd if=/dev/zero of=/filesystem/bigfile bs=1024

Will eventaully fill it up completely. However, you can add "count=200000" at the end of that command to come pretty damn close to 400GB and then stop.
Never preceed any demonstration with anything more predictive than "watch this"
Mark Grant
Honored Contributor

Re: fill up file system

Another alternative is to give the filesystem to the nearest DBA for ten minutes.
Never preceed any demonstration with anything more predictive than "watch this"
Jean-Louis Phelix
Honored Contributor

Re: fill up file system

hi,

You can also use the 'prealloc' command :

$ prealloc name size

See man prealloc.

Regards.
It works for me (┬й Bill McNAMARA ...)
Mark Grant
Honored Contributor

Re: fill up file system

Thanks Jean-Loui, thats a new one on me!
Never preceed any demonstration with anything more predictive than "watch this"
Sathish C
Frequent Advisor

Re: fill up file system

Wow Jean , this is a damn good one thank you for your suggestion , will let you know how long it took to fill it up withb this command .
Some cause happiness wherever they go; others, whenever they go
Jean-Louis Phelix
Honored Contributor

Re: fill up file system

Thanks guys ... Yes, this is a 'secret' command :^) ! Not very used, don't know why ...

Regards.
It works for me (┬й Bill McNAMARA ...)
Tim Sanko
Trusted Contributor

Re: fill up file system

Although prealloc works fine, The DBA will be thankfull for the opportuninty to have storage for once...

The goodwill is always welcome :)

Tim
Sathish C
Frequent Advisor

Re: fill up file system

Hi
Thank you for the suggestion . The command does work b ut took about 155 Mins which is quite long . Copying a another file system into this via rcp or scp would have given me the same time to fill this up . I would say still I am looking for something which can do this in maximum 5 to 10 mins unless I am expecting something which can not be done at all .
Some cause happiness wherever they go; others, whenever they go