Create an Empty File in Windows of fixed size

I’m on the team that manages one of our largest (Windows-based) fileserver installations, on the order of nearly 3TB.  Back when we crossed the 1TB threshold (two years ago), we decided to start mirroring the fileserver in another building, just to cover our butts in the event of a disaster (of the IT variety).  We’ve weathered a few in the past.

The mirroring process required a little bit of space on each drive/LUN to store synchronization files.  So going forward from that point, we sized all LUNs about 10% larger than the department request (and only charged each department the amount of their initial request).  

It turned out that we didn’t have to allocate the additional space for the mirroring process.  It’s extremely impractical to shrink a volume/drive, so how do we take the slack-space so that the departments don’t use more than what they’re paying for?

Enter the fsutil command-line utility (which has been around since Windows XP!).

So, for example, we have a 550GB volume/drive/LUN, the department only paid for 500GB, and we want to take the 50GB of “extra” space:

fsutil file createnew SystemFileDoNotDelete.dat 53687091200

That last number is a little annoying; the file size is in bytes.  Who works in bytes anymore?

Anywho, the 10% slack space ended up being useful yesterday; one of the 500GB drives for the Marketing department became 100% full!  This is totally insane to me, but luckily we were able to avoid any problems by temporarily allocating part of the slack space by resizing the “empty” file.  Score one for unintended consequences.


15 Responses to “Create an Empty File in Windows of fixed size”

  1. 1 janis and michael January 7, 2007 at 19:46 pm

    Joey and Ted,

    We checked out the blog and the pics. good times. We miss you guys!

    Have we mentioned the B&B for Newfoundlands that we opened in Park Slope? Something to think about…

    -Janis and Michael

  2. 2 guamaniac January 8, 2007 at 12:39 pm


    B&B for Newfoundlands? Does that mean we can crash at Michael’s apt in Park Slope when we visit NYC?

  3. 3 Kurt Faasse February 3, 2007 at 11:42 am

    Thanks for revealing the existence of fsutil. It is precisely the tool that I need. I can only wonder why MS did not include a simple text file with XP listing all the available tools and their basic usage.

  4. 4 Oleg Blinov February 9, 2007 at 2:24 am

    Perfect!Exactly what I was looking for!I have reserved some space on the drive where MS Exch resides in case I would need it in emergency ;-)!

  5. 5 Sivaram September 12, 2008 at 9:23 am

    fsutil was really a useful tool, i vouch Kurt Faasse. If some readme regarding the utils available with winxp will be very userful

  6. 6 Bozo April 13, 2010 at 9:06 am

    It should be noted that ‘fsutil’ only works when started with admin rights, so it’s not a generic solution for i.e. tool scripts which are used from a non-admin account.

  7. 7 Http://Orgumodelleri.Th9.Co/Ornekleri/Kanavice March 26, 2013 at 1:50 am

    If you wish for to take much from this article then you have to apply these strategies to your won blog.

  8. 8 Web Page April 11, 2013 at 8:30 am

    This piece of writing is genuinely a pleasant one it helps
    new internet visitors, who are wishing in favor of blogging.

  9. 9 forever living products aloe vera May 2, 2013 at 12:10 pm

    I seriously love your blog.. Excellent colors & theme.
    Did you make this site yourself? Please reply back as I’m looking to create my own site and would love to find out where you got this from or just what the theme is called. Thank you!

  10. 10 how to get free itunes codes July 14, 2013 at 1:38 am

    If you would like to improve your knowledge simply keep visiting this website and be updated with
    the newest gossip posted here.

  11. 11 kızılcahamam August 1, 2013 at 17:08 pm

    Hello to every body, it’s my first pay a quick visit of this website; this blog consists of remarkable and truly fine material for visitors.

  12. 12 cd baskı August 28, 2013 at 0:21 am

    Thank you for the good writeup. It in truth used
    to be a amusement account it. Look complex to far introduced agreeable
    from you! By the way, how could we be in contact?

  13. 13 September 7, 2013 at 19:16 pm

    There’s definately a great deal to know about this subject.
    I really like all of the points you have made.

  14. 14 More Info July 26, 2014 at 11:08 am

    It is actually suitable the perfect time to have ideas for any long term in fact it is time for you to be happy. I’ve check out this distribute and when I really could I must advise people several appealing things or even suggestions. You can certainly produce up coming articles in regards to this write-up. I have to go through far more reasons for having this!

  1. 1 smoke and fire alarm systems northleach Trackback on March 19, 2018 at 16:45 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Change a Lightbulb, change the world!

It only takes 18 seconds to change a bulb. If every American home replaced just one light bulb with an energy-efficient bulb, together we could save enough energy to light more than 2.6 million homes for a year. Find out how you can save energy and cash by making the switch to energy-efficient light bulbs... and check out how many have already sold in your area.

CFL lightbulb

Coconut Trees

Coral Reefs

January 2007
« Dec   Feb »

%d bloggers like this: