daf
Posts: 2
Joined: Thu Sep 17, 2015 11:47 pm

SD Card "losing" capacity (Not the usual problem)

Fri Sep 18, 2015 12:10 am

So there are many posts online about the issue where you have a R Pi image on a card and you plug it into a windows machine and it only shows the card has 105MB capacity on it. Let me just say upfront that this is NOT what my issue is.

I took a new 8GB SD card and used "dd" to load this image on it:

https://github.com/ethereum/wiki/wiki/R ... structions

When unzipped, the img file is 7.5GB. The image went onto the new card fine. After playing around with this installation for a while, messing it all up and learning a lot. I now want to reload this image on the card and start afresh. I used "fdisk" to clear all the partitions and when I went to use "dd" to write the image on the card, I now only have 7.4 GB on the card and I get the error that "dd" ran out of room. I've used fdisk, gparted and diskpart (on a Win7 machine) and nothing will get me my 100MB back.

Does anyone know what's going on? Is there a fix? Is there any way to put an SD card back to the factory state? (raw or whatever it's called)

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: SD Card "losing" capacity (Not the usual problem)

Fri Sep 18, 2015 8:27 am

daf wrote:So there are many posts online about the issue where you have a R Pi image on a card and you plug it into a windows machine and it only shows the card has 105MB capacity on it. Let me just say upfront that this is NOT what my issue is.
Hi and welcome to the forum.
Just to note that is NOT an 'issue' - that is expected due to the partitioning of the SD card.
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: SD Card "losing" capacity (Not the usual problem)

Fri Sep 18, 2015 9:26 am

Try the official formatter of the SD Card association. Do not forget to set "FORMAT SIZE ADJUSTMENT" to ON in the advanced/extra settings.

After formatting , try dd again.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: SD Card "losing" capacity (Not the usual problem)

Fri Sep 18, 2015 9:48 am

daf wrote: I went to use "dd" to write the image on the card, I now only have 7.4 GB on the card and I get the error that "dd" ran out of room.
I wonder whether you might have tried to use dd to write the image into the existing partition on the card (which as you say will not be big enough) rather than to the raw card, in which case it will be able to use the physical capacity of the card.

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: SD Card "losing" capacity (Not the usual problem)

Fri Sep 18, 2015 9:50 am

you may find over time that the size drops as the ware leveling takes out some blocks on the SDcard -
so if it is used a lot for write lots of files its capacity will drop
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: SD Card "losing" capacity (Not the usual problem)

Fri Sep 18, 2015 1:20 pm

Can you post your dd command?

It needs to write to the device pertaining to the whole SD card, not a partition device.
Unix engineer since 1989

User avatar
jojopi
Posts: 3268
Joined: Tue Oct 11, 2011 8:38 pm

Re: SD Card "losing" capacity (Not the usual problem)

Fri Sep 18, 2015 2:08 pm

RaTTuS wrote:you may find over time that the size drops as the ware leveling takes out some blocks on the SDcard -
so if it is used a lot for write lots of files its capacity will drop
I do not believe that that should happen. A block device that becomes smaller over time is simply broken and cannot be partitioned or formatted safely.

Is OP sure that the image is being written to the same card as originally used? It is normal for the capacity to vary slightly between makes and models, and even batches. Also, is it possible that the dd truncated the first time as well, but the error was not noticed and the card booted anyway?

The Arch image referred to appears to be 7600MiB, which is 7.2% less than 8GiB, or 0.38% less than 8GB. That would only fit about half of the "8GB" cards I have at hand. To be conservative I would recommend 925MiB per nominal GB, so 7400MiB to fit an "8GB" card.

eyallsha
Posts: 7
Joined: Sat Sep 12, 2015 8:43 am

Re: SD Card "losing" capacity (Not the usual problem)

Sun Sep 20, 2015 8:15 pm

Had the same issue with a brand new 8GB sandisk card

User avatar
jojopi
Posts: 3268
Joined: Tue Oct 11, 2011 8:38 pm

Re: SD Card "losing" capacity (Not the usual problem)

Sun Sep 20, 2015 8:27 pm

eyallsha wrote:Had the same issue with a brand new 8GB sandisk card
The issue that an image did not fit, or the issue that it fit originally but did not fit again later, or the non-issue that Windows only recognised the smallest partition after the image was written to the card?

Return to “Troubleshooting”