*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Rep:
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
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Original Poster
Rep:
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!
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/
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Original Poster
Rep:
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?
Distribution: FreeBSD, Fedora, RHEL, Ubuntu; OS X, Win; have used Slackware, Mandrake, SuSE, Xandros
Posts: 448
Original Poster
Rep:
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.