LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-25-2011, 10:57 AM   #1
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware
Posts: 299

Rep: Reputation: 50
wrong size reported on usb stick (8MB)


Today, someone who had problems with his usb flash drive
showed it to me.
I plugged it in my linux box.
When the command
Code:
cat /proc/partitions
only showed
Code:
...
... sdb
and no partition name (sdb1, etc.). So I ran fdisk on it
I deleted all the partitions (4 in all) and recreated
a single partition taking up the whole drive and marked
it as c (win32 vfat)
I exited fdisk (w) and formatted the new partition
Code:
mkdosfs -F 32 /dev/sdb1
Then
Code:
mount /mnt/sdb1
df -h /mnt/sdb1
This displayed '8MB'
I don't know the real size of the stick but it should
be at least 4GB I think
Does anybody have a clue on what's happening there?
 
Old 05-25-2011, 11:09 AM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, Ubuntu, SLES, CentOS
Posts: 1,790

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
@ Reply

Hi there,

Lets try the following:

1. fdisk /dev/sdb
2. Delete all the partitions it is showing up there.
3. Create a new partition and let the start and end of the cylinder to be default (whatever it prompt)
4. Write it to partition table.
5. mkfs.ext3 /dev/sdb1
6. mkdir /mnt/usb
7. mount /dev/sdb1 /mnt/usb
8. df -h (and let us know the output)
 
Old 05-25-2011, 11:13 AM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
Also, the output of fdisk -l /dev/sdb could help.
 
Old 05-26-2011, 08:42 AM   #4
peter1234
Member
 
Registered: Apr 2009
Posts: 42

Rep: Reputation: 2
This might help in finding the problem ......

-What is the brand name of usb flash drive and is it genuine? Because there are counterfeit usb flash
drive that will say 8Gb when in fact the actual capacity is very little. The counterfeiters change some
config on the flash drive, so when plugged in the OS will report the advertised amount, but when you are saving data it will take
unusually long time to save and you will not be able to save close to advertised amount or you will get a read/write errors.

-Lastly is the usb flash drive over the hill? Flash drive memory cells have a certain read/write cycle lifespan after which the cell become
unusable, so if this flash drive have gone through lot of read/write cycles then then it is on it's way out.

-If above is not applicable and what others said did not help, try repartition in a win PC and format
and see .........



.
 
Old 05-27-2011, 06:54 AM   #5
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware
Posts: 299

Original Poster
Rep: Reputation: 50
I ran gparted, selected the device (/dev/sdb)
deleted the single partition I previously created with fdisk
Here's what gparted reports

Code:
Partition    File System    Size       Used    Unused    Flags
unallocated    unallocated  8.00 MiB   ---     ---
I didn't write the changes.
I ran fdisk to delete the partition:
Code:
fdisk /dev/sda
d
Selected partition 1
p

Disk /dev/sdb: 8 MB, 8388608 bytes
1 heads, 16 sectors/track, 1024 cylinders, total 16384 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc4530a7f

  Device Boot   Start     End Blocks   Id System
The first time I created a single partition of type c (vfat 32)
and formatted it with 'mkfsdos -F 32'
The second time I recreated a single partition of linux type
and formatted it (ext3). df reported
Code:
Filesystem    Size   Used   Avail   Use%    Mounted on
/dev/sdb1     6.8M   1.1M    5.4M    17%    /mnt/usb
Quote:
-What is the brand name of usb flash drive and is it genuine? Because there are counterfeit usb flash
drive that will say 8Gb when in fact the actual capacity is very little. The counterfeiters change some
config on the flash drive, so when plugged in the OS will report the advertised amount, but when you are saving data it will take
unusually long time to save and you will not be able to save close to advertised amount or you will get a read/write errors.
Brand:
It's pretty worn out but it looks like something like
PNY is written on it.
As for the capacity, even if the manufacturer boasts 8G it should
be at least 1GB. As far as now the smallest capactiy is 128MB

Quote:
-Lastly is the usb flash drive over the hill? Flash drive memory cells have a certain read/write cycle lifespan after which the cell become
unusable, so if this flash drive have gone through lot of read/write cycles then then it is on it's way out.
Possibly, but then why does it display 8MB instead of nothing at all?
 
Old 05-27-2011, 09:47 AM   #6
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware
Posts: 299

Original Poster
Rep: Reputation: 50
Another strange thing.
I formatted the flash drive in vfat.
I inserted it on a Windows XP system. The Property dialog
displayed this info
used space: 7209984 bytes
6.87 MB

available space: 0 bytes

And yet the disk is empty.
Next I inserted it in a linux box and copied a file
on it. I reinserted the stick in the XP machine and
my file was there (it's a simple text file of about 1140 bytes).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB memory stick has doubled in size - why? mikemrh9 Linux - General 8 11-25-2010 07:33 AM
Drive Size Reported Wrong After Re-size Phiberoptic Linux - General 2 12-05-2007 05:15 PM
Wrong HDD size reported in Fedora Core 7 oxylus Linux - Software 5 06-28-2007 05:35 PM
memory size reported wrong 2.6.12.2/slack 10.2 urbanwks Linux - Hardware 4 12-18-2005 09:44 AM
USB external Disk reports wrong size alans Linux - Hardware 1 03-17-2005 08:57 AM


All times are GMT -5. The time now is 04:51 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration