LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Really weird issue with new SD cards (https://www.linuxquestions.org/questions/linux-hardware-18/really-weird-issue-with-new-sd-cards-4175736185/)

Red Squirrel 04-18-2024 10:35 AM

Really weird issue with new SD cards
 
This is not exactly a Linux issue, as Windows can't even detect these cards at all... but hoping someone has any ideas, this is a really strange one.


So someone asked me to copy a bunch of data to a SD card, don't know why they want that, but that's what they want. Not a USB stick, not a portable hard drive, but SD card.

So I ordered 2 256GB cards. They're Kingston Canvas! Go Plus. Start copying data then start to get massive IO errors and it eventually fails. Tried another identical card, same thing. I returned both cards as defective, got 2 new ones, and I had a hunch it was something oddball with that model so got a different more expensive one, a Sandisk Extreme Pro 256GB.

Get same thing happen with all of those too. Start copying data then after a while it just starts generating tons of IO errors in dmesg.

As a test, I took the SD card out of my camera and did the same copy. That one works flawlessly. It's too small though to copy everything I need, otherwise I'd just give them that one and keep the others.

The other thing that's weird, is the cards that get IO errors (5 so far) all work fine in cameras. I set my camcorder on record for over an hour and it never failed, and I was also able to pull the footage off with no errors, but I tried to copy the footage back and get errors. It's like these particular cards don't like having data written to them unless it's by a camera, which I don't understand because it's just a storage device, it shouldn't matter.

To rule out any file system related issues I even tried low level tools like dd and that eventually also fails. Fdisk also fails, when I write it just gets stuck at "the partition table has been altered". Basically no matter what I try to do to these new cards it basically either fails with IO errors or just flat out locks up.

So what is going on, why would some cards give IO errors and some not? To rule out my PC I tried my Windows machine too, but it won't even read the ones that are failing at all, but it reads my camera ones fine. Also these cards that are failing work fine in my cameras and I can retrive the pictures/video fine too on my PC, just not write to them. I'm at a loss here, what would be causing this?

rokytnji 04-18-2024 10:48 AM

I have usb to sd card adapters for troublesome cards. Have not failed me yet.

Red Squirrel 04-18-2024 10:49 AM

That's what I'm using, I'm not sure of any other way. Since it works fine in the camera I also tried to put it in the camera then plug the USB cable from the camera but it doesn't show up as a mass storage device, it shows up more a special camera device. I see files but can't write, or mount it normally to a normal directory so can't use command line tools either.

michaelk 04-18-2024 10:55 AM

It may be your card reader is at fault and that it just can not write to large capacity cards.
How old is it?
Is it builtin to the computer or separate USB device?
What size cards do you typically use for your camera?

Red Squirrel 04-18-2024 11:01 AM

It's just a small adapter type reader. Insignia brand. shows up as:

Code:

Genesys Logic, Inc. GL827L SD/MMC/MS Flash Card Reader
The camera cards are smaller, biggest one I have is 32GB. These ones are 256GB. Is there some sort of limitation on that?

michaelk 04-18-2024 11:15 AM

Possibly, this was common with early card readers and there are a few threads here if you can still find them. If I remember it was at the 8GB point. Your reader may only be able to write to <=32GB cards i.e. SDHC versus SDXC

Red Squirrel 04-18-2024 12:05 PM

I dug deeper, and looks like it may very well be the issue.

I found a datasheet for what I presume is the chip used in the reader (got info from lsusb) and there is in fact a 32GB limit but also a 2TB one... Guess it depends what the card is. The one I'm using does say SDXC on it so it should fall under the 2TB limit I would think... but maybe it's somehow registering as SDHC?

Code:

Genesys Logic, Inc. GL827L SD/MMC/MS Flash Card Reader
https://datasheetspdf.com/pdf-down/G...nesysLogic.pdf

Quote:

Secure DigitalTM and MultiMediaCardTM
- Supports SD specification v1.0 / v1.1 / v2.0/ SDHC (Up to 32GB)
- Compatible with SDXC (Up to 2TB)
- Supports MMC specification v3.X / v4.0 / v4.1 / v4.2.
- x1 / x4 / x8 data transmission. (For QFN24 up to x4)
- Automatic CRC7 generation for command and CRC7 verification for response on CMD
- Support automatic CRC16 generation and verification on DAT0:7
- In addition to full packet transaction, optional single byte / bit operation on both CMD and DAT line /
lines
- Process data in block or byte



So guess that's my problem, I need to get another reader. I did not figure modern chips had such low limits, I though we were into the TB range when it came to that.

lvm_ 04-18-2024 12:15 PM

There are four SD card types described here: https://en.wikipedia.org/wiki/SD_card#Comparison, they are not downward compatible. Your reader supports only SDHC and so cannot read SDXC and UC cards. 32G for it is the limit.

Red Squirrel 04-18-2024 12:59 PM

Wonder what the difference between "supports" and "compatible" in this case, because it does say compatible with SDXC. But it also has a 12Mhz clock, so would that even be enough for the 170MB/sec speed of the newer cards? Either way think I'll just buy another reader and see if the problem goes away.

friendlysalmon8827 04-19-2024 12:05 AM

I'd really recommend that anyone in the market for both SD cards and the readers that are needed to format and or extract data off of said cards. My chief recommendation is to stick to the well know brands like Samsung,San-disk,Patriot, Kingston and a few which I can't pull off of the top of my head at the current point in time.

beachboy2 04-19-2024 02:43 AM

Red Squirrel,

You may also find a used/new SanDisk Image Mate 12 in 1 Memory Card Reader on ebay etc, such as this one:
https://www.ebay.co.uk/itm/235451973...Bk9SR5r_0NTeYw

I have had mine from new and it always performs reliably with a whole range of SD cards.

Red Squirrel 04-19-2024 08:11 AM

I ended up ordering 3 different readers from Amazon so hopefully one of them will work. Or at least, it will rule out the reader being the problem.

Red Squirrel 04-21-2024 07:44 PM

Ok so just to confirm it was in fact the reader,

The Anker one from Amazon was able to write to these no problem. The good news now is I guess I have 2 256GB SD cards now to add to my collection of much smaller ones, as I kept buying more thinking they were defective until I realized something must have been up, and it was the reader not supporting larger cards. Never figured there was a limitation.


All times are GMT -5. The time now is 11:57 AM.