How does disk utility show negative disk usage for a USB Drive?

2

1

I have a 16GB (I think) USB flash drive.

When mounting under OS X, the disk utility reports a capacity of 16.71GB, and available space of 18.52GB. And therefore shows that I have used -1.81GB of space!

An image of the drive in Disk Utility.

How can the usage be calculated as negative? Surely the operating system would have checks for that... but if so, they are not functioning here.

I understand that people can tamper with a USB's firmware to make it show different capacities (e.g. a 2GB USB reports it holds 8GB), but what is happening in this case? The USB is being honest about it's capacity of ~16GB, it seems to be disk utility that is screwing up. Is this possibly related to how available space is calculated? Is the USB's firmware corrupt?

puqeko

Posted 2016-01-31T21:39:41.370

Reputation: 121

I have seen the same case with a USB drive. It's an old drive that I THINK should have 1 GB of space. It similarly shows the space by providing a low capacity of 0.2 GB, a negative space of -0.8GB, and a total of ~ 1GB. – Mike Williamson – 2016-02-01T22:57:34.793

@MikeWilliamson That is interesting. There is also a similar question here on super user. But the answer simply states it is a hardware problem. I'm more interested in how and why this happens. Thanks for sharing. :)

– puqeko – 2016-02-02T05:08:28.343

Answers

1

Because @Puqeko showed more interest in my comment. I thought I would provide more information. This is not an answer, I'm afraid, but it will provide a bit more information on the error I experienced, which I think is the same:


"Initial" drive state:

I found a thumb drive in my house. It was fairly old; I checked its contents, and found it empty. However, I also found this on the Mac's "info" (Command-I in Finder) and "Disk Utility":

Mac's Info from Finder:

Mac's Info from Finder

Disk Utility:

Disk Utility Details

As you'll note in both cases (using either method), there is a capacity of only 129 MB, but an available of 704 MB. Disk Utility will even claim that I am using "-575 MB".

The truth is that it was empty, I used Disc Utility to erase it all, actually.


I re-erased the drive using Disk Utility, this time with the "slow & secure" erase. No difference, it all looked the same. Aside from the screen shots above, I also looked at the drive using df -h.

Linux df command from Terminal

Via linux, the drive is still showing only 129 MB capacity, but more importantly, it does not have any of the -575 MB used, and it does not show the 704 MB remaining. So things look normal in the command line.


After adding a file:

I then tried to put some files that were larger than 129 MB onto the drive, no luck. So, it seems, the drive really is only 129 MB. I then put a smaller file on the drive (~ 103 MB), and both Finder & Disk Utility looked as expected:

Finder:

Finder info, after adding a file

Disk Utility:

Disk Utility, after adding a file


Summary

I here replicated the problem the OP had, showed that - in my case - the negative space was false, and showed that I could get things to "look normal" simply after changing its state, in this case, by adding a file.

Not much help, but at least it gave a means to reproduce, and another example.

Mike Williamson

Posted 2016-01-31T21:39:41.370

Reputation: 152

1This does seem to replicate the issue. However, I tried coping ~1GB worth of files across after reading the above. It now says -813MB used, 19.52GB available??? The USB drive I have was also supposed to be empty in the question. However, it is relatively new (2 months old). Interesting how Mac's "info" displays -- yet disk utility displays -575.4 (this is also true on my machine). I still cannot find anywhere on the net that can explain this behaviour. Thanks for adding your info. Much appreciated. – puqeko – 2016-02-03T21:44:27.277

You're welcome! We'll see if anyone with further details can chime in with real answers... ;-p – Mike Williamson – 2016-02-04T21:09:18.563