LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 06-30-2009, 03:27 PM   #1
silentwol
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Rep: Reputation: 0
'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!
 
Old 06-30-2009, 03:56 PM   #2
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
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!
 
Old 06-30-2009, 09:20 PM   #3
camelrider
Member
 
Registered: Apr 2003
Location: Juneau, Alaska
Posts: 245

Rep: Reputation: 31
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).
 
Old 07-01-2009, 03:01 AM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unclean shutdown...now...... S...L....O....W LarryFrigginWachs Linux - Newbie 4 12-29-2006 03:28 PM
Guaranteed filesystem corruption on unclean shutdown? pigsa Linux - Software 7 12-10-2006 07:41 AM
Unclean Shutdown: X Libraries Reported As Missing on Reboot weibullguy Linux - Newbie 11 06-30-2006 11:58 AM
Fedora Core 2 logout causes unclean shutdown Ethan Linux - General 0 10-12-2004 02:57 PM
httpd: Unclean shutdown of previous Apache run mfitzpat Linux - Software 1 04-14-2004 03:08 PM


All times are GMT -5. The time now is 12:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration