LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Best way to do a fast but non-harmful shutdown? (https://www.linuxquestions.org/questions/linux-hardware-18/best-way-to-do-a-fast-but-non-harmful-shutdown-4175486286/)

albinard 11-29-2013 04:37 PM

Best way to do a fast but non-harmful shutdown?
 
I'm running 3 independent desktops (not networked), with a rather low-end battery backup. Line power failures aren't unusual, so I'm trying to figure out the best way to do a prompt shutdown at minimal stress to the machines. Given three choices, which do you consider preferable:

1. sudo shutdown now -h -P
2. 4-finger salute: Ctrl-Alt-SysRq-o
3. Hold power button 5 seconds

Or are they all about the same? TIA for any comments and suggestions!

Shadow_7 11-29-2013 05:50 PM

You can have acpid running and installed. When you push the power button on the box it triggers option number one.

Number 3 is not advised if you're not on a journaled filesystem. And not without risk if you are. Doing fsck on a 1TB ext2 filesystem could take quite a chunk of time on the next boot.

jefro 11-29-2013 07:39 PM

Might be a way to change how disk caching is being used so that the #3 option isn't so bad.

We've pulled the plug on QNX and dos for decades without an issue.

albinard 11-29-2013 10:02 PM

Thank you, Shadow 7! It turns out the man page for acpid has this very thing as a how-to example. I have marked the thread as solved.


All times are GMT -5. The time now is 08:02 AM.