Hi. I'm just after feedback from you guys regarding SD card life. I've been using Raspbx for about 9 months now and have just had my second SD card failure. Wondering about the quality of the SD cards. I would be interested to know how long your PBX typically runs for before you have failures. thanks in advance for your replies.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
In my first experience with first PI generation some years ago first sd card was killed in 1 week
Same experience now with the last PI generation same thing with my first sd card
you have two solutions
Trying an expensive quality SLC industrial SD card about mini $100 for 4Gb
Mooving to an USB SLC key $100 for 16 Gb
Moovind to a quality SSD MLC $100 for 64/128 Gb
I'm in test since two monthes using an SSD plugged/unpugged, working with worst ( POE extractor) and good power supply and the baby seems like it working fine :-)
Raspy is mounted in 19 Inches enclosure with 2 NIC cards USB SSD and USB lcd displaying IP and memory informations.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My PI - First generation (Pi 1) has been running on the original SD card
since I initially installed it without any issue That is 3-4 years.. But
it is running the earlier version of RASPBX, from this forum it appears
that it is the newer version of the software that has been killing the
cards although I believe there have recently been some improvements made to
put less wear on the cards. Jon
Hi,
In my first experience with first PI generation some years ago first sd
card was killed in 1 week
Same experience now with the last PI generation same thing with my first
sd card
you have two solutions
Trying an expensive quality SLC industrial SD card about mini $100 for 4Gb
Mooving to an USB SLC key $100 for 16 Gb
Moovind to a quality SSD MLC $100 for 64/128 Gb
I'm in test since two monthes using an SSD plugged/unpugged, working with
worst ( POE extractor) and good power supply and the baby seems like it
working fine :-)
Raspy is mounted in 19 Inches enclosure with 2 NIC cards USB SSD and USB
lcd displaying IP and memory informations.
Since FreePBX 12 mysql database usage has increased unfortunately. Could you install the sysstat package
apt-get install sysstat
And then call iostat and read the value kB_wrtn. Divide this to the number of uptime days of your Pi (run uptime).
It would be interesting to know how much data is written to people's SD cards in different setups.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1 day ago, I posted a question that is related to this (i think).
as I expirincing problems with stability. (20-30 minutes working fine) after that a crash occures, due to Power problems with USB/Dongle/RaspberyPI or when using USH HUB, problems with USB compatibilty.
Thanks for the responses. I think the problem is the SD cards. There seems to be a fair amouint of confusion about a whether or not cards implement any sort of wear leveling technology and of course there is issue of substandard and fake cards. My research took me here http://www.mouser.co.uk/Embedded-Solutions/Memory-Cards//N-d0rp7?P=1yxxwsyZ1z0w1t4 where I found data sheets for cards by Panasonic, Swissbit and Smart Modular Tech that explicitly state that they feature static and/or dynamic wear levelling plus error dectection and correction, a bit more expensive than some but what price reliability.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is a middle option here in a PCEngines sd4b, which is a pSLC card running MLC NAND flash in SLC mode which extends durability a lot. These are pretty cheap.
I'm curious if it's mysql use or if it's logging. And what would be writing to mysql so much?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To answer your question: FreePBX introduced the dashboard scheduler with version 12, and this wrote lots of data to the Mysql database every minute. A patch was delivered to RasPBX users in autumn 2016 to run the scheduler only once every hour. Since then writes decreased considerably.
I did some research on this topic over many months. I have an old Pi1 still running an older image. This unit runs on the same 4GB standard SD card for over 4 years now without problems. I've checked the numbers shown by iostat, it writes around 250MB to the card every day, on average. If wear levelling is done correctly on this card, and I assume so, the free space has been overwritten around 250 times in these 4 years, according to my calculations. One can find many articles on the net stating that even cheap cards support at least 1000 writes. So according to these numbers, the card should in theory last for 16 years in total.
In early 2016 I flashed the image from January 2016 to a cheap, 4GB, 4 Euros SD card, again nothing special (I think it is a Transcend), and it is also still running for over a year 24/7. It even survived the active dashboard scheduler, until the patch came in autumn 2016. I'm continuously monitoring this Pi, it currently writes around 388 MB of data each day. I've already tried to move the logs to a tmpfs but the difference was only very little. The free space on this card is written around 110 times per year, so it should still last around 10 years in theory.
I also had another cheap 8GB card running on a Pi3 for about half a year without problems. If people use 8GB cards and do not expand the root partition, there should always be enough free space for wear levelling, so the card should last a long time even if write numbers are much higher than in my case.
So far my own observations and theoretical lifetime calculations. But as people still report issues with broken cards sometimes, I cannot say there are no problems at all. It would be good to have some numbers of amount of data written to people's cards for comparison. Therefore I ask those who have their Pi running for a while to post their numbers here. Maybe we can get some insight why people still run into problems.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I'm surely crazy but yesterday I have setting up in a customer Hotel a raspy based system
70 phones
4 SIP trunks
asterisk 11.21.0 including mysql realtime features with lighttpd
Also including:
dual NIC, dhcp server, Squid, captive portal this does mean 70 customers using eth1 to connect internet accross iptables and the squid proxy.
Hardware is Raspi3 booting on ssd with USB NIC eth1 with 2A power supply.
Awesome. That is a really good use scenario showing the power of the Pi. To go back to the thread subject, I used the same micro-SD for about a year an a half. Not expensive, bought at a local pharmacy. Rock solid. I have since implemented raspbx-backup (has issues with autofs) and bought a couple more $10 cards from Amazon. So now if there is a failure, I can just pop in a new card.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My raspbx was great until about a little over a year ago. Since then, I've been unable to run a reliable system. About every other month, there's some sort of corruption on my SD card.
It was a great experiment while it lasted, but I've had it with needing to reinstall various bits of the OS. I've been using MicroCenter cards which have been quite reliable for me in the past. Perhaps they've changed something I'm not aware of. Or as mentioned above, a great deal more writing to the card is happening.
Thank you for all the work so far. Perhaps I'll revisit this at a future date.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One thing I have done, which seems helpful, is to disable all but absolutely essential logging. Unfortunately there are several places that logging occurs, so it is a little difficult to know how to shut it all off.
Also I have a cron job set up to run this once each night:
/sbin/fstrim /
(Note the space prior to the final / character). As far as I know there is no set rule on how frequently to run fstrim so I just do it once a day in the early AM hours. It is my understanding that fstrim will help spread out the wear on the SD card so that one part of it doesn't fail prematurely, but maybe I am wrong about that.
I think the biggest thing is to use high quality SD cards and to oversize them so there is plenty of extra space. Make sure you expand the filesystem to use the entire SD card (don't remember if RasPBX does this automatically offhand).
There IS an way to run a Raspberry Pi from an external hard drive or SSD (in which case the SD card is used for booting only, so gets very little wear), though I don't know where the instructions for doing that are offhand, but even if you have an old small external USB hard drive sitting around, as long as it still works it should have enough space. You CAN also use an external USB memory stick but those tend to be really slow, both when copying your OS and software to the stick, and while running. So if you find this is an ongoing issue, you might try searching for the instructions on running a Pi from an external USB drive, and then search your junk box for an old but still working drive, or buy a new cheap drive (if you buy a brand new one you will never find one that is too small for this application, so look at price and reliability). Make sure the drive uses an external power supply and is not entirely power by the USB connection. I don't recommend using a USB memory stick; since the Pi doesn't have USB3 ports there is no way you will find one that isn't painfully slow, IMHO.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Long time without posting something here :-)
I have removed the PI from production and replace it with a real server because PI have too many freeze and need most of time two or three hard reboot to live again :-)
PI is a very nice & popular device but it's just a nice toy for playing with Linux at home.
Not reliable at all !
My next test embedded target will be the Banana Pi-R2 with a real sata port, PCIe port and 2Gb ram.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi. I'm just after feedback from you guys regarding SD card life. I've been using Raspbx for about 9 months now and have just had my second SD card failure. Wondering about the quality of the SD cards. I would be interested to know how long your PBX typically runs for before you have failures. thanks in advance for your replies.
Hi,
In my first experience with first PI generation some years ago first sd card was killed in 1 week
Same experience now with the last PI generation same thing with my first sd card
you have two solutions
Trying an expensive quality SLC industrial SD card about mini $100 for 4Gb
Mooving to an USB SLC key $100 for 16 Gb
Moovind to a quality SSD MLC $100 for 64/128 Gb
I'm in test since two monthes using an SSD plugged/unpugged, working with worst ( POE extractor) and good power supply and the baby seems like it working fine :-)
Raspy is mounted in 19 Inches enclosure with 2 NIC cards USB SSD and USB lcd displaying IP and memory informations.
My PI - First generation (Pi 1) has been running on the original SD card
since I initially installed it without any issue That is 3-4 years.. But
it is running the earlier version of RASPBX, from this forum it appears
that it is the newer version of the software that has been killing the
cards although I believe there have recently been some improvements made to
put less wear on the cards. Jon
Jon Eskdale
07530 112233
Skype "eskdale"
On 8 March 2017 at 00:38, zeler christian comdif@users.sf.net wrote:
Since FreePBX 12 mysql database usage has increased unfortunately. Could you install the sysstat package
And then call iostat and read the value kB_wrtn. Divide this to the number of uptime days of your Pi (run uptime).
It would be interesting to know how much data is written to people's SD cards in different setups.
Thats an interesting suggestion. I will implement it. Thanks.
1 day ago, I posted a question that is related to this (i think).
as I expirincing problems with stability. (20-30 minutes working fine) after that a crash occures, due to Power problems with USB/Dongle/RaspberyPI or when using USH HUB, problems with USB compatibilty.
My post:
Can SIM/Operator affect USB dongle power comsumtion
https://sourceforge.net/p/raspbx/discussion/general/thread/a013c441/
Thanks for the responses. I think the problem is the SD cards. There seems to be a fair amouint of confusion about a whether or not cards implement any sort of wear leveling technology and of course there is issue of substandard and fake cards. My research took me here http://www.mouser.co.uk/Embedded-Solutions/Memory-Cards//N-d0rp7?P=1yxxwsyZ1z0w1t4 where I found data sheets for cards by Panasonic, Swissbit and Smart Modular Tech that explicitly state that they feature static and/or dynamic wear levelling plus error dectection and correction, a bit more expensive than some but what price reliability.
@bazza14 this is exactly my conclusion plug a $100 mem card on a $30 device solve the problem :-)
Not quite. The cards I am looking at are £15 and £22 these are MLC cards with SLC industrial card features. Putting a £98 card in is not really a vibale option. You can see the specs here https://www.swissbit.com/data/view.php?q=S-45u/S-45u_fact_sheet.pdf and http://www.mouser.com/ds/2/723/microSD_overview-1082214.pdf
Hope fully these will solve the problem but it will be many months before I have that data. Thanks again to everyone for their input.
There is a middle option here in a PCEngines sd4b, which is a pSLC card running MLC NAND flash in SLC mode which extends durability a lot. These are pretty cheap.
I'm curious if it's mysql use or if it's logging. And what would be writing to mysql so much?
To answer your question: FreePBX introduced the dashboard scheduler with version 12, and this wrote lots of data to the Mysql database every minute. A patch was delivered to RasPBX users in autumn 2016 to run the scheduler only once every hour. Since then writes decreased considerably.
I did some research on this topic over many months. I have an old Pi1 still running an older image. This unit runs on the same 4GB standard SD card for over 4 years now without problems. I've checked the numbers shown by iostat, it writes around 250MB to the card every day, on average. If wear levelling is done correctly on this card, and I assume so, the free space has been overwritten around 250 times in these 4 years, according to my calculations. One can find many articles on the net stating that even cheap cards support at least 1000 writes. So according to these numbers, the card should in theory last for 16 years in total.
In early 2016 I flashed the image from January 2016 to a cheap, 4GB, 4 Euros SD card, again nothing special (I think it is a Transcend), and it is also still running for over a year 24/7. It even survived the active dashboard scheduler, until the patch came in autumn 2016. I'm continuously monitoring this Pi, it currently writes around 388 MB of data each day. I've already tried to move the logs to a tmpfs but the difference was only very little. The free space on this card is written around 110 times per year, so it should still last around 10 years in theory.
I also had another cheap 8GB card running on a Pi3 for about half a year without problems. If people use 8GB cards and do not expand the root partition, there should always be enough free space for wear levelling, so the card should last a long time even if write numbers are much higher than in my case.
So far my own observations and theoretical lifetime calculations. But as people still report issues with broken cards sometimes, I cannot say there are no problems at all. It would be good to have some numbers of amount of data written to people's cards for comparison. Therefore I ask those who have their Pi running for a while to post their numbers here. Maybe we can get some insight why people still run into problems.
Hi all,
I'm surely crazy but yesterday I have setting up in a customer Hotel a raspy based system
70 phones
4 SIP trunks
asterisk 11.21.0 including mysql realtime features with lighttpd
Also including:
dual NIC, dhcp server, Squid, captive portal this does mean 70 customers using eth1 to connect internet accross iptables and the squid proxy.
Hardware is Raspi3 booting on ssd with USB NIC eth1 with 2A power supply.
After 24 H system seem to work very fine with very good voice quality
Powered by raspy:
https://www.tripadvisor.com/Hotel_Review-g187257-d197165-Reviews-Hotel_Amiraute-Toulon_Var_Provence_Alpes_Cote_d_Azur.html
:-)
I will let you know how the solution is reliable !
Awesome. That is a really good use scenario showing the power of the Pi. To go back to the thread subject, I used the same micro-SD for about a year an a half. Not expensive, bought at a local pharmacy. Rock solid. I have since implemented raspbx-backup (has issues with autofs) and bought a couple more $10 cards from Amazon. So now if there is a failure, I can just pop in a new card.
My raspbx was great until about a little over a year ago. Since then, I've been unable to run a reliable system. About every other month, there's some sort of corruption on my SD card.
It was a great experiment while it lasted, but I've had it with needing to reinstall various bits of the OS. I've been using MicroCenter cards which have been quite reliable for me in the past. Perhaps they've changed something I'm not aware of. Or as mentioned above, a great deal more writing to the card is happening.
Thank you for all the work so far. Perhaps I'll revisit this at a future date.
One thing I have done, which seems helpful, is to disable all but absolutely essential logging. Unfortunately there are several places that logging occurs, so it is a little difficult to know how to shut it all off.
Also I have a cron job set up to run this once each night:
/sbin/fstrim /
(Note the space prior to the final / character). As far as I know there is no set rule on how frequently to run fstrim so I just do it once a day in the early AM hours. It is my understanding that fstrim will help spread out the wear on the SD card so that one part of it doesn't fail prematurely, but maybe I am wrong about that.
I think the biggest thing is to use high quality SD cards and to oversize them so there is plenty of extra space. Make sure you expand the filesystem to use the entire SD card (don't remember if RasPBX does this automatically offhand).
There IS an way to run a Raspberry Pi from an external hard drive or SSD (in which case the SD card is used for booting only, so gets very little wear), though I don't know where the instructions for doing that are offhand, but even if you have an old small external USB hard drive sitting around, as long as it still works it should have enough space. You CAN also use an external USB memory stick but those tend to be really slow, both when copying your OS and software to the stick, and while running. So if you find this is an ongoing issue, you might try searching for the instructions on running a Pi from an external USB drive, and then search your junk box for an old but still working drive, or buy a new cheap drive (if you buy a brand new one you will never find one that is too small for this application, so look at price and reliability). Make sure the drive uses an external power supply and is not entirely power by the USB connection. I don't recommend using a USB memory stick; since the Pi doesn't have USB3 ports there is no way you will find one that isn't painfully slow, IMHO.
Long time without posting something here :-)
I have removed the PI from production and replace it with a real server because PI have too many freeze and need most of time two or three hard reboot to live again :-)
PI is a very nice & popular device but it's just a nice toy for playing with Linux at home.
Not reliable at all !
My next test embedded target will be the Banana Pi-R2 with a real sata port, PCIe port and 2Gb ram.
Have been running a PI and Raspbx for over 2 years and have not experienced any corruption.
Also the PI3 can be set to boot to usb without SD card
https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md