Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How can I shut down gracefully?

Featured Replies

I am running a headless UnRaid server with OS version 4.3.1.  Over the weekend my LAN router went down and now I can't get to UnRaid from the web interface.  How can I shut the server down?  It's headless, so no direct access, and connecting it directly to a PC still hasn't allowed me to see it and send any commands.  Suggestions?  I hear that pulling the plug is best avoided!

 

Thanks,

 

Dave

Connecting directly usually requires a crossover cable and that you use the IP address of the server, since there is no router to translate the server name to an IP address.

 

If you have such a cable and know the IP address, it might work...

 

If you are not currently writing or reading from the disks pulling the plug might be the easiest way...  If you had installed the add-on "powerdown" package then ctl-alt-delete on a keyboard attached would shut you down cleanly too.  If not, hut the power switch... you will just reboot upon power up and it will start a full parity check.  Let it complete.

  • Author

 

If you have such a cable and know the IP address, it might work...

 

 

 

Afraid I have neither!  I'll hit the power switch and hope for the best when I check parity. 

 

Thanks, Joe!

The only other alternative is to plug in a monitor and keyboard... (assuming you have a video card installed)

You can plug in a USB keyboard and then type "powerdown" (if you have it installed).  If not, there is a series of commands that will cleanly stop the array in most cases. Since you will be typing blind, try not to type any commands to reformat your hard disk (only kidding):

samba stop

 

umount /mnt/disk1

umount /mnt/disk2

... etc

 

mdcmd stop

poweroff

 

Shutting down by powering off is not as bad as you might think... it just mandates a full parity check on reboot.  If you were not in the middle of writing a file to the server when your router went off-line, your data is probably just fine.  The reiserfs file-system is very good at recovering from these types of shutdowns. (in the syslog you may see one or more transactions replayed from the journal it keeps when you reboot)

 

Joe L.

crossover cable not needed with gige, it is automatic.

 

  • Author

I didn't realize a headless machine could regain its head, i.e. it would recognize a keyboard and monitor after the fact.  That made things easier!

 

Dave

I didn't realize a headless machine could regain its head, i.e. it would recognize a keyboard and monitor after the fact.  That made things easier!

 

Dave

The monitor is probably not an issue, and a USB keyboard would probably be detected just fine as a hot-plug event.  (I don't know about a PS2 serial keyboard... it might not)

 

Did it work?

 

Joe L.

I didn't realize a headless machine could regain its head, i.e. it would recognize a keyboard and monitor after the fact.  That made things easier!

 

I couldn't let that pass without a comment.  I have always understood that PS/2 and VGA connections are NOT safe to connect while 'hot', machine turned on.  That *may* have changed recently, but not that I have heard, and I or someone should probably research it, for the current 'wisdom'.  USB keyboards are safe, should work fine.  But in the past, I have understood that it was possible to fry a motherboard, more commonly with a VGA connection than a PS/2 connection, if both computer and monitor were already on when plugged in.  If someone has better information, I'll be happy to stand corrected.  The fact that many fellow geeks have often gotten away with it, does not make it a safe practice.

My video cards/onboards never seem to recognize a monitor properly if it is plugged in or turned on after booting. If the monitor was there when it booted it can be turned back on or plugged back in. Over all though, it is not a good practice and could damage the video card.

 

Actually, I think my HTPC is OK with the HDMI cable to the TV being plugged in after booting but I understand that HDMI is a hot-pluggable interface.

 

USB on the other hand, I have a wireless Gyration and have plugged it in and out of the server a bunch and no problems being recognized.

 

Peter

 

You've convinced me, my advice of hot plugging a monitor might not work, and if you shorted things out, may cause damage.

 

Hot-plugging a USB keyboard would work... Neither would give you back the web-based management console, so you are still unable to cleanly stop the array unless you type a series of unix commands or had previously installed the powerdown package (which in turn has a similar series of commands)

 

For most people, once a keyboard is attached, about the best you could do is type ctl-alt-del and let it reboot, or type powerdown and let it shut down, since you are going to be doing it blind.   

 

For the record, I have a monitor on my server, but it is usually powered off.  About the only time it is powered up is if I am looking at the BIOS or using the start-up-menu to run memtest, or choose to boot an alternate kernel image.

 

Joe L.

  • 2 weeks later...
  • Author

Hi guys.  I had to leave town, so just got back to this.

 

I was able to plug in a VGA monitor and a PS/2 keyboard.  Nothing fried, and both made the connection and did the trick.  I shut down the box and am now running a parity check.  No errors as yet, but it's running very slow. It's between 5,000 and 10,000KB per second and there is about 2200 minutes remaining.  Yikes!

 

On previous checks I'd seen dips to this speed, followed by recovery up to 50,000 or so.  Any cause for concern?

 

Dave

Need to see your syslog, so please see my sig for the Troubleshooting link, for help with capturing a syslog.

 

  • Author

Now at about 30% and some errors have started to appear on one drive, the one I'd previously been keeping an eye on.  That's probably the culprit.

 

RobJ, should I:

 

1) Stop the check and send the syslog?

