Jump to content

Problems shutting down on 5.0-rc12a


f2000

Recommended Posts

I recently got my nas box up and running, with sab/sb and cp all working. However, now when I stop the array, it hangs when trying to close user shares (I cannot for life of me remember the exact wording, Im currently at work). Im using the web interface to stop the array > safely shutdown system.

 

Since it hangs/crashes, I then use putty to

 

shutdown -h now

 

Is this ok, or should I be using another command/method?

 

I originally went with 5.0-rc12a, as it was the top link (plus hot!), but I now think perhaps 4.7 would of been a better idea. Any thoughts or advice welcome.

Link to comment

If you use the SAB/SB and CP plugins then you cannot use 4.7 as it does not support the plugins architecture.

 

An exact wording and syslog is needed to debug the issue.

 

Also what does lsof /mnt/* and fuser -mv /mnt/* print out?

 

Link to comment

I had to double take, damn fast reply haha! Thanks for letting me know about how 4.7 is incompatible with the plugins, glad I did bother using it now. Yeah, I was clutching at straws with the wording, i will get this tonight after work...my apologies regarding that...something like

 

"Retrying to close user shares" "Retrying to close user shares" "Retrying to close user shares"

 

...and this continues down the screen until I use the shutdown command. I will find the system log and past that also.

 

Cheers for the advice

Link to comment
...something like

 

"Retrying to close user shares" "Retrying to close user shares" "Retrying to close user shares"

 

...and this continues down the screen until I use the shutdown command. I will find the system log and past that also.

 

This usually means that some process is holding a file or share open - even a telnet session with the current directory set to a user share.

 

Yes, the commands theone has posted will help to identify the culprit.  Initiate your array stop, then telnet in (or use the console) to issue those commands.

Link to comment

one of your add-ons is preventing the array from stopping since it is still using the disks.  The disks cannot be un-mounted while still being used.

 

You must stop your add-ons before you stop the array. (or install improved versions that will stop properly on their own when the array is in the process of being stopped.  Most add-ons have had updated versions released that do stop themselves)

 

shutdown -h is not going to cleanly stop your array.  You risk file system corruption if it is not stopped cleanly and not stopping the array cleanly will also mandate a lengthy parity check upon restart, so you are better off stopping the array from the command line first before using "shutdown".  (see the wiki for how http://www.lime-technology.com/wiki/index.php/Console#To_cleanly_Stop_the_array_from_the_command_line )

Link to comment

Woah, I go out for lunch and I have 3 more replies, you guys work fast haha!

 

@Peter

Hmm, I may have opened putty the second time as I was prepared for it hanging after it did this the first time...but I will double check this (incase I'm mistaken)

 

@theone

I have a "handy command" txt file on dropbox, I added both "lsof /mnt/*" and "fuser -mv /mnt/* print out", I will try them out tonight when I return from work (I see people can connect to their box from outside, I will get this setup soon). Thanks for your help here, Linux isnt my strong point (windows background), so I appreciate the commands also.

 

@Joe

Regarding the plugins, I installed via Influencer/UNplugged at GitHub (following the unraid wiki), not sure if they have this option to shutdown when the array is being closed...but I will try this manually (stopping sab etc first, then stopping the array).

 

I'm checking out "To cleanly Stop the array from the command line" (thanks joe) and this is nothing like what I was doing before...I hope I haven't caused any damage to my data.

 

great advice guys, thanks a lot

Link to comment

It's OK to have a telnet or console session as long as the current directory of the session is not in /mnt/*

 

In fact you will need a telnet or console session to cleanly stop the array from the command line.

 

As for Influencer's unplugged plugins, I have not tried them all and I only use Transmission at the moment, but as far as I know they stop themselves unless you have broken them in some way.

 

/sbin/powerdown always works for me but you may have to install it. You can install it from unMenu and I think it is included in apcupsd plugin.

 

 

Link to comment

Here is the error im getting:

Stop SMB...Spinning up all drives...Sync filesystems...Retry unmounting user share(s)...Retry unmounting user share(s)...Retry unmounting user share(s)...Retry unmounting user share(s)...Retry unmounting user share(s)...

 

and the output of those two commands:

 

 

root@Tower:~# lsof /mnt/*
COMMAND  PID   USER   FD   TYPE DEVICE SIZE/OFF       NODE NAME
shfs    8134   root    7w   REG    8,1  1511931        654 /mnt/cache/Appdata/sabnzbd/logs/sabnzbd.log
shfs    8134   root    8u   REG    8,1        0        655 /mnt/cache/Appdata/sabnzbd/logs/sabnzbd.error.log
python  8189 nobody  cwd    DIR   0,13      728 4294967302 /mnt/user/App/sabnzbd
python  8189 nobody    1u   REG   0,13        0 4294967951 /mnt/user/Appdata/sabnzbd/logs/sabnzbd.error.log
python  8189 nobody    2u   REG   0,13        0 4294967951 /mnt/user/Appdata/sabnzbd/logs/sabnzbd.error.log
python  8189 nobody    4w   REG   0,13  1511931 4294967950 /mnt/user/Appdata/sabnzbd/logs/sabnzbd.log
python  8189 nobody    6u   REG   0,13        0 4294967951 /mnt/user/Appdata/sabnzbd/logs/sabnzbd.error.log
root@Tower:~#

 

 

root@Tower:~# fuser -mv /mnt/*

                     USER        PID ACCESS COMMAND
/mnt/cache:          root       8134 F.... shfs

/mnt/user:           nobody     8189 F.c.. python

root@Tower:~#

 

@Trurl

Having a look at the apc post on the forum now, sounds like what im looking for

 

Link to comment

I installed the Influencer/UNplugged sab plugin, have I perhaps broken it in some way? I will test out this theory tonight (manually stopping sab > stop array > shutdown) and see if I can shut it down cleanly with no errors.

 

Link to comment

Well, I do know that Transmission stops itself since I always have it running, but it's been a while since I tried any of the other unplugged. I think it's also been a while since they were updated. Might take a look at the unplugged thread for better advice on whether they stop automatically or not.

Link to comment

Well stopping sab manually before stopping the array worked. Any reason why/how the sab log files are now causing the user share error? Can i just disable it, delete it from my apps/appdata folder then reinstall?Or is there an easier solution (just wondering before i have to set it all backup again).

 

Cheers

Link to comment

hey trurl, got apc installed and using /sbin/powerdown, much easier! Just to confirm, I dont need to setup the plugin, since Im not using a ups and I I no longer need to stop the array...juste /sbin/powerdown?

 

Also, is there another command to reboot?

 

Cheers

Link to comment

Archived

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

×
×
  • Create New...