[SOLVED] Cannot shrink C: partition due to \$Mft::$BITMAP error ?

Status
Not open for further replies.

yashdsingh2004

Honorable
Oct 6, 2018
40
0
10,540
Hi,

-> I cannot shrink C: partition in Windows 11. 105GB is free yet in Disk Management I get around 24-26GB only. It gives the error of unmovable files. (Full specs at bottom)
-> I am writing this after disabling hibernation, page file, system restore, and restarting my laptop.
-> Now, when I am trying to shrink, I am getting \$Mft::$BITMAP error in Event Viewer, more precisely ->
A volume shrink analysis was initiated on volume (C:). This event log entry details information about the last unmovable file that could limit the maximum number of reclaimable bytes.

Diagnostic details:
- The last unmovable file appears to be: \$Mft::$BITMAP
- The last cluster of the file is: 0x34b6134
- Shrink potential target (LCN address): 0x20ceb3c
- The NTFS file flags are: -S--S
- Shrink phase: <analysis>

To find more details about this file, please use the "fsutil volume querycluster \\?\Volume{adf0c1b6-ea35-4824-8bec-33e20d926158} 0x34b6134" command.

So, I ran fsutil volume querycluster \\?\Volume{adf0c1b6-ea35-4824-8bec-33e20d926158} 0x34b6134 and I got this:

a8LrwPw.png


I tried to get info about \$Mft::$BITMAP and one site mentioned to use Contig utility to fix it but didn't said how. I downloaded it from. I tried 2 commands from it:
1. Contig.exe -a -s -v c:\\$mft

UNMRmHH.png

2. Contig.exe -a -s -q -v c:\\$mft

LPKEZ6f.png


Specs:
Acer Nitro AN715-51
Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz 2.40 GHz
8.00 GB (7.84 GB usable)
Intel UHD Graphics 630 / NVIDIA GeForce GTX 1650
Windows 11 Home Single Language 22H2

Pic of my Disk Management:
Disk 0 is HDD, Disk 1 is SSD. I have no idea why there's 2 F: partitions in Disk 0 but since it appeared in Windows File Explorer as 1 partition, I just left it as it is. Also, regarding New Volume U: (7MB) in SSD, I remember finding unallocated space when I got the laptop from someone. They said they couldn't merge it, so I left it as it is since it's just 7MB.
iocLVUA.png

Now, I just don't know how to resolve this to partition C:. Does anyone know anything?
 
Last edited:
Solution
Which commands do you think I should run in recovery environment? Also, is recovering environment the one where u access cmd from some advanced startup menu options?

Is there a free software I can perform partition? Only one I know of is minitool which is paid for doing this task.
Partition Wizard has a free version, it might be able to do this.

The only other tool I remember using was EaseUS's Partition Master
Moving thread from Windows 11 to Storage.

= = = =

As I understand it, Contig is a disk defragmenter and not a disk management tool per se.

= = = =

Update your post to include full system hardware specs.

(Windows 11 OS noted.)

Open the Disk Management window and expand so all can be seen.

Capture a screenshot and post the screenshot here via imgur (www.imgur.com).
 
Moving thread from Windows 11 to Storage.

= = = =

As I understand it, Contig is a disk defragmenter and not a disk management tool per se.

= = = =

Update your post to include full system hardware specs.

(Windows 11 OS noted.)

Open the Disk Management window and expand so all can be seen.

Capture a screenshot and post the screenshot here via imgur (www.imgur.com).
I have done all changes required. I have included the reason why I used Contig in og post but in short, some site mentioned to use Contig to solve the \$Mft::$BITMAP error but didn't specified how. So I tried some commands which "might" help in defragmenting the \$Mft::$BITMAP in some way which will help increase size when I shrink. But it didn't do anything. In one of the screenshots, it said failed to open mft/bitmap.
 
I think there are a number of things that can be done.

However, the immediate concern is the data stored on the drives. Is all data on any drive or partion backed up to other locations and proven to be recoverable and readable?

And you received the laptop with Disk 0 being two partitions each STEM F: - correct?

= = = =

Have you done or even attempted any solutions such as those presented in the following link?

https://www.minitool.com/news/volume-bitmap-is-incorrect.html

For the moment, do not do any of them - the objective simply being to establish some past history.

Regarding:

Contig.exe -a -s -q -v c:\\$mft
-a analyzed fragmentation
-s recurse subdirectories
-q quiet mode
-v verbose

Reference:

https://learn.microsoft.com/en-us/sysinternals/downloads/contig

What I am honestly unsure about is the targeting of c:\\$mft

Another thing that can be done is to learn more about what Microsoft/Windows is seeing with respect to the installed drives:

= = = =

Powershell can be used to learn more about the drives, partitioning, and letter assignments, etc..

Open Powershell as Admin and run the following cmdlet at the PS> prompt:

Get-Partition
The cmdlet will only gather more information about the drives and will not change anything.

Copy and paste the results - there should be no need to retype anything.

For more information about the use of Powershell and the drive related Get's:

