Recommneded Reliable micro SD Cards for Power outage situations Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
dpsguard
Posts: 40
Joined: Mon Aug 03, 2020 12:48 am

Recommneded Reliable micro SD Cards for Power outage situations

Post by dpsguard »

Hello All,

Please share your recommendations for a reliable micro SD card in simple use case of a RPi running Pi-hole and Pi-VPN client and once in a while to fire a browser to login to a wireless AP to make minor changes in there. I will have a low cost $50 UPS added to the mix to avoid too many power outages and brownouts.

I first tried to use a $20 power bank, but I find that unplugging power from powerbank, causes the RPi to reboot. With UPS, it does not happen. So I also read that I could add a little larger (like a 1000 uF Capacitor across the GPIO pins 2 and 6 to have that transfer time issues with powerbank, but I did not feel comfortable (unless there is a connector available (like single limbed jumper headers for sliding into these two pins and then soldering the cap across some wires and placed suitably inside the case for the RPi.).

Thanks
User avatar
Joulinar
Posts: 2085
Joined: Sat Nov 16, 2019 12:49 am

Re: Recommneded Reliable micro SD Cards for Power outage situations

Post by Joulinar »

I'm using a SanDisk Ultra 32GB microSDHC Class 10, A1. The SD Card survived tons of re-flashing in meantime :)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
dpsguard
Posts: 40
Joined: Mon Aug 03, 2020 12:48 am

Re: Recommneded Reliable micro SD Cards for Power outage situations

Post by dpsguard »

Okay great to know that SanDisk Ultra is a good one. Does it make sense to spend extra money in using High or Pro endurance or extreme etc marked? I am not sure if they will help guard against corruption of card if power is removed from the card. I am not sure if in my simple application, anything is even written to the card (other than may be logs, or rarely an update that I will do manually). It will be great if DietPi has the option to make boot partition read only (after install and configuration of everything) and then as and when needed, we simply make it temporarily read / write to install any security updates or bug fixes.

Thanks
User avatar
Joulinar
Posts: 2085
Joined: Sat Nov 16, 2019 12:49 am

Re: Recommneded Reliable micro SD Cards for Power outage situations

Post by Joulinar »

Well if you lose power in an unlucky situation where the system is writing down something, no SD card can protect you. But you applications are not that critical to loose real data. They simply can be restored in a couple of minutes. Best is to use dietpi-backup function. Just plug an USB stick into you device and use it as backup taget. This will create a snapshot of you system and you can restore your whole environment if needed. As well a good thing before doing any software updates ;)

Regarding the r/o fs protection. Theoretically you could use dietpi-drive_manager to set r/o for specific partitions. however I would not recommend it. There are some software title who need r/w access, otherwise they will not start. A better option is to use an overlay fs for root partition. Just have a look to this post viewtopic.php?p=24920#p24920
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
dpsguard
Posts: 40
Joined: Mon Aug 03, 2020 12:48 am

Re: Recommneded Reliable micro SD Cards for Power outage situations

Post by dpsguard »

Thank you for your great advise. My concern is that if an unlucky power failure, even if I take a backup, I will need to drive back to site 3 hours away. In that situation, I would rather replace the whole card which I will have copied the complete image. All sites have the same set up, even same IP address.

I will read up on the overlay fs for root partition. That should work for meeting the need. I was wondering that people use RPi for IOT applications in commercial setups as well and they need to harden it against power failures or brownouts. Not all situation will afford to have a small UPS like I am doing, as for many applications, the cost will drive them away to some other SBC solutions that can leverage something like mSATA drive.
User avatar
Joulinar
Posts: 2085
Joined: Sat Nov 16, 2019 12:49 am

Re: Recommneded Reliable micro SD Cards for Power outage situations

Post by Joulinar »

well it always depends on personal needs and application scenario how to protect the system physicaly. There will be no 100% guarantee, even with UPS and a r/o file system. If you are unlucky or get a bad SD card (manufacturing failure), physical damage could happen. But yeah you could reduce risk. At the end you would need to deal with Murphy's law: "Anything that can go wrong will go wrong". ;)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
dpsguard
Posts: 40
Joined: Mon Aug 03, 2020 12:48 am

Re: Recommneded Reliable micro SD Cards for Power outage situations

Post by dpsguard »

Thank you so much Joulinar for your great support. I think, it is clear that my approach is good enough to reduce the risk level to the minimum. I have decided to use Sandisk Edge A1 cards, which are available from the supplier of the RPi boards. Edge cards are bit more rugged as compared to regular Ultra and they were at about similar price. Coupled with a small UPS, chances of abrupt power failures are very low then.

Sure mSATA based SBC could be used to boot the device off, and definitely, but I assume RPi was designed for a different purpose and we all start using it for the needs beyond those limitations. While I read mSATA can be used to boot the RPi, but linkage to the bus is at USB 2.0 in older models and hopefully it is now USB3 speed in RPi 4, so that should make it work better. And Hopefully mSATA power draw will be lot less to not cause issues. For my application, I am satisfied with the SD card and maybe for future use cases, mSATA 16/32GB can be leveraged but it with then require an external enclosure.

https://www.tomshardware.com/how-to/boo ... y-pi-4-usb
User avatar
Joulinar
Posts: 2085
Joined: Sat Nov 16, 2019 12:49 am

Re: Recommneded Reliable micro SD Cards for Power outage situations

Post by Joulinar »

ok, I marked the issue as solved. Hope that's fine with you.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
WarHawk
Posts: 610
Joined: Thu Jul 20, 2017 8:55 am

Re: Recommneded Reliable micro SD Cards for Power outage situations

Post by WarHawk »

Joulinar wrote: Fri Aug 07, 2020 11:34 pm I'm using a SanDisk Ultra 32GB microSDHC Class 10, A1. The SD Card survived tons of re-flashing in meantime :)
Yup...SanDisk Ultra is one of the best to go with...good read/write speeds too
Post Reply