What would happen to the unraid server in a power cut?


pras1011

Recommended Posts

  • 2 weeks later...

Hi,

 

i got my APC today. The battery ist full loaded and now i will test the apc if it work with my server and look that the server will shutdown. But how could i test this in best way ?

 

Stop array, wait that all disks are unmounted and then pull the power cable off ? Or what is the best way to test it ?

 

Greets

Eisi

 

Link to comment

First you need to install apcupsd (easiest way is through the package installer in unMenu).  Then you can just pull the plug on the APC, no need to stop the array or do anything else.  The APC should tell the server to shut down gracefully once the battery is almost empty.

 

Need to install the Powerdown package also.

Link to comment

Question to the community regarding a UPS test (and sorry if it is semi-hijacking):

 

It seems to be good form to stop the array (in the event that something doesn't work and the server isn't shutdown properly).  However,  I want to test if the clean powerdown package will appropriately kill anything that is active.  For example, I need to shutdown sabnzbd+ before I stop the array, as it prevents unmounting.  In a blackout scenario, I might not be around to shut it down.  Any suggestions on how I can test this?  Or perhaps should I just call the clean powerdown from a terminal session to test that part?

 

Thanks!

Link to comment

Once you have the powerdown package installed, you can invoke it from the terminal or telnet by logging in and entering 'powerdown'.  You should also be able to press the power button on your server (it works on mine).  If it works, you should then be able to start up cleanly and the array will start with no parity check.  You'll also see a new date-stamped syslog saved to your flash drive in the 'syslogs' folder.  If it doesn't work, then you'll see a parity check running when you start back up, and no new syslog saved.

 

Personally, I would just test it in the worst case scenario - blackout conditions, as you described.  The worst that will happen if it doesn't work is that your server will run a parity check when it starts up again.

Link to comment

Outstanding.  Thanks, Rajahal.  I went ahead and just pulled the plug with my running-as-normal setup.  Aside from the annoying beeps and high-pitch static sound from the UPS, everything worked perfectly.  After some time, the apcupsd 3.14.3 package stopped the array and shut everything down.  After reboot, all is back--no parity check!  I don't know why I've waited so long to test this, but it definitely gives me peace of mind now, as I have had quite a few blackouts in the last 6 months (thanks SDG&E!).  It's also pretty cool  ;D

 

I always like running things at the newest version of everything, but since the older apcupsd package worked perfectly, I think I'm not going to mess around with that.

Link to comment

I had a power outage a month or so ago and it lasted of course 3hours well beyond my UPS's.

 

My unRAID server, Desktop Pc and my Sat/DVR all have their own UPS's. Of course I come into my office and it dawned on me. None of them have monitors so I couldn't login and shut them down welp I could my Sat by pushing in the power button lol. I just walked away praying that they would shut down gracefully.

 

Anyways After power was back on I turned on both PC's and sure enough they fired up just normal like they should. Its nice having a good UPS and software and a cable that does its job well.

Link to comment

Hi,

 

after installing the software for the apc in my logfile is this message:

 

apcupsd FATAL ERROR in device.c at line 70 Unable to create UPS lock file.   If apcupsd or apctest is already running,   please stop it and run this program again.

 

what does this message mean ?

 

Greets

Eisi

 

It means the program was probably already running.

 

What happens if you type:

/sbin/apcaccess status

 

If you get a response, it is running already.

Link to comment

Hi

 

it seems to be running:

 

login as: root

root@server's password:

Linux 2.6.32.9-unRAID.

root@Server:~# cd ..

root@Server:/# /sbin/apcaccess status

APC      : 001,044,1086

DATE    : Wed Dec 15 16:23:22 CET 2010

HOSTNAME : Server

RELEASE  : 3.14.3

VERSION  : 3.14.3 (20 January 2008) slackware

UPSNAME  : Server

CABLE    : Custom Cable Smart

MODEL    : Back-UPS CS 650

UPSMODE  : Stand Alone

STARTTIME: Wed Dec 15 12:12:13 CET 2010

STATUS  : ONLINE

LINEV    : 228.0 Volts

LOADPCT  :  17.0 Percent Load Capacity

BCHARGE  : 100.0 Percent

TIMELEFT :  43.2 Minutes

MBATTCHG : 19 Percent

MINTIMEL : 5 Minutes

MAXTIME  : 300 Seconds

OUTPUTV  : 230.0 Volts

SENSE    : Low

DWAKE    : 000 Seconds

DSHUTD  : 000 Seconds

LOTRANS  : 160.0 Volts

HITRANS  : 278.0 Volts

RETPCT  : 000.0 Percent

ITEMP    : 29.2 C Internal

ALARMDEL : Always

BATTV    : 13.6 Volts

LINEFREQ : 50.0 Hz

LASTXFER : No transfers since turnon

NUMXFERS : 0

TONBATT  : 0 seconds

CUMONBATT: 0 seconds

XOFFBATT : N/A

SELFTEST : NO

STATFLAG : 0x07000008 Status Flag

SERIALNO : 3B0711X28512

BATTDATE : 2007-03-23

NOMOUTV  : 230 Volts

NOMINV  : 230 Volts

NOMBATTV :  12.0 Volts

NOMPOWER : 400 Watts

FIRMWARE : 817.v4.I USB FW:v4

APCMODEL : Back-UPS CS 650

END APC  : Wed Dec 15 16:23:22 CET 2010

root@Server:/#

 

Are all settings ok from my apc ?

 

Greets

Eisi

 

Link to comment

Looks good to me.

 

You've got an estimated 43 minutes of runtime.  You've got it set up to shut down when either 5 minutes outage have

occurred, or when the estimated time left was 5 minutes, or when the estimated battery charge is down to 19%

 

You are using 17% of the 400 watt capacity, so your server is probably drawing about 68 watts from the wall outlet. 

(or rather, that is what the UPS thinks it is drawing)

 

Joe L.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.