Go to Post It's a club if you have a bunch of people who hang out and do nothing - It's a team if all you all work together and cooperate to win. - Tytus Gerrish [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-02-2016, 07:35
viggy96 viggy96 is offline
Registered User
FRC #3331
Team Role: College Student
 
Join Date: Jan 2015
Rookie Year: 2010
Location: Charlotte
Posts: 52
viggy96 is infamous around these partsviggy96 is infamous around these parts
Quote:
Originally Posted by Jared View Post
Please don't give out misleading information on the internet based off of personal experience. The raspberry pi has documented issues that occur when power is cut, and it runs Linux.

The issues is more about hardware than software. The FTL (flash transition layer) will remap storage on the fly as part of its wear leveling feature. If you kill power during a remapping, you pretty much lose the whole disk. This is different from flash storage on something like a roboRIO or a wireless router, which doesn't have that additional layer of abstraction.

Linux does care when its file system is no longer usable.
Quote:
Originally Posted by Foster View Post
/sigh. No computer system that I've used from mainframes to Raspberry Pi, from MCP to Unix, including Windows and Linux deals well with hard power off when there are IOs in process. You've been lucky.

Lots of people have borked the SD card in a Raspberry Pi. The OP asked a good question, and people are trying to help. Your "whistling in the dark" isn't productive and I predict that someday you will either spend the night hand sewing inodes to restore a file system, or spend most of the day hoping your backup system really works while you boss yells at you about lost orders.
Hmmmm... Let's see, first, was referring purely to the software when I made those statements, not the hardware, and yes you can run into issues dealing with the SD card if the power is suddenly cut, IN SOME CASES. If you have set it up, correctly, and are using it as a vision co-processor, all you are doing is cutting the power while a programme is running. I have done exactly this hundreds, actually thousands, of times, with a Pi B+. I have used it for vision, and just unplugged it to turn it off. Every time, it booted correctly the next time I needed it. Of course, during setup, I made sure to never to that.

So please folks, don't question my intelligence.
  #2   Spotlight this post!  
Unread 18-02-2016, 10:24
techhelpbb's Avatar
techhelpbb techhelpbb is offline
Registered User
FRC #0011 (MORT - Team 11)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 1997
Location: New Jersey
Posts: 1,620
techhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond repute
Re: Shutting Down a Robot-Mounted Pi

Quote:
Originally Posted by viggy96 View Post
Hmmmm... Let's see, first, was referring purely to the software when I made those statements, not the hardware, and yes you can run into issues dealing with the SD card if the power is suddenly cut, IN SOME CASES. If you have set it up, correctly, and are using it as a vision co-processor, all you are doing is cutting the power while a programme is running. I have done exactly this hundreds, actually thousands, of times, with a Pi B+. I have used it for vision, and just unplugged it to turn it off. Every time, it booted correctly the next time I needed it. Of course, during setup, I made sure to never to that.

So please folks, don't question my intelligence.
It is possible if you are running Arch Linux with the swap file OFF that your systems will only be writing to storage when and if your application writes to storage. Raspbain quite often has swap enabled and written to the SD card. Depending on how swappiness (yes that's not made up it's a real thing) is setup your kernel may or may not use that swap if the memory space of your application starts to use up too much of the system's actual RAM.

This is not to question to you, or anyone's intelligence, just a point that currently I have 50,000+ copies of Linux online and running in various public and private clouds and datacenters. The smart thing to do is do a proper shutdown unless you know for a fact you've controlled the risk or have no better option.

For example I used to take Dell OptiPlex systems I had as leftovers from upgrades and put Ubuntu on them. Mess with the disk settings to spin down the hard drives and spin them up only on demand or every 6 hours (which ever was first and then spin them back down in 5 minutes). I would increase the write cache large enough that casual writes would come back from memory. I would remove the swap so that would not qualify to spin up the hard drive. Most of the drives lasted beyond 8 years and those that did not were already questionable (had de-allocated bad sectors that weren't mapped at the factory). These systems were used for print server farms like a giant version of the HP JetDirect driving down the cost of the printers because we could print to CUPS raw queues from Windows happily.

So again - there's plenty of simple ways shown here to accomplish this task from using a button and a script or SSH.
Why run any risk you don't need to?
Unlike other applications out there you really might take the chance you have an issue in the next match that hurts your competitive edge.

Last edited by techhelpbb : 18-02-2016 at 10:28.
  #3   Spotlight this post!  
Unread 18-02-2016, 20:32
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Shutting Down a Robot-Mounted Pi

As long as you never write the SD card, then the SD card's wear leveling feature shouldn't try to move blocks around.

This requires:
-Disabling swap entirely (it's generally a good idea to disable virtual memory entirely on real-time systems anyway)
-Mount the SD card as read-only
-Mount the temp directory onto a RAM disk

There are some tutorials on the internet explaining this, there are a lot of nuances since a number of automatically installed packages will try to write to disk (including syslog and fake-hwclock among others). Once you take care of all of those, you can set the fstab to mount the partition as read only so no program can write to the disk.

It's certainly possible for a carefully designed system to be turned off by pulling power. Virtually all embedded systems including the roboRIO operate in this way.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 19:43.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi