Fedora Linux Support Community & Resources Center
  #1  
Old 26th October 2007, 02:27 PM
garrett Offline
Registered User
 
Join Date: Jul 2005
Posts: 10
Unhappy SD card size is not correctly recognized using USB card reader and Fedora 7

I just bought a PNY secure digital SD card. It's supposed to be 2 GB. I have a USB card reader from Lexar. My laptop (falkor) is a thinkpad running Fedora 7 (32 bit), and it's up to date as of 9am on 10/26.

When I insert the card, I get zillions of errors in /var/log/messages like this:

Oct 26 08:56:53 falkor kernel: attempt to access beyond end of device
Oct 26 08:56:53 falkor kernel: sdd: rw=0, want=4022271, limit=2011136

and

Oct 26 08:56:52 falkor kernel: Buffer I/O error on device sdd1, logical block 40
22200

I can mount the card and put files on it, but files start getting truncated, and I get I/O errors.

The problem seems to be that the card's size is incorrectly detected. Up above those errors, I get this bunch of messages:

Oct 26 08:56:35 falkor kernel: sd 2:0:0:2: [sdd] 2011136 512-byte hardware sectors (1030 MB)
Oct 26 08:56:35 falkor kernel: sd 2:0:0:2: [sdd] Write Protect is off
Oct 26 08:56:35 falkor kernel: sd 2:0:0:2: [sdd] Assuming drive cache: write through
Oct 26 08:56:35 falkor kernel: sd 2:0:0:2: [sdd] 2011136 512-byte hardware sectors (1030 MB)
Oct 26 08:56:35 falkor kernel: sd 2:0:0:2: [sdd] Write Protect is off
Oct 26 08:56:35 falkor kernel: sd 2:0:0:2: [sdd] Assuming drive cache: write through
Oct 26 08:56:35 falkor kernel: sdd: sdd1
Oct 26 08:56:35 falkor kernel: sdd: p1 exceeds device capacity

So it seems to be seeing only the first half of the card for some reason. The 2011136 isn't all the sectors that are supposed to be there.

I tried this on my laptop:

sdparm --command=capacity /dev/sdd

and it finds:

/dev/sdd: Lexar Media Inc. SD/MS 009E
blocks: 2011136
block_length: 512
capacity_mib: 982.0

If I put the same SD card into the card reader built into my workstation (grograman), which runs Fedora 6 (64 bit), the size of 4022272 sectors is correctly detected in /var/log/messages:

Oct 25 09:30:36 grograman kernel: sd 1:0:0:3: [sdf] 4022272 512-byte hardware sectors (2059 MB)
Oct 25 09:30:36 grograman kernel: sd 1:0:0:3: [sdf] Write Protect is off
Oct 25 09:30:36 grograman kernel: sd 1:0:0:3: [sdf] Assuming drive cache: write through
Oct 25 09:30:36 grograman kernel: sdf: sdf1
Oct 25 09:30:38 grograman kernel: sd 1:0:0:3: [sdf] 4022272 512-byte hardware sectors (2059 MB)
Oct 25 09:30:38 grograman kernel: sd 1:0:0:3: [sdf] Write Protect is off
Oct 25 09:30:38 grograman kernel: sd 1:0:0:3: [sdf] Assuming drive cache: write through
Oct 25 09:30:38 grograman kernel: sdf: sdf1
Oct 25 09:30:42 grograman hald: mounted /dev/sdf1 on behalf of uid 500
Oct 25 09:31:27 grograman hald: mounted /dev/sdf1 on behalf of uid 500

and the card seems to work just fine on my workstation.

I'm pretty sure this is not a problem with the SD card. I took it back and got a new one, and the same problem occurs. This card works properly in my workstation, in my palm TX, and in my laptop under Windows XP. The card reader works fine in my laptop under linux when I put in a 16 MB SD card by Cannon, and a 1 GB SD card by San Disk. And the 2 GB card works on my laptop under linux if I repartition it to have only about a 1 GB partition.

