0
votes

I'm reading an article about NTFS on MSDN website. Here's a part of it,notice the highlighted parts:

"You can change the size of the MFT zone for newly created volumes by to correspond to a percentage of the volume to be used as the MFT zone. The MFT zone sizes follow:

Setting 1, the default, reserves approximately 12.5 percent of the volume.

Setting 2 reserves approximately 25 percent.

Setting 3 reserves approximately 37.5 percent.

Setting 4 reserves approximately 50 percent.

In most computers, the default setting of 1 is adequate. The default setting accommodates volumes with an average file size of 8 KB. Storing a large number of smaller files might necessitate that you increase the size of the MFT zone for new volumes. After you increase the size of the MFT zone, NTFS does not immediately allocate space to accommodate the size of the new MFT zone. Instead, NTFS exhausts the original reserved space before increasing the size of the MFT zone"

Does this mean that i can only change the MFT Zone for new volumes in the future? And by that,"original reserved space" here is 12,5%? It means even new volumes with,say,with 50% MFT Zone,have to exaust the 12,5% to be allocated the rest? Thank you very much!

*The article :https://technet.microsoft.com/en-us/library/cc781134(v=ws.10).aspx

2
It really isn't very clear, is it? My educated guess is that what they mean is that changing the computer's setting won't affect any existing volumes straight away. But if you format a new volume (or reformat an existing one) the new setting will be used.Harry Johnston
Thank you for your answer! Hope someone else can clear things up for us :).Best_Name

2 Answers

0
votes

changing the computer's setting won't affect any existing volumes straight away

sure as hell it won't. In fact, there seems to be no way whatsoever to reduce the MFT reserved clusters size short of reformatting the volume in question. In case somebody knows how to do it, I'm all ears.

I encountered the problem when checking my VMWare virtual machine harddisk space. Running chkdsk returns

11.533.072 KB

but Windows Explorer, cmd dir etc. return 19.6 GB! Who ate the missing space? Who done it?! Google, of course, knows nothing. Wanna-be experts will tell you to enable hidden files in Explorer, delete hiberfil.sys, whatever. Nonsense, of course, all of it. So, finally, I come across the keyword $mft. So I check:

fsutil fsinfo ntfsinfo c:

surprise!

Total Reserved Clusters: 1.820.556 (6,9 GB)
Reserved for Storage Reserve: 1.809.957 (6,9 GB)

There you are, you naughty lost space! So this was checked on Windows Enterprise 20H2 10.0.19042.804 x64 inside VMWare. To compare, I check the same on my real harddisk, Windows LTSC 10.0.10240 x86. Output:

Total Reserved Clusters: 0x0000000000000d30

Well, talking about Windows Updates! They sure did revamp the fsutil command in the last 5 years! Whatever, xd30 == 3.376 clusters, while 20H2 reserved 1.820.556 clusters -> 6.9 GB! So... how to reclaim? Checking Google, the wanna-be experts opened their pathetic mouths again! Just defragment your harddisk, they say, and the problem will be gone! Gone my ar*e! Defrag just defragments the MFT, it doesn't reduce the reserved size.

So, great. Means, backup, format EVERYTHING, restore. Of course, problems all over. So first, backup:

Mount the Win10 ISO (*.esd can be converted to ISO, as far as I know, but I've got an ISO here) into VMWare as a DVD-Drive

Attach a second harddisk. Why? Well, you just read on.

Now boot into boot.wim, do:

dism /Capture-Image /ImageFile:XXX:\six.wim /CaptureDir:XXX:\ /Name:Win10 /ConfigFile:XXX:\peexclude.ini /Compress:fast /Verify

where peexclude.ini includes bullsh*t like

\$Recycle.Bin
\RECYCLER
\System Volume Information
\pagefile.sys

Error 80: The file exists

Errr... Error what?! Well, that's the MS cryptic way of telling you dism ran out of memory. This never happened to me on my real pc, since I have 4GB memory on my old pc and 32 GB on my new one, but currently, I'm running on my old PC, 4 GB - 500 MB reserved to hardware, since x86, so

wmic os get freephysicalmemory, totalvisiblememorysize

FreePhysicalMemory  TotalVisibleMemorySize
2415424             3644720

So I could only assign 1.5 GB to VMWare, not enough. So need "ScratchDir", hence another harddisk needed:

mkdir XXX:\tmp

... /ScratchDir:XXX:\tmp

Fine, so Win dism-ed the harddisk, I then booted into the virtual guest and copied the *.wim backup to my real harddisk using VMWare Tools (shared folders -> HKLM\SYSTEM\CurrentControlSet\Services\vmhgfs ). Then, on real machine:

oscdimg -u2 -h -o -m -us -r "c:\copy\test" "d:\copy\burn.iso"

So basically, creating an ISO containing the *.wim to restore.

Mounted the 20H2 install media into VMWare again as DVD-Drive, same with the ISO containing the Windows backup as another DVD-Drive. Booted into boot.wim on the Win installation media again, then:

format /fs:ntfs /v:XXX /q c:

Invalid volume name...

Invalid what??!! Let's check:

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/format

/v:<label>

Well, Microsoft says, syntax is right, but format command itself says it's wrong. Go figure. So dropped the label parameter, this one worked. Format asked for volume name twice. Once is not enough, it seems. Annoooooying! Damn this weird command! Restored the VMWare snapshot, tried using the diskpart format subcommand instead:

diskpart

select disk 0

select partition 1

format fs=ntfs quick label=XXX

Volume in use. Use "override"

Err.. over-what? Like this?

format fs=ntfs quick label=XXX override

Look, it did it! Lucky guess. Checked the Total Reserved Clusters size again, size was decent, 4 MB or something like that. So tried to restore the wim image:

dism /Apply-Image /ImageFile:XXX:\six.wim /Index:1 /ApplyDir:XXX:\ /Verify

Error 1450: "Insufficient system resources exist to complete the requested service"

That's it! I'm going home! No more dism-ing for me! Well, at least, this time the error was more clear. Ran out of memory again. So I assigned 1.6 GB to VMware, which left my real Windows without memory, trousers down, not that the virtual guest cares about my problems. This time it worked. Rebooted virtual Windows, checked harddisk space in Explorer:

> 12.087 GB

Now we are talking. Checked the Reserved Clusters:

Total Reserved Clusters: 13.360  (52,2 MB)
Reserved for Storage Reserve: 0  ( 0,0 KB)

Finally! Also, check the values in:

HKLM\SYSTEM\CurrentControlSet\Control\FileSystem

I really would like to know what reserved 7 GB for MFT originally. Plus, I still have no idea how to reduce the MFT reserved size short of re-formatting. Microsoft? Anybody?

0
votes

Couldn't make a comment.

@WRFan you are talking about "System Reserved Storage", a space Windows allocates for updates etc., not MFT !!

To enable or disable Reserved Storage (free or allocate space) use:

DISM.exe /Online /Get-ReservedStorageState

DISM.exe /Online /Set-ReservedStorageState /State:Enabled
DISM.exe /Online /Set-ReservedStorageState /State:Disabled