Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to the Power Users community on Codidact!

Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.

Why can't I change any data on this micro SD card or format it?

+7
−0

I have an old microSD card that I'm trying to wipe. I've backed up all the files to somewhere else, and now I'm trying to clear the card.

However, I can't seem to change anything on the card.

When I plug it into my computer, I can move around files and delete them normally — or, you'd think so, at first glance. The changes last as long as I have the card plugged in, but as soon as I eject it and check it again, all the changes I've made have reverted themselves.

This started happening while I was sorting files on the card; at some point, the changes just stopped applying after I ejected the card. The files were moving and being saved in their new spots, and then all of a sudden writing to the card stopped taking.

When trying to delete the files, I also noticed something else odd happening. I'm pretty sure I don't have 1.8 billion files on the card:

Trashing 10 files: 3 / 10 - 1 minute left (1879084368 files/sec)

Checking the properties of the card, there are 6,116 files on the card.

Contents: 6,116 items, totalling 15.4GB

Since just deleting the files from the file manager system didn't seem to be working, I went to try to format the disk. I selected "wipe", and it warned me that it would delete all data on the disk:

Warning: all data on the volume will be lost. Confirm the details of the current volume before proceeding. Device: Partition 1 of 32 GB Drive - Mass Storage Device. Volume: vfat. Used: 24 GB (73.9%). Location: /dev/sda1

Interestingly, here it says the card is using 24 GB, whereas when I checked the properties in the file manager it said 15.4 GB was used.

And, then, when I confirm that I want to wipe it, I run into an error:

Error formatting disk | Error wiping device: Failed to probe the device '/dev/sda' (udisks-error-quark, 0)

What is going on with this SD card? Why can I read data from it, but not be able to delete files or format the card? (I've confirmed that the card does not have a physical lock.) What does the "Failed to probe the device '/dev/sda' (udisks-error-quark, 0)" error mean?

I'm running Ubuntu 22.04.2, and I'm using an SD-to-USB adapter since my computer doesn't have an SD card (or micro SD card) slot. I've confirmed that I can write to other cards with the same adapter.

The SD card in question is a generic "Mixza" microSD card.

How can I wipe this card, short of physically destroying it?

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

dd (1 comment)

1 answer

+6
−0

When the controller of a flash medium detects a problem it often goes read only. This is a defence mechanism so that it preserves your data and prevents any further deterioration in the flash by further writes. For example, the controller may have decided the flash has reached the end of its write lifetime and the flash can no longer be relied upon to store data correctly, so it prevents further writing.

In this situation the devices appears to be accessible as normal, but any writes are ignored. This can cause filesystems to become confused, since the filesystem thinks a write has succeeded but in fact the data is unchanged. Depending on how data is cached, the filesystem may have either the old data (which is on the medium) or an updated version in cache, which will be replaced by the old data when it is evicted from cache. This can be the source of strange behaviour and sometimes machine freezes.

If the card goes this way, it's life is over. The thing to do is copy the files off it onto new media while you can. Then you can only throw the card away - if the data is sensitive, physically destroy it (cut it up) first.

History
Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

Welcome to powerusers! (1 comment)

Sign up to answer this question »