New powerdown script needed for 5.0 unRAID


Recommended Posts

  • Replies 149
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

does this quit cache_dirs? That's the biggest thing for me right now, it doesn't stop cache_dirs and can never unmoutn

cache_dirs was coded to look for the "Unmounting ... " messages in the syslog and suspend itself so the array can be stopped by the normal processes.

 

If those messages no longer exist, it might be as easy as looking for the new equivalent.

Link to comment

does this quit cache_dirs? That's the biggest thing for me right now, it doesn't stop cache_dirs and can never unmoutn

cache_dirs was coded to look for the "Unmounting ... " messages in the syslog and suspend itself so the array can be stopped by the normal processes.

 

Apparently those messages have changed slightly, in the 5.X series, so you can upgrade your version of cache_dirs by issuing this command in the directory the cache_dirs program resides

sed -i -e "s/=1.6.7/=1.6.8/" -e "s/Retry unmounting disk share/Retry unmounting/" cache_dirs

 

It should then recognize the messages once more and stop itself soon after the disks are attempted to be un-mounted.

Link to comment

Here is the fixed version. All credits go to the original author. I merely added some lines.

 

When I reboot the machine from the OEM WebGUI with powerdown 1.04 version installed, the system hangs trying to stop the processes in /etc/rc.d.  Looks like it's caught in a loop (see photo attached).  I had to hard reset to recover.  Sorry, no syslog as a result.

Powerdown_1.04_Hang.jpg.f350ffc01474630fb965ab68e15c2dd1.jpg

Link to comment

What seems to happen is, that you renamed your/an old rc.unRAID to to rc.unRAID.bak. rc.unRAID is the script thats gets called by the powerdown script. It sends a stop command to all scripts in rc.d that are not listed in the rcdstock file in /etc/rc.d/.

 

So scripts in this file will not be called when powering down. One of those is obviously rc.unRAID as calling that would start the powerdown process again, resulting in an endless loop. To solve it you either have to remove the .bak file from rc.d or add it to the list of scripts to exclude.

Link to comment

Thanks, SlrG. Looks like I'll have to track down the rogue process that's creating rc.unRAID.bak.

 

Found the source of the problem.  When I called installpkg to install powerdown-1.04, the LOGSAVE option caused the system to save the existing rc.unRAID file as rc.unRAID.bak when it modified the LOGSAVE value.  Eliminating the LOGSAVE option fixed the problem.

 

# CTRLALTDEL=YES LOGSAVE=30 installpkg /boot/packages/powerdown-1.04-noarch-unRAID.tgz

    ... changed to ...

# CTRLALTDEL=YES installpkg /boot/packages/powerdown-1.04-noarch-unRAID.tgz

Link to comment
  • 4 weeks later...
  • 2 weeks later...

This issue does not relate to unRAID 5.0, but I don't know where else to post it.  I am working on getting SNAP to work on unRAID 6.0 and I'm having a problem with powerdown shutting down properly.

 

I installed unRAID 6.0 and the powerdown 1.04 package and nothing else.  I can create a hangup on shutdown by mounting and unmounting an sata disk outside of the array.

 

I execute the following in a telnet session and then do a normal shutdown using the WebGUI and powerdown hangs.

 

mkdir -m 777 -p /mnt/disk/Test
mount -r -o umask=111,dmask=000 -t ntfs /dev/disk/by-id/ata-ST9500325AS_S2W8BSWG-part1 /mnt/disk/Test
umount /mnt/disk/Test
rmdir /mnt/disk/Test

 

Let me know if you see anything wrong with how I am mounting the drive, or if there is further information I can provide.  I can't get a log when the situation occurs because the system hangs and is no longer accessible.

 

Any help would be appreciated.

Link to comment

This issue does not relate to unRAID 5.0, but I don't know where else to post it.  I am working on getting SNAP to work on unRAID 6.0 and I'm having a problem with powerdown shutting down properly.

 

I installed unRAID 6.0 and the powerdown 1.04 package and nothing else.  I can create a hangup on shutdown by mounting and unmounting an sata disk outside of the array.

 

I execute the following in a telnet session and then do a normal shutdown using the WebGUI and powerdown hangs.

 

mkdir -m 777 -p /mnt/disk/Test
mount -r -o umask=111,dmask=000 -t ntfs /dev/disk/by-id/ata-ST9500325AS_S2W8BSWG-part1 /mnt/disk/Test
umount /mnt/disk/Test
rmdir /mnt/disk/Test

 

Let me know if you see anything wrong with how I am mounting the drive, or if there is further information I can provide.  I can't get a log when the situation occurs because the system hangs and is no longer accessible.

 

Any help would be appreciated.

 

Can anyone offer assistance here?  This will be an issue for anyone mounting a drive outside unRAID.

Link to comment

FWIW I have a non snap non array drive mounted and the newest power down works fine. But it is also ext4 and I'm not unmount in it before shutdown.

 

Sent from my XT1060 using Tapatalk

 

The drive I am mounting is formatted ntfs.  I did not load the ntfs-3g driver, so the unRAID read only driver is the one being used.

 

I haven't tried this with v6 Beta3.  I'll give that a go to see if anything has changed.

 

EDIT: Still happening.

Link to comment

yes, beta3

 

I've narrowed it down to rc.unRAID in the powerdown package.  The 'stop' operation appears to have some issues.  I can get the system to hang up by issuing "rc.unRAID stop" in a  telnet session.

 

I have found the problem.  There is a powerdown file missing from the /etc/rc.d directory.  The file 'rcdstock' is missing.  If I copy that file to the /etc/rc.d/ directory, the problem is solved.

 

Can the author please update the package with this fix?

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.