How To Use DiskPart Command To Recover Missing Or Unallocated Space On A USB Drive

The other day I was trying to burn an Image on a USB drive and ran into a strange problem.

After using a freeware image burner to burn a portable Operating system on my 4GB removable drive, I found that my USB drive has lost all it’s space. I opened Windows Explorer, right clicked the USB drive icon, selected properties and found that the available space shown was only 250 MB.

More than 3 Gigabytes of free space was lost in thin air !

lost-space-usb-drive

I thought that since I have burned all the files of a portable os on the USB drive, it might have rewritten the partition on the USB drive. I performed a quick format and then a complete clean format of the removable pen drive but the lost space was not recovered. The USB drive was showing the same space status e.g “ Free space available: 30 MB”, Used Space: 3.5 GB”.

The fact of the matter is that the USB drive was completely accessible and I can easily copy or move files and folders from my computer to the removable drive. But anything more than 250 MB was not accepted as the USB drive has lost all space after trying to burn some files on to it.

Next I tried a disk wipe utility to completely delete the USB partition, formatted it again but the problem was not fixed. Again, I tried some free programs to recover hard drive space in Windows but none of them worked.

Finally, I was able to recover lost space on the USB drive using DiskPart command built right within Windows.

Recover Lost Space On a USB Partition: Reuse Unallocated Space

If you are going through a similar situation and want to get back the lost space on a USB partition or rewrite the unallocated USB partition, here are the steps you should follow:

1. First back up all the data from your USB drive to another location.

2. Click Windows start menu, type disk management in the search box and click on “Create and format hard disk partitions”

Create and format hard disk or USB partitions

3. On the disk management window, you should see your computer’s hard drive listed under the “Disk 0” pane. All removable drives including the USB drive or any removable hard disk which you might be using shall be listed under the “Disk 1” pane.

disk-management-pane

Note: Be very careful while working over the disk management console window. If you don’t know what you’re doing, please consult an expert who has the knowledge of formatting hard disk partitions. In case your hard drive has crashed and the OS isn’t booting at all, please read our guide on recovering all the data from a hard drive in case of system failure

3. If you have lost space on the USB drive or any removable storage, you should see a large amount of unallocated space under “Disk 1” pane.

If you see that a good amount of unallocated space is shown in the Drive 1 pane, calm down. Your USB drive is perfectly fine and it is very much possible to allocate the lost space and recover it on the USB partition. The hardware is OK and neither you need to go to your computer vendor and install any firmware on it.

The Problem with Unallocated space on USB drives

The problem here is that the freeware image burner completely changed the system partition on the USB drive and after the image was burned, all the unused space has been automatically unallocated. [ Some operating systems e.g Chrome OS requires that the source disk should not have any free space available and I am very sure that the Chrome OS image is the actual culprit which unallocated all the free space on my USB drive. ]

Now all you have to do is delete the existing partitions on the USB drive and recreate a new partition from Windows Disk management console.

While there are a lot of open source and free disk management utilities available, there is no need t use any of them. You can recreate the fresh partition using any of the following two ways:

  • Use Windows Disk Management console to delete the existing partition, create a new partition and allocate the unallocated space
  • Use Windows DiskPart command to delete all partitions in the removable drive and allocate all the unavailable space to a new parition.

I would follow the second method because it’s more easy and takes only half a minute.

4. Click Windows start menu, type “Diskpart” and click the result to open the DiskPart command prompt window.

open-windows-diskpart-utility

5. In the command prompt window, type list disk and hit Enter.

6. This will show the current hard drive as well as removable drive status of your computer. The removable USB drive or hard disk will be shown under Disk 1, as shown below:

recover-space-usb-drive-diskpart

7. Next, type in the following commands one by one:

select disk 1

Clean

create partition primary

8. The first command selects your removable USB drive while the Clean command deletes all the current partitions present on the USB drive. Next, the “Create primary partition” creates a fresh partition and allocates all the unallocated space on this fresh partition.

9. When you are done, type Exit to close the command prompt window.

10. Done !

Unplug your USB drive and plug it back again. You should now see that the entire unallocated space on the USB drive has been recovered. Here are a couple of more articles which are worth a read:

Did you accidentally deleted your USB partition ever? How did you fix the problem? Let us know your thoughts in the comments section.

Related articles

How To Disable Chrome Incognito Mode On Windows And Mac

How To Watch Netflix With Friends From Remote Distance

How To Mirror Or Flip Photos On iPhone And iPad

Fix Instagram Keeps Crashing Or Not Working Issue

