[sf-lug] Trying to determine the actual size of a USB drive

Jeff Bragg jackofnotrades at gmail.com
Mon Aug 29 20:32:30 PDT 2011


On Mon, Aug 29, 2011 at 8:06 PM, John Magolske <b79net at gmail.com> wrote:

> I have an OCZ USB 8GB Dual Channel Rally2 Pen Drive, and for some
> reason df seems to be telling me it has more than 8GB capacity:
>
>     ~ % df -h
>    Filesystem            Size  Used Avail Use% Mounted on
>    [...]
>    /dev/sdb1              15G  7.3G  6.7G  53% /media
>
> I'd like to determine with certainty whether this is an 8GB or 16GB
> drive. Someone suggested copying a file larger than 8GB to the drive
> and comparing the copied file to the original...maybe with CMP(1) or
> using checksums. I'm wondering if there might be another way, as I'd
> rather not erase everything currently on the drive. I'd also like to
> avoid adding more write cycles to its flash storage chip.
>


I've never worked with dual-channel USB, so I might be off-base here, but
I'm wondering if it's confusing the USB driver.  If dmesg doesn't yield
anything enlightening, there's a way to indirectly test the drive's capacity
(sort of).  Rather than trying to fill up the drive, you could copy what's
on it off into a directory on the same host, then find out how big the host
believes that is.  If it matches the 6.7GB expected, I would tend to assume
you have a larger drive than you believed.  If, on the other hand, it's
about half of that, I would tend to believe the dual-channel is causing
everything to be doubled, and the drive is 8GB.  The really confusing result
would be having ~6.7GB as expected, but only actually having ~1.3GB left
(which I can't think of a way to discover other than trying to copy a file
slightly bigger than that to it and see if it fails).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://linuxmafia.com/pipermail/sf-lug/attachments/20110829/7a319437/attachment.html>


More information about the sf-lug mailing list