https://shellgeek.com/powershell-get-disk-information/
You can easily find other similar links. Some links employ other Powershell commands. However, only use Get's for now.
 
The MFT Bitmap is a system file that's always in use, because it's what stores how data is allocated on the partition.

You could try booting into a recovery environment through a Windows installer and using the command line from there.

Otherwise third party partition management tools can shrink the system partition, but it comes with the risk of data loss since it has to move the MFT Bitmap. So make sure you have a copy of what's important from the C:\ drive before you do it.
 
I think there are a number of things that can be done.

However, the immediate concern is the data stored on the drives. Is all data on any drive or partion backed up to other locations and proven to be recoverable and readable?

And you received the laptop with Disk 0 being two partitions each STEM F: - correct?

= = = =

Have you done or even attempted any solutions such as those presented in the following link?

https://www.minitool.com/news/volume-bitmap-is-incorrect.html

For the moment, do not do any of them - the objective simply being to establish some past history.

Regarding:

Contig.exe -a -s -q -v c:\\$mft
-a analyzed fragmentation
-s recurse subdirectories
-q quiet mode
-v verbose

Reference:

https://learn.microsoft.com/en-us/sysinternals/downloads/contig

What I am honestly unsure about is the targeting of c:\\$mft

Another thing that can be done is to learn more about what Microsoft/Windows is seeing with respect to the installed drives:

= = = =

Powershell can be used to learn more about the drives, partitioning, and letter assignments, etc..

Open Powershell as Admin and run the following cmdlet at the PS> prompt:

Get-Partition
The cmdlet will only gather more information about the drives and will not change anything.

Copy and paste the results - there should be no need to retype anything.

For more information about the use of Powershell and the drive related Get's:

https://shellgeek.com/powershell-get-disk-information/
You can easily find other similar links. Some links employ other Powershell commands. However, only use Get's for now.
I have backup of important stuff. Yes, there were 2 F partitions.
I had already ran chkdsk, sfc scannow, error checking from C: settings and seriously no errors in any of them.
This is the output of Get-Partition:

Xplszm3.png
 
Last edited:
The MFT Bitmap is a system file that's always in use, because it's what stores how data is allocated on the partition.

You could try booting into a recovery environment through a Windows installer and using the command line from there.

Otherwise third party partition management tools can shrink the system partition, but it comes with the risk of data loss since it has to move the MFT Bitmap. So make sure you have a copy of what's important from the C:\ drive before you do it.
Which commands do you think I should run in recovery environment? Also, is recovering environment the one where u access cmd from some advanced startup menu options?

Is there a free software I can perform partition? Only one I know of is minitool which is paid for doing this task.
 
Did you create that U: drive? Or was that drive also already on the laptop?

Noted that F: did not appear in the Get-Disk results.

Now try Get-Volume

Results from my computer:

Your results will of course be different.

PS C:\WINDOWS\system32> Get-Volume

DriveLetter FriendlyName FileSystemType DriveType HealthStatus OperationalStatus SizeRemaining Size
----------- ------------ -------------- --------- ------------ ----------------- ------------- ----
DELLSUPPORT NTFS Fixed Healthy OK 247.64 MB 1.07 GB
ESP FAT32 Fixed Healthy OK 574.46 MB 646 MB
Image NTFS Fixed Healthy OK 235.32 MB 11.66 GB
T Terabyte_SSD NTFS Fixed Healthy OK 408.84 GB 931.5 GB
E Unknown CD-ROM Healthy Unknown 0 B 0 B
C OS NTFS Fixed Healthy OK 85.81 GB 224 GB
WINRETOOLS NTFS Fixed Healthy OK 309.5 MB 990 MB
D Dell Data NTFS Fixed Healthy OK 331.37 GB 465.63 GB


= = = =

There are commands etc. that can be used to create, change, and delete partitions.

However, care must be taken to ensure that the correct commands are used and applied to the applicable drives and/or partitions.

I, for one, am still not sure about that Disk 0, the F: drive(s) configuration.

Take another screenshot of the Disk Management window but be sure that each disk and its respective partitions are fully shown. For example the U: (Disk 1) is likely cut off and there may more beyond the end of Disk 0.
 
Which commands do you think I should run in recovery environment? Also, is recovering environment the one where u access cmd from some advanced startup menu options?

Is there a free software I can perform partition? Only one I know of is minitool which is paid for doing this task.
Partition Wizard has a free version, it might be able to do this.

The only other tool I remember using was EaseUS's Partition Master
 
Solution
Did you create that U: drive? Or was that drive also already on the laptop?

Noted that F: did not appear in the Get-Disk results.

Now try Get-Volume

Results from my computer:

Your results will of course be different.

PS C:\WINDOWS\system32> Get-Volume