2) Complete the check and send the syslog?

3) Send the syslog while doing the check, if that's possible?

 

Thanks,

 

Dave

Now at about 30% and some errors have started to appear on one drive, the one I'd previously been keeping an eye on.  That's probably the culprit.

 

RobJ, should I:

 

1) Stop the check and send the syslog?

2) Complete the check and send the syslog?

3) Send the syslog while doing the check, if that's possible?

 

Thanks,

 

Dave

#3, easily possible
  • Author

Here's a syslog (truncated) and a SMART report from the drive which is showing errors.  It has held steady at 15 reallocated sectors since I first noticed it had them.

 

Thanks for the help!

Good news!  SMART report shows 2 indications of a bad cable (current ICRC errors in error log and very very high UDMA error count), and all of the syslog errors are also completely consistent with a very bad cable!  There are no indications of disk errors beside that!  I would stop the check, stop the array and shutdown, replace that cable immediately, and try again.

Off-topic, but could not help being intrigued by this line, concerning your Sandisk flash drive:

kernel:  sdg: sdg4 

 

Just guessing here, but you found a way to keep the U3 partitions, shrink them, carve out another for unRAID, make it the only active one, and bootable?  Impressive!

  • Author

Rob,

 

Followed instructions and early indications are that I'm back in action!  Parity check now running at approx. 50,000KB, which is in line with previous checks.  Thank you!

 

Regarding my flash stick, afraid my formatting recipe is top secret. So secret that I don't have a clue what I did!!

 

Dave

Off-topic, but could not help being intrigued by this line, concerning your Sandisk flash drive:

kernel:  sdg: sdg4 

 

Just guessing here, but you found a way to keep the U3 partitions, shrink them, carve out another for unRAID, make it the only active one, and bootable?  Impressive!

 

I'm pretty sure that means that his flash drive is formatted USB-ZIP... if i'm not mistaken, zip format uses partition 4 not 1 as the "primary" partition (very loosely speaking).

 

Cheers,

Matt

I'm pretty sure that means that his flash drive is formatted USB-ZIP... if i'm not mistaken, zip format uses partition 4 not 1 as the "primary" partition (very loosely speaking).

 

Very interesting!  Thank you!  It's the first time I have seen that.

  • Author

I don't recall deviating from "standard instructions" when I did the initial format.  I do believe I formatted for USB-ZIP, but can't tell you what happened with the partitions.

 

I don't know enough abot Linux to have consciously done anything clever!

I'm pretty sure that means that his flash drive is formatted USB-ZIP... if i'm not mistaken, zip format uses partition 4 not 1 as the "primary" partition (very loosely speaking).

 

Very interesting!  Thank you!  It's the first time I have seen that.

 

http://www.pendrivelinux.com/booting-linux-from-usb-zip-on-older-systems/

 

This is where I got it from, the second paragraph.  No real explanation though (more just a statement of fact).  Does anyone have a better reference?

 

Cheers,

Matt

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.