I'm using Windows 7. I just lost a .vdi file (a virtual hard drive for my VM), and I'm wondering if there's a file size limit for windows which might have caused a problem. I hadn't checked the size of the file lately (I set it to dynamically size as needed), but it was 15 to 30Gb at a guess.
It wouldn't back up using Windows Backup, but is it possible Windows has just stopped recognising it because it's too big? Is there a clear upper limit on file size?
15 Answers
If the drive with your file is formatted with NTFS (which is the default in Windows 7), then according to Wikipedia, the maximum file size is 16 TB. Even if you were to (attempt) to exceed that limit, you would simply be unable to make the file any larger. It might lead to some strange behavior in VirtualBox, but would not cause the file to disappear.
What exactly do you mean by "lost"? Have you tried doing a search on the drive for *.vdi? It seems more likely that it got accidentally deleted or moved somehow.
As designed, the maximum NTFS file size is 16 EB (16 × 10246 bytes) minus 1 KB (1024 bytes) or 18,446,744,073,709,550,592 bytes.
As implemented, the maximum NTFS file size is 16 TB (16 × 10244 bytes) minus 64 KB (64 × 1024 bytes) or 17,592,185,978,880 bytes.
Sounds like the filesystem lost the link to the file on your HDD, you should try using chkdsk.
If filesystem of your disk drive is NTFS, 30Gb file size shouldn't be a problem. Do check drive for filesystem errors with chkdsk.
Answering the question as asked, yes, there is a file size limit on any file system. For FAT/FAT32 partitions with normal sector/cluster sizes, it's about 4GB. For NTFS (again, with normal sector/cluster sizes), it varies--I've seen claims that Windows XP and higher can theoretically handle files as large as 16TB or even larger; I'll update this in a few more years when hard drive technology reaches the point we can test that theory.. :-D
So, answering what the OP really meant to ask.. Any issues with your *.vdi are more likely related to you virtual machine software and/or any supplementary software you use to manage the file rather than with the file system or OS. (I run WinXP Pro 32-bit/SP3 with an Oracle VirtualBox installation with a little over 150GB virtual disk image/file, far more than the 15-30GB the OP has issues with, and have had no issues with such a large disk image file.)
Also, note that any issues might even be related to disk failure or available/corrupted RAM memory--Managing a virtual disk requires keeping various data about the disk in RAM for "quick" access (quick here means not having to wait for 10-15 seconds while the VM searches the virtual disk for even a single-byte sized file..), and most issues I've seen with VM's are related to those data structures getting corrupted in RAM (and then the corrupted data written back out to the disk file!)--So backup often!
1