LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 03-12-2018, 08:51 PM   #1
coralfang
Member
 
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 836
Blog Entries: 3

Rep: Reputation: 297Reputation: 297Reputation: 297
Raspberry pi, endless issues of corrupted data, any advice?


Hello. I use a raspberry pi as a small server on my home network.

I primarily use it for testing out socket based client/server programming ideas. Along with its use for running weechat under tmux (acts as a 24/7 irc bouncer), and i also run nginx/php/mariadb for some hobbyist web development.

Now, this all works once i set it up, regardless of whether i've decided to run slackware, freebsd, or any other *nix type OS on the device.

My problem is, that once in a while, i experience a power surge or even a power cut at home which forces the device to lose power. I haven't had a raspberry pi computer running form more than 6 months because of this. Other times, the device might become unresponsive for whatever reason, meaning i have to pull the plug to reboot it.

Each time this happens, the entire raspberry pi installation becomes corrupt beyond repair, and means having to start over from scratch again at setting it all up. This becomes very tedious due to the slow speeds at disk writes, and hell for compiling anything.

Why is this such a problem? Is this because of the microsd disk? Why does it seem so fragile, that the device becomes completely corrupted so easily?
 
Old 03-12-2018, 09:19 PM   #2
Mill J
Senior Member
 
Registered: Feb 2017
Location: @127.0.0.1
Distribution: Mint, Void, MX, Haiku, PMOS, Plasma Mobile, and many others
Posts: 1,258
Blog Entries: 2

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
What power cable/transformer/amps are you using? I solved my undervolting problem by splicing two usb cables together. This also allowed me to switch from AC to a DC battery pack without rebooting.

Perhaps you could fix up a battery pack that kicks on when the amps get to low?
 
Old 03-12-2018, 10:01 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
It's the SDcard. I run my pi's behind a small UPS, but you're better off using the SD as little as possible. Get the system onto USB if you can - they'll even boot from USB these dayss, but I haven't bothered.
 
1 members found this post helpful.
Old 03-12-2018, 11:00 PM   #4
coralfang
Member
 
Registered: Nov 2010
Location: Bristol, UK
Distribution: Slackware, FreeBSD
Posts: 836

Original Poster
Blog Entries: 3

Rep: Reputation: 297Reputation: 297Reputation: 297
Quote:
Originally Posted by Mill J View Post
What power cable/transformer/amps are you using? I solved my undervolting problem by splicing two usb cables together. This also allowed me to switch from AC to a DC battery pack without rebooting.

Perhaps you could fix up a battery pack that kicks on when the amps get to low?
Using whatever charger comes with the official raspberry pi, that's not the problem however. I mean power issues as in, random power cuts to the entire street, during a storm for example. As soon as the power goes, the pi basically corrupts everything. But it's not like this for any other storage device i have (NAS, desktop, etc).

I guess i will try setting it up next time onto a usb stick as syg00 suggested.
 
Old 03-15-2018, 07:46 AM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member response

Hi,

If you setup the Pi power supply with a UPS then any power problems should be handled by that device. I have UPS on most of my systems and never have lag or brownouts causing issues. Even when the power goes completely then you have the duration for the life of the UPS batteries to shut the Pi down safely.

Hope this helps.
Have fun & enjoy!
 
Old 03-15-2018, 08:34 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
SDcards are crap fragile - even behind a UPS they fail too regularly. If you allow things like the systemd journal on them they break. I had a class10 DOA so I couldn't even boot the thing - I keep an image of my pi3 on another system so I can reload it any time. Yesterdays tech IMHO.

Last edited by syg00; 03-15-2018 at 06:49 PM. Reason: strike
 
Old 03-17-2018, 10:44 AM   #7
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,491

Rep: Reputation: Disabled
Yep, there has been a lot of trouble using microSD cards as the sole system. Suggest you boot a USB disk if you are using a 3B, else only use the microSD card to boot a system on an external device.
 
  


Reply

Tags
corrupt, microsd, raspberry pi



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need dedicated wireless hub - considering Raspberry Pi - advice please jludeman Linux - Networking 6 02-16-2016 11:01 AM
LXer: Broken and Corrupted Raspberry Pi SD Card LXer Syndicated Linux News 0 01-09-2015 10:32 PM
How to recover data from a corrupted external HD? sagar1karuna Linux - Newbie 1 10-22-2011 10:33 AM
RAID5 data rebuilding by mdadm results in corrupted data! rtyagi Linux - Newbie 0 03-26-2008 01:59 AM
RAID1+LVM: data keeps getting corrupted Chojin Linux - Software 4 10-22-2006 09:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 10:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration