Creating a REALLY BIG file!

I ran into an occurrence where I needed to create a really big file. I was having an issue with a backup procedure failing at only 16gb. After extensive troubleshooting, I thougth that maybe the issue was with the hard drive. The backup solution would reach the 18gb mark and fail due to some inconsistency.

So, where I can I find a big file?

  1. Copy an existing large file off another server or workstation - great, but all the large files are open and I didn't want to shut something down.
  2. Create one using smaller files. Sure, but how do you tack them together? ZIP would work, but that tends to make binaries smaller.
  3. Finally create one. Heck, I created the following script to write random characters out until it reached the final size.

My first few versions of the script failed miserably. Well, they worked but it took FOREVER. 1% created after 10 minutes. I'd still be waiting for this file to create the 16 hrs later. I modified the script to include hard returns into the string. This decreased my total time down from 16hrs to about 5 minutes to create a 20gb file.

The final size of the file is not hard set.
Change this value, to increase or decrease the total gigabyte of the file.

Line 19.           gb = 20

Also, adjust the final location of the file. Just make sure you don't fill up the hard drive you write to. I don't check free space on the destination. I commented out the code to allow writing to a virtual mount point.

Line 23.           strBigFileName = "k:\utility\BigFile_"&Day(Now()) & Month(Now())&Year(Now())&".txt"

Happy Testing!

AttachmentSize
CreateABigTextFile.vbs2.71 KB

Comments

Or...

You could do what I did and just grab a Exchange .edb database. It fit the bill perfectly. :)

I recently found that you

I recently found that you can use a native Windows tool, FSUTIL. According to MS, it contains all zeros, so it should compress VERY small for transport.

To create a 20gb file:

fsutil file createnew c:\test.bin 20000000000

You could also make a

You could also make a TrueCrypt volume. Not as quick as 5 minutes though. More useful though.

I have not used TrueCrypt,

I have not used TrueCrypt, but it appears to allow creation and mounting of an encrypted volume. Unfortunately that would require installing additional applications on a production (aka LIVE) server hosting thousands of mailboxes. In my environment, this would be a BIG NO-NO without proper change control (which could take a week or more to get approved, require signoff from a committee, and need to be fully tested in our test environment).

The script (or FSUtil) utilize existing system resources.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <blockquote> <center> <hr> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <drupal6>, <html>, <java>, <javascript>, <php>, <posh>.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.