Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fill FS with random characters but fast

Status
Not open for further replies.

TSch

Technical User
Jul 12, 2001
557
DE
Hi folks,

I'm looking for a fast way to completely fill a certain filesystem (3TB) with random characters.

So far I tried

Code:
dd bs=2 if=/dev/random of=/Directory/File.out

Problem is: This is extremely slow and would take weeks to complete.

Is there anything else with a better performance I could use ?

Regards,
Thomas
 
Also consider increasing your block size to maybe 512 or 1M


"If you always do what you've always done, you will always be where you've always been."
 
I tried, but it's still way too slow ...
 
Does it have to contain random characters? If you're just trying to fill up the filesystem, try:

Code:
dd if=/dev/zero of=/Directory/File.out bs=1048576

Regards,
Chuck
 
I've used a couple of ways in the past todo this; not sure how fast they'd be though

1) yes > /path_to_filesystem/filename

2) create a file with a few long random lines > file1

while :
do
cat file1 >> file2
cat file2 >> file1
done

If speed is an issue and you are doing testing/monitoring (can't think of another reason you'd want to do this), why not just make the filesystem smaller for the test?

Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
Thanks a lot everyone, that's been a lot of useful hints !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top