4 ms·
One of my main concerns about the use of a raspberry pi as a desktop PC is microSD card write lifespan. microsd cards were not meant to be used as the boot disk
by walrus01 6y ago
One of my main concerns about the use of a raspberry pi as a desktop PC is microSD card write lifespan. microsd cards were not meant to be used as the boot disk for a live operating system. The amount of times you can write over one sector on them, and the write wear leveling algorithms, are much worse than even a $45 consumer grade SATA3 interface SSD.
Yes you can now boot a raspberry pi from an external usb3.0 hard drive or SSD in an enclosure. But how many people actually do that?
I would say that a huge percentage of failures I have seen of raspberry pis, when people attempt to turn them into low cost industrial/embedded/dedicated purpose headless machines, is from the microsd card failing after 6, 12, 18 months.
something like the raspberry pi but with a socket to plug in a cheap M.2 SATA or M.2 NVME SSD is needed.
- freerobby 6y agoYep, same problem with eMMC on Tesla's Tegra board. Solution: mount /var/log and other such partitions as ramdisks :)
- walrus01 6y agoThat's really scary and a poor choice that something which is probably buried deep in the car, and costs thousands of dollars to remove and replace, is a soldered onboard flash drive which will fail from constant use. I'd be surprised if tesla didn't have embedded systems engineering responsible for this thing, and indeed even flash memory experts on staff, who are intimately familiar with all of the design problems of flash memory write wear leveling. And they went ahead and send that design to production anyways?
- meekrohprocess 6y agoIt is quite embarrassing for them; Flash write endurance is something that most new graduates are aware of. There's an NHTSA investigation into the incident, but on the bright side, Tesla did remediate it in newer models...by using chips with twice as much eMMC memory to push the failures farther out.
- heavyset_go 6y agoCompared to other luxury cars, Tesla's cars have a lot of issues and design problems you wouldn't normally see. I'm not surprised that those problems extend into the internals of their cars, as well.
- freerobby 6y agoI believe they avoid socketed chips due to vibration issues. Definitely should have upped the physical capacity to distribute the writes, though.
- NotSammyHagar 6y agoI have a 5 year old model S and I ran into this failure. My car was about 4.5 years old, it was about 6 months after the initial 4 year warranty expired. I'd struggled with deciding to get an extended warranty or not - of course now I insist everyone should get one. They very generously let me purchase an extended warranty at repair time and let me use that toward that repair. That was a really stupid design decision of course for Tesla to use the emmc in that way. I love my car but that was a bad day when the problem hit me. It's been a great car even with a few problems (had one of the door handles replaced). Mine will be 6 years old soon, I will probably wait till it's about 8 years old for replacing it. On the other hand, I have a friend with an 8 year old model S and he had no extended warranty and he hasn't had that problem.
- castratikron 6y agoWhere do you save the log on a reboot or power loss?
- walrus01 6y agoI'm absolutely not an expert on this, but you ideally provide a sufficiently large amount of storage area, with a flash memory controller, that over the expected (20 year plus hopefully!) lifespan of the product, the amount of periodic daily writes can be evenly distributed, and will not exceed the individual cell write lifespan. Some people who have intentionally done torture test writes on consumer grade SSDs have discovered the actual cumulative TB writes that a $50 to $100 SSD will take before ultimate failure. From back in 2015: https://techreport.com/review/27909/the-ssd-endurance-experiment-theyre-all-dead/ https://techreport.com/review/27909/the-ssd-endurance-experi... One drive failed at 700TB written. If you were to write 2GB per day in an industrial/embedded application nonstop for 20 years, that is considerably less data than 700TB. With teslas that have a persistent LTE data connection for the car, you also have the option of doing something like 300KB of file upload per day to a remote server.
- a1369209993 6y ago> If you were to write 2GB per day in an industrial/embedded application nonstop for 20 years, that is considerably less data than 700TB. Specifically: $ units You have: 2GiB/day * 20yr You want: TiB * 14.267273 You have: 2GiB/day * 20yr You want: 700TiB / 49.063334 14TB total, or about one fiftieth of your quota.
- inetknght 6y agoEither you attach dedicated storage for it or you send the logs elsewhere using a network-mounted /var/log or using a syslog daemon on another host.
- freerobby 6y agoI have a reverse-ssh tunnel + script to upload the logs to my home server on demand. If the MCU crashes or reboots unexpectedly, I would lose those logs. Ironically, my system for downloading the logs writes them to an SD card on a raspberry pi.
- mobilio 6y agoWrite lifespan can be improvement if you make some similar as this: /dev/mmcblk0p1 on /var/log.hdd type ext4 (rw,noatime,nodiratime,errors=remount-ro,commit=600) /dev/zram0 on /var/log type ext4 (rw,relatime,discard) Because zram is compressed ram disk: https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html https://www.kernel.org/doc/html/latest/admin-guide/blockdev/...
- dundarious 6y agoOr for those using journald, use Storage=volatile in /etc/systemd/journald.conf and then `systemctl force-reload systemd-journald`. Remove /var/log/journal to get rid of the old persisted logs.
- phkahler 6y ago>> Yes you can now boot a raspberry pi from an external usb3.0 hard drive or SSD in an enclosure. But how many people actually do that? >> something like the raspberry pi but with a socket to plug in a cheap M.2 SATA or M.2 NVME SSD is needed. As nice as M.2 would be, AFAICT it's not supported by the SoC which is what allows these things to be so inexpensive. Go with USB then. IMHO an AMD APU could be under clocked to not need a fan, and would allow things like M.2 in a keyboard form factor. That might be amazing but would probably cost 2x to 3x the price. Also, at the higher price people would then complain about the keyboard. BTW I thing SFF designs and keyboard computers should have a couple USB or SD on the top to make it easy to plug in storage devices.
- justin66 6y ago> Yes you can now boot a raspberry pi from an external usb3.0 hard drive or SSD in an enclosure. But how many people actually do that? Judging by how often people talk about the feature online (or how often they enquired about the delay in implementating it on pi 4 - it's been possible with the 3 forever), a lot. > something like the raspberry pi but with a socket to plug in a cheap M.2 SATA or M.2 NVME SSD is needed. This is a not entirely uncommon but very badly thought out feature suggestion for the pi that comes from technical people who aren't the target audience and don't understand the target audience for the pi. It'd be an okay feature on the Pi compute module. First things first, though: if you're really worried about storage reliability on these things (or anything), please stop prefacing your hardware suggestions with "cheap." > low cost industrial/embedded/dedicated purpose headless machines, is from the microsd card failing after 6, 12, 18 months. If you're trying to get this much value out of the thing, using either a legitimate, brand name USB ssd (not something cobbled together in a cheap enclosure), an industrial SD card built for embedded applications, or network booting are all good options. Consumer grade sd cards are... cheap. It's not such a problem for a lot of the Pi's applications. I'm happy to use cheap sd cards to boot Pi 3s that serve as music players while using a Samsung T5 on the Pi that serves the music, for example (and on a development system).
- candiodari 6y ago> If you're trying to get this much value out of the thing, using either a legitimate, brand name USB ssd (not something cobbled together in a cheap enclosure), an industrial SD card built for embedded applications, or network booting are all good options. Better option: if you use SD, use 2 and monitor.
- barumi 6y ago> First things first, though: if you're really worried about storage reliability on these things (or anything), please stop prefacing your hardware suggestions with "cheap." What would be the cost implications of adding SATA support for a Raspberry Pi? And keep in mind that nowadays the price point of a fully kitted raspberry pi is already close to 100$.
- 6y ago
- rainworld 6y agoIndustrial-grade SD cards seem to be the way to go: https://news.ycombinator.com/item?id=16776344 https://news.ycombinator.com/item?id=16776344
- elcritch 6y agoThey'll still fail fairly regularly if you have regular power outages (a reality in many IoT systems). Speaking from experience with several industrial card brands. Also they're as expensive as just buying a USB or even full SSD drive.
- shams93 6y agoWhile the pi gets better and better this is still meant for the classroom rather than the enterprise user. Apple moving to arm will help with docker image availability however you’d need faster clock speeds and a lot more ram to be use for local development.
- kingosticks 6y agoUpton talks about enterprise usage in https://www.hackster.io/videos/774 https://www.hackster.io/videos/774 but as a thin client. I got the impression they are pretty interested in that market.
- jdietrich 6y ago>One of my main concerns about the use of a raspberry pi as a desktop PC is microSD card write lifespan. If you're so inclined, you can buy microSD cards with better endurance ratings than typical consumer SSDs. https://www.westerndigital.com/products/embedded-removable-flash/surveillance-sd-microsd-cards https://www.westerndigital.com/products/embedded-removable-f...
- JohnBerea 6y agoI still have issues with the high endurance cards. Bought two identical high endurance 128GB's for Pi4's. After 1 day of use each (with minimal writes beyond installing RPi OS), GParted could resize one partition, but the other failed due errors that couldn't be repaired with fsck.
- scns 6y agoDid you use another filesystem than what they came with? Possibly you overwrote the section where the sdcard stores some important data. Check out this page: https://superuser.com/questions/381208/how-can-i-format-an-sd-card-with-a-more-robust-linux-usable-filesystem-with-a-sp https://superuser.com/questions/381208/how-can-i-format-an-s...
- LeoPanthera 6y agoIf you have a home NAS, you can netboot the raspberry pi. I have five or six pis around my house doing different things, and they all netboot. https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/net.md https://www.raspberrypi.org/documentation/hardware/raspberry...
- 29083011397778 6y agoThis is what I've done with mine, and it works a treat. Never having to worry about uSD card lifespan or troubleshooting why my Pi won't boot randomly is fantastic, and I cannot recommend it enough.
- bhauer 6y agoI use Samsung Pro Endurance microSD cards [1] in most of my Raspberry Pi 4s. My RPi devices don't see the wear and tear of my main computers, so I can't speak with authority on the matter of durability. But anecdotally, I have had none of the microSDs fail or show any evidence of degradation. Theoretically the Pro Endurance cards are slower than other Samsung SD cards. But in my usage, I've not noticed a difference in I/O versus the one Raspberry Pi 4 that I've got with a "regular" microSD card. [1] https://www.samsung.com/us/computing/memory-storage/memory-cards/microsdxc-pro-endurance-memory-card-w-adapter-128gb-mb-mj128ga-am/ https://www.samsung.com/us/computing/memory-storage/memory-c...
- mikkelam 6y agoI've been using log2ram [1] which helps my sd cards survive longer than otherwise. [1] https://github.com/azlux/log2ram https://github.com/azlux/log2ram