I want to create a test setup which should have a 4tb of High density filesystem. I've tried some tools(wst) but they are crashing after sometime. After struggling for two days im able to fill not even 20% of disk space. I need this tool on windows. Any suggestions?
I can't really make the two terms "Windows" and "4TB of data" match in my head. Windows is a desktop OS written for the average user who does a bit of Word and browsing with IE. If you have special needs, use a server OS like Linux. It comes with all the tools you need to handle large amounts of data. You also get FS benchmark tools like bonnie.
You can also choose from a large set of filesystems where some (like ZFS) are designed for huge sizes (Exabytes). NTFS can theoretically handle this amount of data but I'm not aware that anyone has actually tried this. See this Wikipedia article for some pointers.
[EDIT] Since you use a "server" edition of Windows (which translates to "Desktop OS with a couple of nice wizards to set up the network"), you must have a professional support contract with Microsoft. This means you can just call them, explain your problem and let them tell you how to solve it.
Sorry, I'm being unnecessarily sarcastic here but I find all this really amusing ;) Just because the marketing department slaps a "Server" label on something doesn't mean that a professional administrator would buy it. I'd be surprised if someone would post an answer to the effect "we did the same thing and we could get it working reliably and to our satisfaction".
You can:
- create a small file in a directory,
- copy-paste the directory itself,
- put the duplicate directory into the original one,
and repeat steps 2 and 3 until you reach your need (about thirty times, depending on the size of the initial file).
You can use Disk Tools. I used it once for stress testing a hard disk which presumably had bad sectors.
If all you want is simply to create many many files, you can use this batch script that copies a given file for as many times as possible. There is no stop condition, but I suppose the counter variable will overflow after about 2^31.
Use the script like extreme_copy my_test_file.txt
where the test file can have any size you want.
This is the script:
@ECHO OFF
IF "%1"=="" GOTO END
IF NOT EXIST "%1" GOTO END
REM copy loop
SET FILE_NUMBER=1
:COPY
copy "%1" "%~dpn1_%FILE_NUMBER%%~x1" > nul
REM show some progress
SET /A SHOW_ITERATIONS="%FILE_NUMBER% %% 1000"
IF /I %SHOW_ITERATIONS%==0 ECHO %FILE_NUMBER% files created...
SET /A FILE_NUMBER=%FILE_NUMBER% + 1
GOTO COPY
:END
I made a C# console app do create random files, with random content from 2kb to 10kb.
Compile it ( this is .net 2, but im sure it will compile with any .NET version )
Run like this:
YourExe d:
YourExe d:\temp2
Semi disclaimer, if you run the app long enough it might get a stackoverflow, just start it again if that happens. File names are random, so it will not create any issues
class Program
{
static void Main(string[] args)
{
if (args.Length != 1 || !Directory.Exists(args[0]))
{
Console.WriteLine("Arg should be: C:\\ (or your drive letter)");
return;
}
const int RandomFilesToCreate = int.MaxValue;
for (int i = 0; i < RandomFilesToCreate; i++)
{
string FileName = CreateRandomFile(args[0]);
Console.WriteLine(i + ") Wrote file " + FileName);
}
}
static Random gRan = new Random();
static string CreateRandomFile(string Path)
{
byte[] FileContent = new byte[gRan.Next(2,10) * 1024] ;
// generate a random filename
string FileName = Path + "\\TempF_" + gRan.Next(0, int.MaxValue) + "_" + gRan.Next(0, int.MaxValue) + "_" + gRan.Next(0, int.MaxValue) + ".tmp";
while(File.Exists(FileName))
FileName = Path + "\\TempF_" + gRan.Next(0, int.MaxValue) + "_" + gRan.Next(0, int.MaxValue) + "_" + gRan.Next(0, int.MaxValue) + ".tmp";
// fill with random bytes.
gRan.NextBytes(FileContent);
// Write to disk
File.WriteAllBytes(FileName, FileContent);
return FileName;
}
}