Is there a way to have FreeNAS reboot on panic crashes?

Status
Not open for further replies.

indivision

Guru
Joined
Jan 4, 2013
Messages
806
I have been troubleshooting an issue where FreeNAS occasionally crashes on one machine (runs stable on a second that I have set up). As an experiment, I ran NAS4Free on this machine. But, that also crashes.

There seems to be a significant difference in how crashes are handled between FreeNAS and NAS4Free. In NAS4Free, the panic text was saved to the log files and the system automatically reboots itself. FreeNAS seems to get stuck showing the "db>" prompt with all services unavailable.

The server I'm setting up only receives rsync updates. So, it may be a tolerable scenario that it reboot itself from time-to-time, as long as it gets itself back on-line without me having to manually reset it every time.

Is it possible to configure FreeNAS so that it reboots itself when a crash like this occurs, similar to NAS4Free?
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Rather than trying to get FreeNAS to reboot, when it crashes, you need to figure out why it's crashing. Sooner or later, you'll probably end up with corrupted files and it appears, from your other threads, that this is probably the backup for your other FreeNAS server.

Most likely, it's a hardware problem. Test the ram with MEMTEST. If that's okay, test the rest of the hardware.

Last year, I started experiencing kernal panics [had been fine for months] within a minute of startup. I couldn't determine the problem easily and since time is a precious commodity, I just bought new hardware (except for the disks) and my problem disappeared.
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
Thank you.

I do plan on continuing to troubleshoot why it crashes. I'm not ready to post a thread about that issue here yet because I've found existing info here and there that has given me leads to test. But, they're the type of thing where I have to make some adjustments and then just wait to see if it happens again. So, it takes time.

In the meantime, I think that having the system try to recover itself would be better for my purposes (even once both systems are stable). Anyone have any ideas? Doesn't seem like that functionality could be that far away given that NAS4Free does it as a default...
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
Now that's easy. Thank you!

Is there a way that I can go back and see what the error messages were in a log somewhere? (I'm pretty green with FreeBSD)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'm not sure if there's a way to see what the error is except to see the kernel panic on your screen when it happens. A kernel panic is basically the OS saying "something is horribly wrong and I've decided its safest to stop the system than risk corrupting data".

Generally, a kernel panic is the result of either a component in the system failing/not compatible with FreeBSD/FreeNAS or a corrupted system configuration.

Honestly, while it sounds tempting to let a system reboot automatically on a system failure, I think this may be a very very dangerous thing to do. The cause of the panic should be indentified and fixed or else you may experience a loss of data or other nasty consequences.
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
I think that there is a way to log and see the data and still auto-recover. In NAS4Free, it auto-reboots. But, then the same error messages I can see when FreeNAS goes into db mode are included in the NAS4Free email logs. Whether or not it's easy to configure....?

I agree that it needs to be diagnosed. But, I have another, stable server with a good amount of protections/redundancy. This second server I'm troubleshooting isn't really doing anything critical. I put it together because I had the extra parts lying around. :) That's why I'm willing to be more casual with it.
 
Status
Not open for further replies.
Top