31 comments

  1. Biswajit says:

    This blog is very useful to me.. Thank you very much……….

  2. TheinDollar says:

    if the upper post are not working please try this

    0. Download the Lexar tool and extract to your PC
    – Click here to download: http://www.911cd.net/forums//index.php?s=386ac2de1215bfae9adb0d2fdadacd77&act=attach&type=post&id=369
    1. On Windows 7, remember to right click and “Run as Admin”.
    2. Select your thumb drive letter, and click on the ‘Non-Active’ radio button at the bottom of the window
    3. Now click on the ‘Format’ button
    4. Remove and insert back of your Flash drive
    5. Go back to disc management and reformat the flash drive again and you will get the whole space again

    Voila!

  3. Rico says:

    Thanks heaps! This was exactly what I was looking for and very clearly explained.

  4. dan says:

    the second part of this article helped me so quickly after trying to figure this out myself!  thanks alot.

  5. Yasmin B. Pondang II says:

    i trying this process but my usb problem is need to reformat before to see files…i need a process that not erase my files..can you plz. help me..

  6. Xyz says:

     Great work man….

  7. Algrakyl says:

    thanks man! works great for me I have now the lost usb space. before only 1gb was seen but now
    it is completely 8gb. i use the disk part.. wonderful !!!!

  8. WhalesharksKerman says:

    Thanks for the guide!
    Ubuntu’s Startup Disk Creator messed up my USB.

  9. Kyle Andrew James Bacon says:

    Thank you! I knew my 8GB TMNT USB wasn’t 2GB it was due to changing the file system to install Windows XP off USB. Will keep this for future reference!

  10. Jose Maria Claramunt says:

    Diskpart worked like a charm :)

    Thank you!

  11. Tony Stark says:

    This was very useful to me.. Thank you very much……….

  12. Sukh Sondh says:

    hey there tried doing option 2 on my usb drive, in dos prompt it gave an error, said access denied. the last I had tried using it was for installing chrome os on a netbook. now when I plug in the usb drive on the computer window pops up with the usb name (G:) but says please insert disk into G:. and when I access it in my computer it says o bytes available …. please help

  13. Samridhi Shukla says:

    thanks was useful and saved sometime

  14. William Korcari says:

    Very usefull, thank you very much!!

  15. Mohammad Joudi says:

    i cant find Disk 1 in the list disk command .. i only find Disk 0 .. plus the disk management feature gives an error when i try to create a new partition .. So what can i do ?

  16. Ivanna Cole says:

    Hi,
    I tried this after I had the same problem after recovering the Chrome OS on my daughter’s Chromebook. Now, when I go to format the disk, it says I can’t write to it. I tried changing the attribute but it says “No” under the readonly attribute such that it thinks it’s not read-only. How do I get this thing formatted??

  17. xda-emptys says:

    Amazing! Halped a lot :)

  18. xda-emptys says:

    -Ivanna Cole try during installation to usb pull out flash, then use this method:)

  19. Tom says:

    Thanks!!!
    Worked perfectly!!!

  20. Srinivasan Gopalan says:

    Excellent, thank you very much! This is exactly what I needed to fix my issue.

  21. Momo Guy says:

    hey thanks very much everything worked very well; except from the fact that i can’t see my external disk no more except in the disk management. AND it says capacity : 0 octet. CAN you help me please ?

  22. NC says:

    Thank you soooo much this actually worked! However the usb dive I wanted to clean showed up under Disk 2. So just be mindful that not all external usb drives will be under disk 1 as the article states. Look carefully to make sure you are erasing the right drive and changing the command to fit that.

  23. anonymous says:

    great bro! exactly what I wanted, Remix OS converted my 16gb pen drive into 1 gb, but you post helped me, thank you.

  24. Michael O'Connor says:

    Diskpart. Great little program. Great article… right to the point and easy to follow. Thank you so much.

  25. Charu Arora says:

    Perfect solution. Previously I was going paranoid but this worked fantastic for me!

  26. Jeevan Khadka says:

    this worked thanks a lot

  27. Nick says:

    I had a 32gb USB with tons of missing space, was only able to use 2mb of it. This fixed the problem, thanks a lot!

  28. Alan says:

    Hi the diskpart guide worked spot on. thank you very much it was so simple.

    I made a stupid mistake and lost my mast back up. I had to pay to recover this only to be faced with my 3 TB drive saying 32gb!

    Could easily have spent more time and money fixing this that you showed me in 2 mins for free.

    This is what thy call good karma.

    Thank you.

  29. Robin Hood says:

    this worked perfectly! Thanks alot man ;)

  30. Collin says:

    Thank you! Saved a USB that I thought wad dead :)

  31. Lydia says:

    You saved me! Thank you, thank you, thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *