Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
SDCard corruption on RPI2 #397
Comments
|
@ghollingworth does have a Samsung EVO sdcard that he can provoke into corrupting data. For now, Transcend and Samsung EVO cards are best avoided. Other cards don't seem to suffer in the same way. |
NitroG42
commented
Mar 19, 2015
|
Holy **** that was a freaking fast answer. |
lurch
referenced this issue
in raspberrypi/noobs
Mar 19, 2015
Open
Install fails on some SD cards with RPi2 #230
lurch
commented
Mar 19, 2015
|
Duplicate of #372 ? |
ghollingworth
commented
Apr 2, 2015
|
If your failure is 100% reproducible then it would be interesting to see, currently I'm having trouble reproducing the problem (only seen it twice in the last week) and it makes it very difficult to understand what's going wrong Gordon |
NitroG42
commented
Apr 2, 2015
|
In my first post, I explain how to reproduce it on my card. Basically, after a fresh install of Raspbian, I create a file ( sudo touch /forcefsck ) to run fsck on next boot, I reboot and then lots of errors are found (and it crashes in a very beautiful way). |
ghollingworth
commented
Apr 2, 2015
|
My question is: is it 100% reproducible? Does it happen without fail every time you boot in this way? |
NitroG42
commented
Apr 2, 2015
|
Well I tried 3 or 4 times in row (with a fresh install each time) at the time I created the issue. |
CyrussM
commented
Apr 3, 2015
|
Hi,(and sry bad english) ;) |
johalareewi
commented
Apr 10, 2015
|
I have RPi2 and Openelec and got similar problem with Kingston 32GB class 10. *** Error in mount_storage: mount_common: could not mount /dev/mmcblk0p2 *** Starting debugging shell... type exit to quitsh: can't access tty; job control turned off Now using a different card. |
ghollingworth
commented
Apr 11, 2015
|
Are you using NOOBS to install the software or an image? Are you updating the image before rebooting? Gordon On 10/04/2015 15:08, "johalareewi" notifications@github.com wrote:
|
johalareewi
commented
Apr 12, 2015
|
Using an image. Openelec image (for RPi2) from http://openelec.tv/get-openelec |
ghollingworth
commented
Apr 13, 2015
|
Whats the minimal steps required to guarantee it will fail... Include versions of software and links do you actually need to install stuff or will it corrupt without this? Thanks |
moskichi
commented
Apr 13, 2015
|
The minimal steps are install official Openelec or Raspbian image on a Samsung evo 16 U-1, it doesnt matter the way you install it, and switch off the pi while writting on the sd. I saw a posible solution in other forum, but I haven´t test it yet http://openelec.tv/forum/124-raspberry-pi/75281-openelec-5-0-3-still-corrupts-sd-card-on-pi2?start=15#132032 |
|
@moskichi Switching the Pi off while writing to the sdcard is expected to cause corruption (with any memory device on any platform). Always shut down before removing power. |
|
@NitroG42
You should see: "mmc_debug:1fff" and "Forcing PIO mode" in dmesg log, and see a reduction in performance. I'd like to know if you still see corruption. |
marks5459
commented
Apr 16, 2015
|
integral ultima pro 8gb class 10 upto 20mb/s are a brilliant card hardly have any issues been using for 2 years , was out of stock one time so bought 2 different batches from different suppliers of kingston cards ,one of the suppliers was scan computers in bolton so not like they was clone cards , and had almost everyone back over 3months and 50% of them cant be recognised by any device i put them in |
Cy4n1d3
commented
Apr 17, 2015
|
I've bought a 16GB Samsung Evo MicSD when I first got my RPi2 (was still running my good old RPi1 /w normal SD) and experienced the same issues as NitroG42 and johalareewi - after a certain (few, 1 to 3 were sufficient) amount of reboots, the system wouldn't boot up any longer due to mounting errors. I was able to reproduce the issue pretty much reliably any time back then: install an image (doesn't matter if I used a fresh OE image or my 'old' backuped RPi1 image with RPi2 kernel replacing the Pi1 kernel), do the usual setup stuff like config, addon installations, reboot. I even tried manual 'sync'ing and rebooting over SSH to be safe but after one to three reboots I encountered corruption anyways. As long as the Pi stayed powered on I was able to watch movies, tv shows, youtube and amazon prime without a hitch though... problems arose after the nightly power down or the aforementioned reboots. I fixed the problem for now by buying a fresh Sandisk card which works without a sign of any flaws until today... got nearly mad at my RPi2 until I tried a 64GB Sandisk MicSD which worked flawlessly right from the first image install. At first I thought it might be power related but after testing 4 different power adapters (Nexus 10, Galaxy S5, generic 5V 2A adapter and a known brand adapter from a local electronics store) I kinda ruled that one out. If there's anything I can do to maybe help debugging this one please don't hesitate to ask. I'd gladly use the Samsung Evo for my Pi, as it shows nearly doubled 4k writes in comparison to the Sandisk while retaining good 4k reads - I'd really like to run some real world usage scenario performance comparisons on the RPi2 using those cards :) |
ernstblaauw
commented
Apr 17, 2015
|
Hi Cy4n1d3 , If I understand correctly, you can help by testing the kernel that popcornmix posted in this thread or that is posted on OpenELEC's forum: http://openelec.tv/forum/124-raspberry-pi/75281-openelec-5-0-3-still-corrupts-sd-card-on-pi2?start=210#137875 I hope to test this kernel this weekend. |
|
Yes, if anyone who is suffering corruption issues can test the kernel linked earlier, or try the OpenELEC test build, that would be very helpful. |
Cy4n1d3
commented
Apr 17, 2015
|
I'll try and see if I can still reproduce the error tomorrow. |
AlecEdworthy
commented
Apr 17, 2015
|
For what it's worth I've installed the patched version of OpenElec 5.0.8 with
Tomorrow or Sunday I'll disable the debug option and send it back through some reboots and see how many I get before corruption occurs... Thank you to everyone who is working to fix this! :) Alec |
|
If you are happy with |
AlecEdworthy
commented
Apr 17, 2015
|
Sadly I am not happy with Don't get me wrong, it could be pure luck that 17 reboots passed without issue with 0x1fff and the 18th might have killed it just the same, but 17 compared to 4 is a big difference! Since switching back to 0x1fff I have just survived a further 10 reboots without issue. Now bed beckons (early start in the morning). If there's any further testing you would like doing then let me know, not sure I'll be able to do any until Sunday now but fire away nevertheless and I'll do my best to oblige. |
ernstblaauw
commented
Apr 18, 2015
|
Hi AlecEdworthy, do you got your script to remotely reboot the RPi2 for me? That would save me a lot of time. Thanks! |
|
Okay if |
Cy4n1d3
commented
Apr 18, 2015
|
I can still confirm the corruption issues I encountered when I first tried the Samsung EVO card. Results so far:
So 1fff seems best so far, If someone is willing to share a reboot loop script I will put those modes to further testing. If you need further information or have more precise instructions please don't hesitate to ask @popcornmix ! |
|
For automatic rebooting (or running other command) with raspbian, For openelec I would suggest looking here: http://wiki.openelec.tv/index.php/Autostart.sh |
ernstblaauw
commented
Apr 18, 2015
|
Could someone provide a script that reboots the rpi2 from ssh each two
minutes? In this script, we could count the timew it reboots succesfully?
That would make the testing really easy.
|
|
@ernstblaauw Can you run the script from a linux machine (which could be another pi)? That's a little easier than from windows. |
|
I've updated the kernel links above, and the links in OpenELEC thread. New build also has another debug option. Can you try:
instead of the bcm2835_mmc.mmc_debug option and report the results. |
ernstblaauw
commented
Apr 18, 2015
|
@popcornmix, I'm running Linux Mint on my main desktop. I already tried |
hertzg
commented
Apr 19, 2015
|
@ernstblaauw I believe you could add
|
AlecEdworthy
commented
Apr 19, 2015
|
Hi, OK for those running Linux or Mac OS X and wanting to do remote reboots of their RasPi running OpenElec you can do this,
The command I actually used to do the reboot cycles was,
That is a very long line so be careful with cutting and pasting etc. Basically what it breaks down into is, Establish a variable to count the runs
To exit the loop and stop the reboot cycle you need to press CTRL-C a few times - depending on which stage it's at the first CTRL-C will only exit part of the loop so press it three or four times, it won't harm anything to press it more then is necessary. To stop the SSH key you created from being allowed to log into the RasPi you need to delete it from /storage/.ssh/authorized_keys or delete the file in its entirety. Hope that helps, Alec |
AlecEdworthy
commented
Apr 19, 2015
|
Using the latest update (which I imaged onto the card and then restored my settings from backup) and |
|
@AlecEdworthy |
AlecEdworthy
commented
Apr 19, 2015
|
Just used the same image but bcm2835_mmc.mmc_debug=0x1fff and got 13 reboots without issue. Now trying 0x1000... |
AlecEdworthy
commented
Apr 19, 2015
|
Looks like 0x1000 is fine from a corruption point of view. Just survived 13 reboots without issue. Getting around 7.2MB/sec write and 16.6MB/sec read speeds with that option FWIW. |
|
@AlecEdworthy any hangs with that setting? (@Cy4n1d3 reporting some hanging on boot, but no corruption). |
AlecEdworthy
commented
Apr 19, 2015
|
When running with
To recap,
Each time I get corruption what happens is the box reboots fine, freezes at the first page of the reboot (where it lists the OpenElec version) and sits there. If I then power it off and on again it boots to the debug console and requires extensive repairs using fsck (leading to lost settings quite frequently, I have had to restore from backup a couple of times). A |
|
There was another test bit added in last update. Try: |
AlecEdworthy
commented
Apr 19, 2015
|
Looks good, 13 reboots without issue using |
|
@AlecEdworthy that is interesting. Can you reduce dma_debug? |
AlecEdworthy
commented
Apr 19, 2015
|
@popcornmix I'll give them a try. Probably won't be until later this evening but I'll try to get some testing in today. I assume I keep |
|
Yes |
Cy4n1d3
commented
Apr 19, 2015
|
Using I've then changed the cmdline to Quick and dirty speed testing (/dev/zero, dd /w 1024 block size and 500 mb file size) revealed the following numbers on this scenario (average of three samples): Did another reboot afterwards which also succeeded. |
AlecEdworthy
commented
Apr 19, 2015
|
OK,
Where to next @popcornmix? |
|
@AlecEdworthy Thanks. For completeness running with 0x0 (or dma_debug removed) would be useful. Also, with dma_debug removed, I'd be interested in:
|
AlecEdworthy
commented
Apr 20, 2015
|
So just to confirm you want tests running with,
The dma_debug can be removed completely in both cases. Kind regards, Alec EDIT: "and" replaced with "can" in last line above. |
|
Yes |
ernstblaauw
commented
Apr 20, 2015
|
Hi popcornmix,
This weekend I tested the setting bcm2835_mmc.mmc_debug=0x1fff on a 16GB
Transcend: I did 20 reboots without issue. This is much better than the
default values (3 times I got corruption during resizing; one time it
survived the resizing and after that the RPi was able to reboot 6 times
before corruption striked). A huge improvement!
I could do some more tests, but I lost track which one are currently
needed. Could you provide an overview which settings you want us to test?
|
|
I think 0xfff doesn't help. dma_debug doesn't help. mmc_debug=0x2000 is the most promising one, which seems to help without performance issues. It does disable a fix that was added for a specific sdcard, so it can't just be enabled as a default, but it is a setting we'd like to gather as much information on as possible. mmc_debug=0xffff0000 is currently unconfirmed, but we'd like to know if it helps. So, for now, please test: |
AlecEdworthy
commented
Apr 20, 2015
|
@ernstblaauw With |
AlecEdworthy
commented
Apr 20, 2015
|
OK @popcornmix,
Is there a way to force the boot process to pause at the initial screen and give me the debug terminal instead of going through a normal boot? I ask because I would like to force an fsck of the SD card but can't from the normal OpenElec screen because I can't unmount /storage. I've tried Alec |
|
Okay, if |
AlecEdworthy
commented
Apr 20, 2015
|
Following up on my earlier post, with A |
MilhouseVH
commented
Apr 20, 2015
Add Also, |
ernstblaauw
commented
Apr 20, 2015
|
Hi, default cmdline bcm2835_mmc.mmc_debug=0x1fff
20 reboots: no crash bcm2835_mmc.mmc_debug=0x2000
20 reboots: no crash bcm2835_mmc.mmc_debug=0xffff0000 bcm2835_mmc.mmc_debug=0x7f7f0000 bcm2835_mmc.mmc_debug=0x3f3f0000
It looks quite slow (for sure it boots much slower than 0x2000). To be precise: no crash means I stopped the testing by hand and thus no corruption took place.
|
AlecEdworthy
commented
Apr 20, 2015
Do you need/want repeated reboot tests with A |
|
I'd like to find out the smallest delays that avoid the corruption. |
|
Except for an issue when using gpu_freq to overclock (core_freq is fine). A patch to solve that is currently only available via rpi-update, but if you think it might be affecting you then the workaround is to set core_freq to the same value as gpu_freq. |
JocPelletier
commented
Mar 1, 2016
|
Ok thanks that's what I thought, I updated many PI2 yesterday and I will try to reproduce the issue on another one, than update it and test if it fix our problem. Our pi2 are not overclocked so I should be fine with dist-upgrade |
JocPelletier
commented
Mar 15, 2016
|
We have about 10 Pi2 actually running at customers, we updated all Pi2 2 weeks ago to the latest firmware and 2 days ago one got corrupted again, than yesterday another one and I just got a call about a third one that is not working anymore. We also have many Pi1 in the fields and those doesn't seems to be affected by the issue. |
|
Which cards are you using? There was an rpi-update pushed this afternoon that includes a workaround for an issue seen with some old cards. Also, how are the Pis being shut down? |
JocPelletier
commented
Mar 15, 2016
|
We are using Kingston SDCA10/32GB and they never shut down except if the power is loss... [Edit] Our software on the Pi is a webserver (mono) processing/displaying serial data. |
JocPelletier
commented
Mar 17, 2016
|
We got 2 more defective PI2 since yesterday. Our Pi1 are using Kingston SDC10/32GB the slower model. Now we are replacing our Pi2 with the Pi1 but with the same SDCA cards. After mounting a defecting SDCard on linux, we were able to recover all files and badblocks is not reporting any issues. We do have a lot of "failed" message on boot and the first one is "Failed start Restore / save the current clock.". Do you have any advice to diagnose what is happening? |
|
@JocPelletier what does
report on the Pi's with issues? |
JocPelletier
commented
Mar 18, 2016
|
We updated all of our PI2 2 weeks ago to:
I've a status page with all of them including the "uname -a" result, to make sure they are all updated. For the other command, the result on one of them is:
It's the same image on all SDCard so it should be the same on all of them BTW we have another one dead |
|
JocPelletier
commented
Mar 18, 2016
What is weird is that it's happening approx. at the same time for each customer and they don't have the same setup/number of devices talking through serial. [Edit] Our Pi1 are B+ model |
|
I'm suspicious that you running out of space in the filing system, since it runs well for some time (and approximately the same time). Is that possible? Another potential explanation is that the cards aren't actually as large as they say they are, i.e. that each reported sector is backed by real flash storage and that they aren't fakes. This is a real problem that has happened to many Pi users. It might be worth running something like h2testw (Windows) or f3 (Linux, Mac, Cygwin and others) just to be sure. |
JocPelletier
commented
Mar 18, 2016
|
No we are not running out of space, I'm also monitoring that. I will run h2testw and report the result |
JocPelletier
commented
Mar 18, 2016
|
Just ran the h2testw on one of the card: Test finished without errors. |
|
I'm running out of ideas. Clearly you are having a problem that appears to be filing system corruption, although it would be nice to see some dmesg output that supports that. You may be able to retrieve something from /var/log/syslog using your Linux PC. But it is also clear that there are millions of Pi2s out there that seem to be working happily, because our Forums aren't filled with screaming. |
JocPelletier
commented
Mar 18, 2016
|
I'm currently connected by ssh on another Pi2 that just got corrupted. I can connect through ssh but if I do "htop" or "sudo nano /etc/resolv.conf" I get the same message:
And for the other ones:
|
|
If you are certain that you aren't seeing undervoltage conditions (the Pi2 can draw a lot more current than the Pi1 under load - you should try and measure it during a representative peak workload), then perhaps you are tickling a threading problem in some of the code you are running - 4 cores will tickle any issues. Going back to that error from ld.so, can you try running md5sum on all .so files on "good" Pi, also after a clean install if you have the time, and then the same again once it starts failing - although that may have to be on your Linux machine. This simple command ought to do the job - you can presumably capture the results from an ssh session:
Comparing the output from the 2 or 3 runs should tell us something. |
JocPelletier
commented
Mar 20, 2016
|
I'll verify if it's a threading issue, about your command do I have to install a package for md5? i tried to run it and all I get is:
I tried to install md5 / md5sum but it's not in the repo |
|
It's should be md5sum on the Pi - I was testing on a Mac. Is it really not installed as standard? dpkg itself uses md5 hashes. |
BertLindeman
commented
Mar 20, 2016
|
On the pi |
greenoid
commented
Mar 20, 2016
|
As a rule of thumb faster (Class 10) is not better. Since I switched to a Class 4 sd card no file system corruption occurred. Maybe the firmware timings are fragile and work better with conservative speeds? I could trigger corruption with one or more "apt-get update; apt-get upgrade' since these commands use many write operations on the file systems in short time. |
ghollingworth
commented
Mar 20, 2016
|
Note, there was a time a year back when I was seeing corruption on the SD card no matter what I did if I had SQLite running... It would never shut down cleanly no matter what I did. Can't remember now the details, but it would be interesting to see if the problem still exists (i.e. whether it always requires 'fixing' the disk when booting up |
davidsainty
commented
Mar 20, 2016
|
Prior to the sdcard driver switch I would see this style of corruption At the time the problem seemed to be helped most by changing the power Changing the power supply seemed to help a lot, so I tend to think it was Unfortunately, my change was just from a Samsung 2A 5V supply, to another The inevitable problem I tended to see is that the corruption roulette That's a general problem with all linux distributions with one big root
|
JocPelletier
commented
Mar 21, 2016
|
Here are the results after running Good: http://pastebin.com/X6BErQG7 I think that we really have to create a read-only root partition |
|
The md5sums are only useful if the images match before the corruption, which isn't going to be the case if "one may have additional updates." But despite that, the way the differences are grouped makes be believe that all of them could be due to an upgrade. The few singletons are in less critical code, except perhaps /lib/arm-linux-gnueabihf/security/pam_systemd.so. |
JocPelletier
commented
Apr 4, 2016
|
I did a test program writing data with SQLite and some log with NLog. The program was running the last 2 weeks on 2 different PI2: one GPIO powered and the other one using a 5V 2A Micro USB power supply. Today, both are corrupted. |
davidsainty
commented
Apr 4, 2016
|
This is the power supply that I switched to when I was getting file system https://nicegear.co.nz/electronics-gear/5v-2a-power-supply-w-20awg-6-microusb-cable-international/ Note that there MAY be some confounding variables. I'm pretty sure the PSU On 5 April 2016 at 00:17, JocPelletier notifications@github.com wrote:
|
lurch
commented
Apr 7, 2016
Both of them became corrupted at the same time? Perhaps there was a power cut/glitch/surge? |
JocPelletier
commented
Apr 7, 2016
|
They became corrupted on different day. The first one on friday and the other one later in the weekend, I noticed it on monday morning. I will start another test with a new SDCard (SanDisk Ultra ou Extreme 32GB) instead of the Kingston SDCA10/32GB. |
JocPelletier
commented
Apr 20, 2016
•
|
A little update on my tests: I sent my test program to your email pelwell about 2 weeks ago if it can help investigate the issue. The SanDisk Ultra on the PI2 got corrupted after only 1 week with my test program running. |
forecasting
commented
Apr 29, 2016
|
I had two PI2's, both with the same Kingston SDCA10/16GB card. Currently both PI2's run on a Sandisk Ultra 8GB and a Transcend Premium 8GB for serveral months without an issue. First I was thinking the repeated small writes of the mySQL DB caused the cards to get corrupted. But for the moment I'm convinced those cards are just crap, especially because both PI's are running fine now for a long time... |
DrCord
commented
May 4, 2016
|
I just got this happening on a completely new samsung SDHC 32GB class 10 card. |
lylesvendsen
commented
May 15, 2016
•
|
I am able to produce this consistently on a RPI3 and Samsung 16 & 64gb mSD cards by trying to use NPM to install new node red nodes and they fail. GPIO Node for example ($sudo npm install node-red-contrib-gpio or $sudo npm install node-red-contrib-mpr121) I hope this helps debug this. I'm downloading the 2016-05-10 build of Raspbian, I hope it fixes the issue. |
|
The Kingston SDC10G2/16GB cards seem to have a controller fault that makes the ERASE operation both slow and hazardous. The ext4 filesystem will attempt to use ERASE on nodes as they are deleted, and this can lead to corruption. The rpi-4.4.y tree contains a patch that disables erase on such cards (name="SD16G", manfid=0x41, oemid=0x3432") to improve performance and stop the corruption; a kernel including this patch is now available via rpi-update. If you have a card that seems to have the advertised capacity (passes h2testw, etc.) but gets corrupted during an update then please post your card details here, as found using:
For example, my failing card returns:
I imagine I'll need to enable the same "quirk" for additional capacities of the Kingston cards - it sounds like 32GB is affected, so perhaps "SD32G" - but other manufacturers could have the same controller. |
added a commit
that referenced
this issue
May 19, 2016
added a commit
to Hexxeh/rpi-firmware
that referenced
this issue
May 19, 2016
|
There is a new rpi-update release that adds a quirk to disable ERASE commands on cards with:
|
JocPelletier
commented
May 19, 2016
•
|
Thanks for the update, I'll try that now on a Pi 2 using a 32G Kingston:
But we also got corruptions on Sandisk Ultra 32G cards, if it's the same issue you should add:
|
TheSin-
commented
May 19, 2016
|
I've been following this issue, and although I have not had any issues with my SanDisk Ultra 8G or Kingston 8G. I'm just curious as to why limit the patch for ERASE? Why not just patch it for everything, is there a benefit to keeping it at all? Wouldn't it be safer to just patch it out if it's an SD period and only enable it for eMMC/USB? Again I haven't had any issues I'm just curious as the include list might be harder then an exclude list is all. |
|
When it works, ERASE should be a performance boost because it reduces any subsequent write time. I don't think this is a Pi-specific problem, therefore it can't be so widespread otherwise ERASE would be disabled in the kernel for all SD cards, so for now I'd rather be cautious. |
TheSin-
commented
May 19, 2016
|
makes sense, just thought I'd ask I know you guys work very hard on this and the last thing you want is a list with hundreds of cards on it that you have to maintain ;) So thought I'd bring it up to see if it made sense. |
|
It's not a bad idea, just one I'd rather keep up my sleeve for now. |
JocPelletier
commented
May 27, 2016
•
|
Still have corruption issue with 4.4.11-v7+ and Kingston SD32G after 1 week using my test program. |
rookierks
commented
Aug 7, 2016
|
I've been running archlinux arm for a long time now and I've been using the following card with a Raspberry Pi Model B Rev 2 and I haven't seen any problems. cid:4134325344333247300051861800e519 I guess the difference might be that I've been using f2fs for the root fs for as long as it has been supported in the archlinux arm kernel. If I recall correctly mmc erase support was introduced after that. As pelwell says, if mmc erase works it should be used as it helps increase write speed by avoiding an erase before a write and might also help with sd card longevity. |
SigiK
commented
Nov 9, 2016
|
@JocPelletier Could you please tell me what caused your corruptions of your SD-cards? I am having similar issues with Samsung MB-SS32SD, but dont know whats causing it. |
JocPelletier
commented
Nov 9, 2016
•
SigiK
commented
Nov 9, 2016
|
@JocPelletier Thx for fast answer! Could it in your opionion have to do with mono and serial-communication (we are using RS485), because we are using both. |
JocPelletier
commented
Nov 9, 2016
|
@SigiK I don't think so, because we have 2 services running, one managing all RS485 communications and one running a webserver with data logging. We tried to disable the data-logging on some RPi and it seems to "fix" the corruption issue. Also, my test program reproducing the issue is not using the RS485 |
ghollingworth
commented
Nov 9, 2016
|
@JocPelletier If you enable sqlite, does this give you 100% reliable corruption? I've seen this in the past and similarly put it down to something about SQLite hoping it would be fixed at some time in the future. When you say corruption, does this result in a non-booting system or just a system that needs to do a e2fsck at startup? |
JocPelletier
commented
Nov 9, 2016
|
@ghollingworth 99% Yes but it can take more than a week. But it can be NLog too because we are using it too. I've not tried to remove NLog in my test program that's why I can't say 100% yes. By corruption I mean a non-booting system. |
SigiK
commented
Nov 9, 2016
|
@JocPelletier Thx for this useful information! We used swap before, which probably also corrupted SD-cards. Anyway, we didnt have such issues with smaller (4GB) SD-cards before (having swap and logging activated). In our case it seems to be a combination of SD-card type and heavy writes to SD-card. |
ghollingworth
commented
Nov 9, 2016
|
When you say non-booting, how far does it get? Do you get:
|
JocPelletier
commented
Nov 9, 2016
•
|
@ghollingworthi don't remember exactly, and I'm not sure it was always the same result, but it was not 1) or 2) it was kernel panic. |
greenoid
commented
Nov 10, 2016
|
@SigiK Yes "In our case it seems to be a combination of SD-card type and heavy writes to SD-card." This is true. SQLite ist not the cause, every process using many write operations will cause corruption over time. How long it'll take is a matter of SD-Card Model (actually hardware used for this model at the time of production) and RPi firmware version. This may take from 1 day to 3 months and longer. The RPi3 is able to boot without SD-Card and the RPi2 may boot from a read-only partition of a SD-Card and use an USB Stick oder harddrive. |
Ferroin
commented
Nov 10, 2016
|
It's worth noting that while SQLite isn't the direct cause, it and any other database files (including BerkDB, as well as many backends for most RDBMS software, and (rather significantly) systemd journal files) will tend to accelerate this process on many SD cards because they involve lots of internal rewrites, and most SD cards have really poorly designed FTL's that don't do a good job of wear-leveling. |
Ruffio
commented
Jan 7, 2017
|
@NitroG42 Can this issue be closed? |
NitroG42
commented
Jan 7, 2017
|
Oh I didn't play with my Raspberry for a long time but since user don't seems to have the issue anymore (it was working for me after the first patch I think), it can be closed ! |
NitroG42 commentedMar 19, 2015
Lots of people seems to be affected by an issue with sdcard.
I'm using a Samsung Evo 16 Gb micro SDCard, and using raspbian, I encounter every time corruption on the sd card.
It's easy to reproduce :
I need to check on my linux system (I'm at work) if I can fix the card at this step or not.
I flashed the raspbian img multiple times and it doesn't work.
It also can be reproduce just by making the RPI reboot multiple times through the terminal (using sudo reboot)
I have 3 of them so I hope it's just a firmware bug (I'll try with another one to be sure it' sno the sdcard itself)
Here's two threaeds that gathered this issue (without creating a post in here though :/ ) :
http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=101183&p=703772&hilit=error+110#p703772
http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=98935
One post is interesting :
If you want card info, I can give them but you need to tell what to run on which system, because I didn't find a way to print sdcard charateristics from Mac OS X.