LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
Search this Thread
Old 07-28-2003, 09:12 AM   #1
deesto
Member
 
Registered: May 2002
Location: NY, USA
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448

Rep: Reputation: 31
Crash after power failure


I have a FreeBSD 5.0-RELEASE machine that was running 24/7 for about a month, hosting my web server. Unfortunately, yesterday our area experiences a series of power outages, one apparently long enough to have drained my UPS, and the BSD machine crashed as a result.
When trying to bring the machine back up, it complained about slices on the primary slave hard drive (which the BIOS detected just fine) as being unavailable or not existing. I booted and logged in as root using the default shell, and 'mount -a' and 'fsck' both complained in the same manner about the drive.
I then rebooted and was presented with the same problems (prompted for default shell, same hard drive unavailable).
What do I need to do in order to recover from the crash?
Thanks,
John
 
Old 07-28-2003, 01:23 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
You could try using "dd" to copy the data onto another drive and accessing the data from there.

I would also reccomend installing some sort of autoshutdown software that will power down your server if this happens again.
 
Old 07-28-2003, 05:02 PM   #3
jvds
Member
 
Registered: Jul 2003
Posts: 88

Rep: Reputation: 15
Do you the BIOS can't see that hard disk or just FBSD? Does fdisk -l /dev/ad0 show anything?

Rus
 
Old 07-28-2003, 09:36 PM   #4
deesto
Member
 
Registered: May 2002
Location: NY, USA
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448

Original Poster
Rep: Reputation: 31
Hmm... funny you should ask, because "fdisk -l /dev/ad0" uses an illegal option "l"... if I remember correctly, that stands for "list" in Linux, but does not work in BSD.
At any rate, I fired up the machine to try your suggestion, and I suppose the fourth or fifth time is the 'charm' in my case, because it booted straight into the login prompt--of course, there are a slew of errors reported during the boot, and there's a painfully long delay between when I enter my user name/password and the system moving on to the next step, and it looks like some files may have been damaged in the crash. But I hope these are things I can hack through as I continue to recover the system.
Any suggestions aside from 'fsck -y' are helpful and greatly appreciated.
Thanks!
 
Old 07-29-2003, 12:17 PM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
To reply to your mail - ti is a while snce I used dd to copy a drive but this should work assuming hda is dead and hdb is the destination:
dd if=/dev/hda of=/dev/hdb

Make sure you unmount any used partitions first.

To make your PC shutdown you will need software that can communicate with your UPS. If it is an apc device then look at:
http://www.apc.com/tools/download/
 
Old 07-29-2003, 12:40 PM   #6
jvds
Member
 
Registered: Jul 2003
Posts: 88

Rep: Reputation: 15
TBH sounds like the drive is dying...I would put in another and copy of what you can

Rus
 
Old 07-29-2003, 12:56 PM   #7
deesto
Member
 
Registered: May 2002
Location: NY, USA
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448

Original Poster
Rep: Reputation: 31
Thanks for the advice. I've backed up everything on that drive (which was pretty easy as it's just server data). I thought at first the drive was on the outs as well... but it now seems fine, no more disk errors being reported, the web pages are being served as normal, no signs of ill doing... almost as if the file system was healing itself! What's going on, and how do I learn more about it?
 
Old 07-29-2003, 12:57 PM   #8
jvds
Member
 
Registered: Jul 2003
Posts: 88

Rep: Reputation: 15
If it was hitting a dogey part of the disk then it could be the disk is on the way ut. Anything in dmesg?

Rus
 
Old 07-29-2003, 01:11 PM   #9
deesto
Member
 
Registered: May 2002
Location: NY, USA
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448

Original Poster
Rep: Reputation: 31
No, I don't think so, just a message that the filesystems were not properly dismounted (I assume that was during the last boot?), and the following error messages, which are repeated multiple times and which I assume have nothing to do with the hard drive:

dc0: failed to force tx and rx to idle state
psmintr: delay too long; resetting byte count
 
  


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
need help.. power failure now no boot vbtalent Fedora 2 11-02-2005 06:51 PM
Power Failure On AC power ONLY Gateway 5300 marti35 Linux - Laptop and Netbook 1 05-22-2005 10:14 AM
rc.local and power failure omnia Red Hat 2 01-04-2005 10:40 AM
help!, power failure, fsck lin00b Linux - Newbie 3 08-19-2004 05:48 AM
power failure = no root tobysaville Linux - General 1 06-22-2004 06:39 AM


All times are GMT -5. The time now is 06:57 PM.

Main Menu
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