I suppose that it might be a problem with the USB card reader that somehow doesn't bother windows. I'll test the reader on my workstation later.

But it might be a problem somewhere in SCSI land or USB land in linux. Has anyone seen this problem? Any suggestions?
Reply With Quote
  #2  
Old 26th October 2007, 04:51 PM
RJFUatHOME Offline
Registered User
 
Join Date: Aug 2007
Location: Fairfield, CA
Posts: 438
Do other SD cards work fine in the same card reader? Maybe it's a rare hardware failure problem with that one reader slot?
Reply With Quote
  #3  
Old 26th October 2007, 05:01 PM
garrett Offline
Registered User
 
Join Date: Jul 2005
Posts: 10
I tried the card reader in my workstation -- It would seem that the problem is indeed the card reader. I can put the same card in my workstation's built-in reader and all 2 GB are visible, but the USB reader from Lexar only show 1 GB. *shrug* I don't understand why it works in windows.

Thanks for the suggestions,
-g
Reply With Quote
  #4  
Old 26th October 2007, 07:38 PM
garrett Offline
Registered User
 
Join Date: Jul 2005
Posts: 10
Well, I guess it might still be a linux problem: There might be some tiny glitch in how USB card readers work. I'll try to find another reader and see.

The card reader I have has worked fine with my CF card and with a couple of other smaller SD cards. There's something about the 2 GB capacity.
Reply With Quote
  #5  
Old 27th October 2007, 02:00 AM
duni
Guest
 
Posts: n/a
I have a similar problem with a cheap card reader and 2GB SD card. However I see the whole 2GB partition, but when I start to write on it I get I/O errors. Reading is fine. I have 2x2GB cards and 2 card readers. They both behave the same way.
And as you say in windows everything works fine. On my laptop, which has only USB 1.1, writing fails only some times. I suppose there is still some lack on support for all (including the cheap) cardreaders. I have to buy me a better one, because I use it a lot, and copying over USB 1.1 with falure from time to time isn't a solution.
If someone knows how to trace some specific bug in the messages in order to report it, don't hesitate to replay
Reply With Quote
  #6  
Old 27th October 2007, 05:11 PM
RJFUatHOME Offline
Registered User
 
Join Date: Aug 2007
Location: Fairfield, CA
Posts: 438
I guess I've just been lucky. I have various SD card sizes including SDHC cards and various readers from the one built into my HP, one in my HP AIO printer/scanner and various usb adapters. All my cards read and write fine in all of them, with the exception of SDHC cards that require a USB adapter.

The only time I saw weird behavior on my cards was when I was pulling them out of the drive in Fedora without right clicking first and choosing unmount. I did that once and the card got messed up. A reformat on a windows box fixed it right up though and I haven't seen any errors since. Make sure you unmount SD cards before pulling them from readers or slots.

In Windows you can just pull the card without issues but in Linux you have to unmount them first.

If they start acting weird in linux, reformat them to make sure they are OK.
Reply With Quote
  #7  
Old 27th October 2007, 10:53 PM
garrett Offline
Registered User
 
Join Date: Jul 2005
Posts: 10
I just bought a Dynex 5-in-1 reader, and my 2 GB seems to be working fine in this one. I see the full capacity of the card with no error messages. So I guess it was a problem with the Lexar reader all along. *sigh*
Reply With Quote
Reply

Tags
card, correctly, fedora, reader, recognized, size, usb

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Card Reader in Fedora 9 Trevor4706 Hardware & Laptops 2 3rd September 2008 01:03 PM
displaying detected USB devices like an SD card reader and card KB1LQC Hardware & Laptops 1 27th June 2008 07:01 AM
Card reader GemPlus and memory card sle4442 problem zah Hardware & Laptops 1 11th November 2007 08:49 AM
ipw2100 wireless card occasionally recognized as b44 ethernet card Figment Servers & Networking 3 29th January 2007 10:27 PM
Flash card reader recognized as camera uth Hardware & Laptops 0 16th July 2006 03:33 AM


Current GMT-time: 02:06 (Monday, 20-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat