[SOLVED] Stopping the array, shutting down the server


Recommended Posts

I just tried to stop the array and I get the following message:

 

Stop SMB...Spinning up all drives...Sync filesystems...Unmounting disks...Retry unmounting disk share(s)...Unmounting disks...Retry unmounting disk share(s)...Unmounting disks...Retry unmounting disk share(s)...Unmounting disks...Retry unmounting disk share(s)...Unmounting disks...Retry unmounting disk share(s)...Unmounting disks...Retry unmounting disk share(s)...Unmounting disks...Retry unmounting disk share(s)...Unmounting disks...Retry unmounting disk share(s)...Unmounting disks...Retry unmounting disk share(s)...Unmounting disks...Retry unmounting disk share(s)...Unmounting disks...Retry unmounting disk share(s)...Unmounting disks...Retry unmounting disk share(s)...Unmounting disks...Retry unmounting disk share(s)...Unmounting disks...Retry unmounting disk share(s)...Unmounting disks...Retry unmounting disk share(s)...

 

With the "Unmounting disks...Retry unmounting disk share(s)..." repeating.  What have I done wrong (I just clicked on the Stop button in the main menu), and if nothing what do I do now to recover.

 

I thought there was a way to shut down the unRaid server from the GUI but I don't see that.  I pressed the stop button to see if a shut down button would appear if the array stopped.

 

Any advice/help appreciated.

 

Link to comment

At this time, just starting with 5.0rc4 from 4.7, I do not have unmenu installed.  I agree with your analysis, however I do not have a cache drive, and I am running the bare bone rc4 with no addins. In my GO script I do however execute /mnt/scratch to make a scratch drive/directory to hold log files.  the exact GO fragment is:

 

# Make the mount points I desire in my system and mount the devices

logger -t "GOSCRIPT"  "Make mount points and mount devices"

echo ">>>>> Make mount points and mount devices"

# first we make the mount points (directories we need) for unRaid. if they already exist command will not execute

mkdir /mnt/scratch

# now we mount what needs to be mounted

mount -w -t vfat /dev/disk/by-label/SCRATCH /mnt/scratch

sleep 5

 

# Move the syslogs to the scratch drive logs folder keeping all syslogs

logger -t "GOSCRIPT" "Move the syslog to the scratch/log folder"

echo ">>>>> Move the syslog to the scratch/log folder"

logdir="/mnt/scratch/logs" # <-- modify this if you want the logs elsewhere.

mkdir -p $logdir

logfile="$logdir/syslog.`date +%Y-%m-%d_%H.%M.%S`.log"

cat /var/log/syslog > $logfile

echo "*.debug $logfile" >> /etc/syslog.conf

echo "*.*  -/dev/tty12" >> /etc/syslog.conf

/etc/rc.d/rc.syslog restart

sleep 5

 

I suspect that is what is causing the problem.  How do I get unraid to unmount that drive?.  I did not think it was part of the array so why should unRaid even care? If I just requested it to stop the array?

 

How do I do a nice clean shutdown?  I used to (v4.7) do /sbin/powerdown at the console.  That does not seem to work as it can't find it (/sbin/powerdown.

 

Any advice appreciated.

 

TIA

Link to comment

I found /sbin and it has poweroff as a function as opposed to powerdown.  I guess I should use that. 

 

My issue now is where I can put the log files other than on the flash drive, i.e. boot.  I have a large USB stick internal to the case that I am using as my "Scratch" drive. It is not part of the array, so I do not understand why it is holding up a stopping of the array.  Could someone explain.  I will do a test eliminating its use and leaving the log files where ever they normally go and see if I can then stop the array.

 

Will report back later

Link to comment

 

My issue now is where I can put the log files other than on the flash drive, i.e. boot.  I have a large USB stick internal to the case that I am using as my "Scratch" drive. It is not part of the array, so I do not understand why it is holding up a stopping of the array.  Could someone explain. 

Don't know. :-[

I send my logs to another server. Guess you could change your script to unmount upon detecting a shutdown command??

 

Interesting to see the output from

lsof | grep mnt

http://lime-technology.com/forum/index.php?topic=13682.msg129616#msg129616

  • Upvote 1
Link to comment

I found /sbin and it has poweroff as a function as opposed to powerdown.  I guess I should use that. 

 

My issue now is where I can put the log files other than on the flash drive, i.e. boot.  I have a large USB stick internal to the case that I am using as my "Scratch" drive. It is not part of the array, so I do not understand why it is holding up a stopping of the array.  Could someone explain.  I will do a test eliminating its use and leaving the log files where ever they normally go and see if I can then stop the array.

 

Will report back later

 

You should not use /sbin/poweroff since it will not cleanly stop the array first and next time you power up, the array will start a parity check.  The correct command to use is /root/powerdown which is a symlink to /usr/local/sbin/powerdown which is also the same script invoked when you press the power button on your chassis.  However, current -rc4 has a bug, fixed in -rc5, than also doesn't cleanly stop the array first  :P

 

As for the continuous "Retry unmounting..." messages - I don't see how your mounted scratch device can cause this.  As mbryanr mentioned, try the "lsof | grep mnt" command to find out what has one of the disk mount points open.

  • Upvote 1
Link to comment

I agree with you Tom re the Scratch disk.  I will be running a test tomorrow.  Right now we (where I live) are in the middle of a violent thunderstorm, so I am not doing much.  The Array and its associated servers are fine as They are on a solid UPS backed up by a 15KW generator.  Lights (not on the UPS power Buss) blink but the Array just keeps on ticking.

Link to comment

I ran the test I stated I would do in the prior post. There was no issue stopping the Array.  I then rebooted using the Reboot command having the Go file reinstitute using the internal USB drive as "Scratch".  When the system came back up I again stopped the array with again no issues.

 

I suspect that yesterday when I was having the problem I had an Array Disk folder set as the CWD. And just didn't realize it.  I was using the console to delete several thousand old backup files using "rm -r directory" because I just couldn't get through "NewPermissions"  The web page always disconnected for some reason after several hours.

 

I feel the NewPermissions process should provide better status information but do understand why that might not be desired. After all to show a count of the directories/files left to process on a disk you have to count them and that probably takes almost as long as processing them.

Link to comment

I found /sbin and it has poweroff as a function as opposed to powerdown.  I guess I should use that. 

 

My issue now is where I can put the log files other than on the flash drive, i.e. boot.  I have a large USB stick internal to the case that I am using as my "Scratch" drive. It is not part of the array, so I do not understand why it is holding up a stopping of the array.  Could someone explain.  I will do a test eliminating its use and leaving the log files where ever they normally go and see if I can then stop the array.

 

Will report back later

 

You should not use /sbin/poweroff since it will not cleanly stop the array first and next time you power up, the array will start a parity check.  The correct command to use is /root/powerdown which is a symlink to /usr/local/sbin/powerdown which is also the same script invoked when you press the power button on your chassis.  However, current -rc4 has a bug, fixed in -rc5, than also doesn't cleanly stop the array first  :P

 

As for the continuous "Retry unmounting..." messages - I don't see how your mounted scratch device can cause this.  As mbryanr mentioned, try the "lsof | grep mnt" command to find out what has one of the disk mount points open.

 

I think i'm right in thinking though that powerdown only works if emhttp is running. Correct? Is there a safe way to powerdown if emhttp has crashed. A problem in that case seeing as ehttp cannot be restarted.

 

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.