DriveLetter FriendlyName FileSystemType DriveType HealthStatus OperationalStatus SizeRemaining Size
----------- ------------ -------------- --------- ------------ ----------------- ------------- ----
DELLSUPPORT NTFS Fixed Healthy OK 247.64 MB 1.07 GB
ESP FAT32 Fixed Healthy OK 574.46 MB 646 MB
Image NTFS Fixed Healthy OK 235.32 MB 11.66 GB
T Terabyte_SSD NTFS Fixed Healthy OK 408.84 GB 931.5 GB
E Unknown CD-ROM Healthy Unknown 0 B 0 B
C OS NTFS Fixed Healthy OK 85.81 GB 224 GB
WINRETOOLS NTFS Fixed Healthy OK 309.5 MB 990 MB
D Dell Data NTFS Fixed Healthy OK 331.37 GB 465.63 GB


= = = =

There are commands etc. that can be used to create, change, and delete partitions.

However, care must be taken to ensure that the correct commands are used and applied to the applicable drives and/or partitions.

I, for one, am still not sure about that Disk 0, the F: drive(s) configuration.

Take another screenshot of the Disk Management window but be sure that each disk and its respective partitions are fully shown. For example the U: (Disk 1) is likely cut off and there may more beyond the end of Disk 0.
I had created U: because I was unable to merge it with C:.
Here's response:
eD7LvOx.png

There's nothing new in Disk management screenshot :sweat: . It doesn't zoom in or out and there's no scrolling within Disk 0. U: only appears written when i hover over New Volume and in File Explorer.


I tried Diskpart and F was there.
C47yoYy.png
 
@yashdsingh2004

This:

"I see, I will give it a shot tomorrow if this doesn't get solved without 3rd party soft use."

Agree but the problem should not require 3rd party soft [Software] use.

You now have other Tom's participants/members interested in the problem.

And now knowing that Linux is involved may solicit other posts and ideas.

Hopefully someone will be able to identify the specific problem and/or offer potential solutions.
 
@yashdsingh2004

This:

"I see, I will give it a shot tomorrow if this doesn't get solved without 3rd party soft use."

Agree but the problem should not require 3rd party soft [Software] use.

You now have other Tom's participants/members interested in the problem.

And now knowing that Linux is involved may solicit other posts and ideas.

Hopefully someone will be able to identify the specific problem and/or offer potential solutions.
Yes, to be honest I was able to postpone the deadline for dual partitioning, so I will use 3rd party app after a month or so.
Hopefully this gets resolved by then.
 
Reading back and referencing Post #11.

DISKPART> list disk results in two different disks being shown.

Disk 0 = 938 GB
Disk 1 = 238 GB

However:

DISKPART> list vol results for Disk 1 and Disk 0 are identical....

Not what I would expect. Then I noted Disk 0 being "dyn".

FYI:

https://learn.microsoft.com/en-us/windows/win32/fileio/basic-and-dynamic-disks

From the link:

"For all usages except mirror boot volumes (using a mirror volume to host the operating system), dynamic disks are deprecated."

Not sure about what all has happened with respect to past disk history and actions.

However the following link may now prove helpful:

https://learn.microsoft.com/en-us/w...nt/change-a-dynamic-disk-back-to-a-basic-disk

As always be very sure that all important data is backed up and proven to be recoverable and readable.
 
I guess you need administrator privileges to modify the $Bitmap metafile. The documentation for Contig does say that it can defragment this file:

https://learn.microsoft.com/en-us/sysinternals/downloads/contig

That said, I'm guessing that this must be the only file whose content is changed by the defragmentation process. That's because this file contains a map which indicates whether each cluster is free or in-use. This map would include those clusters that are occupied by the $Bitmap file itself. So, if you move the $Bitmap file, you change the clusters which it occupies, which then changes the map.
 
  • Like
Reactions: Ralston18
@fzabkar

Indeed.

So much seems to have happened with respect to the disks, partitions, and files involved that I am not sure that there is any one command or tool, etc. to resolve the issues.

My thoughts are leaning towards starting from scratch and then restoring data from backups.

Still could be worth some further effort to directly recover as long as the backups are protected.

Hopefully at some other physical location not accessible by the current host system.
 
Reading back and referencing Post #11.

DISKPART> list disk results in two different disks being shown.

Disk 0 = 938 GB
Disk 1 = 238 GB

However:

DISKPART> list vol results for Disk 1 and Disk 0 are identical....

Not what I would expect. Then I noted Disk 0 being "dyn".

FYI:

https://learn.microsoft.com/en-us/windows/win32/fileio/basic-and-dynamic-disks

From the link:

"For all usages except mirror boot volumes (using a mirror volume to host the operating system), dynamic disks are deprecated."

Not sure about what all has happened with respect to past disk history and actions.

However the following link may now prove helpful:

https://learn.microsoft.com/en-us/w...nt/change-a-dynamic-disk-back-to-a-basic-disk

As always be very sure that all important data is backed up and proven to be recoverable and readable.
Ok thanks for that information, I didn't even noticed that, but I am trying to partition C drive which is in Disk 1. So, as of now, I don't think it's worth changing Disk 0 to basic.
 
Status
Not open for further replies.