Jump to content

safe reboot from command line?


Recommended Posts

Can someone please tell me the proper way to safely reboot my server from the command line?  Unfortunately I cant get the SimpleFeatures GUI to load so i have to reboot my server.  Without the SimpleFeatures GUI i will need to do this via a command line.  I am running the latest 5.x rc.

 

I know that the powerdown command has worked for me in the past but I need to ensure that the system is rebooted and not shut down.

Link to comment

If you have the clean-powerdown command installed, you can simply type:

/sbin/powerdown

 

If not, the instructions are in the wiki here for the individual commands needed to stop the array:

http://www.lime-technology.com/wiki/index.php/Console#To_cleanly_Stop_the_array_from_the_command_line

 

You can verify the status by typing:

cat /proc/mdcmd | grep mdState

 

Once stopped, you can simply type

reboot

 

 

Link to comment

so /sbin/powerdown will reboot the server?  not just power it down?

It will probably power it down if just invoked as I described.

 

To reboot, I think you can add a "-r" option to it (disclaimer, I've never tried it, and it entirely depends on your hardware, since the -r is eventually passed to the native powerdown command, and to it, -r indicates reboot.)

/sbin/powerdown -r

Link to comment

ok so I just ran it with the -r and so far this is what I have...

 

Capturing information to syslog. Please wait...
version[19198]: Linux version 3.4.36-unRAID (root@Develop) (gcc version 4.4.4 (GCC) ) #1 SMP Wed Mar 20 12:54:40 PDT 2013
ls: cannot access /dev/hd[a-z]: No such file or directory
ls: cannot access /dev/hd[a-z]: No such file or directory
/etc/rc.d/rc.unRAID: line 84: ${FILE}: ambiguous redirect
/etc/rc.d/rc.unRAID: line 84: ${FILE}: ambiguous redirect
/etc/rc.d/rc.unRAID: line 84: ${FILE}: ambiguous redirect

 

and now its just hanging - no other response in telnet session for a good 20 minutes now.

Link to comment

ok so I just ran it with the -r and so far this is what I have...

 

Capturing information to syslog. Please wait...
version[19198]: Linux version 3.4.36-unRAID (root@Develop) (gcc version 4.4.4 (GCC) ) #1 SMP Wed Mar 20 12:54:40 PDT 2013
ls: cannot access /dev/hd[a-z]: No such file or directory
ls: cannot access /dev/hd[a-z]: No such file or directory
/etc/rc.d/rc.unRAID: line 84: ${FILE}: ambiguous redirect
/etc/rc.d/rc.unRAID: line 84: ${FILE}: ambiguous redirect
/etc/rc.d/rc.unRAID: line 84: ${FILE}: ambiguous redirect

 

and now its just hanging - no other response in telnet session for a good 20 minutes now.

Assuming it stopped the array, (check using

cat /proc/mdcmd | grep mdState

as stated above) you can probably just type

reboot

at this point.  (Obviously, it did not shut-down.  Also obvious, the "-r" option to rc.unRAID (part of clean powerdown) is broken)

Link to comment

Do you have any files open anywhere? Close them if you do. Close any open shares you have open in Windows. Make sure you are in the root directory in your telnet session (type "cd /" to go to the root directory) as even accessing a share through telnet can prevent the array from stopping. Also check to make sure there aren't any plugins or anything keeping the array from stopping. Type ps-ax and see if you see any processes from any plugins you have running. If there are, kill the process by typing "kill" and the PID number.

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.

×
×
  • Create New...