Raspberry Pi SD Card Corruption

Discussion in 'SBC, ARM, Home Automation' started by HalfEatenPie, Apr 24, 2016.

  1. HalfEatenPie

    HalfEatenPie The Irrational One Retired Staff

    2,890
    1,385
    Mar 25, 2013
    HalfEatenPie
    Howdy guys,


    So this has been a consistent problem for me and I'm wondering if anyone else has any idea behind what this issue could be.  


    After installing Debian on the SD card with my Raspberry Pi, after an extended use the SD card has an IO error (corrupted data).  This has happened multiple times ever since I had my Raspberry Pi B+.  Anyone else have similar issues?  Anyone found out what the solution is?  Raspberry Pi's forums all suggest the same things, power supply, power source, bad quality SD card, etc.  However everything is genuine and within specs and I can guarantee are within proper specs.  Anyone have any other ideas?


    Thanks!
     
  2. wlanboy

    wlanboy Content Contributer

    2,125
    1,169
    May 16, 2013
    HalfEatenPie likes this.
  3. HalfEatenPie

    HalfEatenPie The Irrational One Retired Staff

    2,890
    1,385
    Mar 25, 2013
    HalfEatenPie
    Yep!  It's all within spec.  That's what I figured when I first started out so I've been changing the power adapter out and making sure it outputted 1.5A. 
     
  4. TheLinuxBug

    TheLinuxBug New Member

    402
    356
    May 15, 2013
    Yeah, but here is the thing, depending on the quality of your USB cable and adapter you can run into issues where the cables (especially cheap ones) don't keep correct voltage.  This will usually happen when the RPi is under load and the cord begins to get hot from using high voltage and this causes a bit of stretch in the wire and a drop in voltage.  Many suggest for long term usage under good load you get a 20 AWG cable or power the Pi from the GPIO pins.    Long story short, it sounds like the cable you are using for power or the adapter dips and causes under voltage at some point and causes it to lock up and corrupt your card.  You may also be able to turn down your settings in config.txt to make it less power hungry, this might also help with stability over time.


    my 2 cents.


    Cheers!
     
    HalfEatenPie likes this.
  5. rds100

    rds100 New Member Verified Provider

    733
    300
    May 18, 2013
    Better don't do this. The PCB traces leading to the GPIO 5V pins are very tiny, at least on the original Raspberry Pi. It is not designed to carry the full current that the Raspberry Pi draws. If you try to power the Raspberry Pi through the GPIO pin, this PCB trace will heat and eventually burn.
     
    Last edited by a moderator: Apr 26, 2016
  6. TheLinuxBug

    TheLinuxBug New Member

    402
    356
    May 15, 2013
    I hang out in #linux-sunxi on Freenode and my discussions with the guys there lead me to believe it would not cause any issues to power it from the GPIO. In fact, for many boards it is suggested because the MicroUSB is only rated for 1.8A, so you will get better cleaner power draw by using a DC port if available (like on A10, Odroid products) or using GPIO pins made available for this use, especially if powering external devices through USB.  I power my BananaPi that I use for my NAS for example directly through the GPIO pins on the board from an ATX power supply and it works great, never had an issue.


    You can actually review logs of chats in that IRC channel if you like: http://irclog.whitequark.org/linux-sunxi I have found there is a plethora of good answers to be found doing so.


    Edit:  I also don't think it gets talked about enough either so wanted to leave this here https://linux-sunxi.org is the group responsible for keeping track of, and spending countless hours of their time to make some of these boards work as well as they do.  If you are an enthusiast and have any question about what Allwinner products are supported, this is the place to go.  


    my 2 cents.


    Cheers!
     
    Last edited by a moderator: Apr 26, 2016
    drmike likes this.
  7. rds100

    rds100 New Member Verified Provider

    733
    300
    May 18, 2013
    Just ask @William how many Raspberry Pis (v1) he burned by powering them from the GPIO port :)


    On the Raspberry Pi "servers" we used to offer we use neither the Micro USB connector nor the GPIO pins for powering, we directly solder power wires to the board.
     
    Last edited by a moderator: Apr 26, 2016
    drmike and TheLinuxBug like this.
  8. TheLinuxBug

    TheLinuxBug New Member

    402
    356
    May 15, 2013
    FYI I have one of those RPi's ;p
    (was going to paste my awesome uptime, then just realize it was rebooted two days ago... shows how much attention I pay..)


    Thanks for the good service and the info!


    Cheers!
     
    Last edited by a moderator: Apr 26, 2016
    rds100 likes this.
  9. drmike

    drmike 100% Tier-1 Gogent

    8,573
    2,709
    May 13, 2013
    Which?

    • power adapter brand/model
    • SD card make / model

    As with all SD card based cheap systems seems to be limited adapters and SD cards worth using.


    Does your SD card fail to work during normal operations?  Like OS going and all and suddenly the file system goes loco, everything fails?  I get this issue with my Odroid.  Been too busy / lazy and it's too vital to mess up (main gateway machine).  Had same problem with Raspberry Pi original B... I recall that was remedied by playing random SD card change.  I now try to buy cards listed by others as reliable with whatever ARM gear I am using then.
     
  10. HalfEatenPie

    HalfEatenPie The Irrational One Retired Staff

    2,890
    1,385
    Mar 25, 2013
    HalfEatenPie
    I'll get the specific information later, but it's the official Samsung brand phone charging power cable (came with the phone).  The SD card is I believe Sandisk UHS Class 1 (equivalent to Class 10).  
     
  11. drmike

    drmike 100% Tier-1 Gogent

    8,573
    2,709
    May 13, 2013
    *seems* like decent equipment.


    But I'll look at them.  Both pieces are weak link with the ARM stuff.


    I've taken to powering things with a 60 watt USB power device with like 6 USB plugs $15 USD~.   Haven't had any issues since.  Anker (sp?) I believe sells similar badged versions.  Running lots of power fussy stuff (prior experience) without any issue via this.
     
  12. HalfEatenPie

    HalfEatenPie The Irrational One Retired Staff

    2,890
    1,385
    Mar 25, 2013
    HalfEatenPie
    Huh alrighty yeah I'll see if I can get the proper information later today since I wasn't able to make it home last night (work related).  Honestly, it's not that big of an issue since right now I switched it out for the gutted remains of my old netbook (AMD C-60 yall!).  A bit more power but should be able to handle a bit more of what I need.