LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   'shutdown' command causing unclean shutdown (https://www.linuxquestions.org/questions/linux-software-2/shutdown-command-causing-unclean-shutdown-736753/)

silentwol 06-30-2009 02:27 PM

'shutdown' command causing unclean shutdown
 
Hi, hope you can help. I keep getting the error "unclean shown down detected" on booting up, requiring an fsck.

I'm running a nightly backup script, which when finished immediately issues the command:
Code:

sudo shutdown -h now
Could this be causing the unclean shutdown, but shutting down immediately after a lot of writes to the HDD?

I've cycled through some 'normal' restarts in KDE and I don't get the error. Could it be the above shutdown command? Would simply delaying the shutdown fix this issue?

Thanks!

Poetics 06-30-2009 02:56 PM

Have you shut down the machine in the past and not received that message? If so, how did you do it?

Do you receive the same if you restart (shutdown -r now)? It should use the same process.

Could it be that a flag is not being set, registering the machine as having shutdown uncleanly, though the incident in question has long since passed?

Edit: Welcome to LQ!

camelrider 06-30-2009 08:20 PM

You might try some "sleep" between the end of the backup and the shutdown command to enable write cache to be flushed (if this is a bash script).

chrism01 07-01-2009 02:01 AM

Try issuing a couple of
sync
cmds to force buffer flushing. System should do it anyway, but no harm in making sure.


All times are GMT -5. The time now is 09:39 AM.