Recovering unRAID

If you have a server running unRAID you will know that it's usually quite stable and simple to use. When things go wrong however, is where you will need some Linux commands at hand to help you get back on track.

Given that unRAID is managed using the web interface, what happens when it stops responding for some reason? If you installed VirtualBox without having a reasonable amount of RAM available, the OOM Killer may accidentally have killed the web server.

There are a few steps you can take to manually stop the raid and reboot the machine to a running state.

First stop the sharing service to make sure that no one is reading the filesystem and locking files:

/root/samba stop

Now continue with stopping all your user services, like Plex, VirtualBox or anything else running before continuing with unmounting the devices with:

umount /dev/md*

If you are using a cache drive, you will probably have a swap image on it, so unmount all swap space:

swapoff -a

Kill the internal webserver if it's still running:

killall emhttp

If you still get an error when unmounting the cache drive with umount /mnt/cache, try the following command to see which processes are locking the filesystem:

fuser -mv /mnt/cache

Even though it's advicable to stop the services using proper methods, this command can be used as a last resort to kill all processes holding the cache drive locked:

fuser -mvk /mnt/cache

Now you should be able to unmount the cache drive and reboot the system. If the problem resides with a plugin you just installed, consider disabling it as well before rebooting.

umount /mnt/cache reboot

That should hopefully be enough to reboot unRAID in a clean way and not be required to do a parity check on next boot.