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.

New powerdown script needed for 5.0 unRAID

Featured Replies

I've installed this new package as well - testing now....

  • Replies 149
  • Views 39k
  • Created
  • Last Reply

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

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.

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.

The man!

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

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.

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

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

  • 4 weeks later...

Trying not to step on any toes, but is this new script ready to go mainstream?    If it is, why hasn't it been included in unMENU and Dynamix? 

I have it installed, and don't get any issues , it's stopping all plugin and do a nice shutdown, and I have not needed to modify it.

 

//Peter

  • 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.

Does Tom have a dev preview of 6.0 or something?

 

Sent from my SPH-D710VMUB using Tapatalk

 

 

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.

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

 

 

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.

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

 

Is this on unRAID v6?

yes, beta3

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.

Hmmm that might be something to let Tom know.  Might be a more generic problem beyond it being part of an "unsupported plug-in"??

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?

Hmmm that might be something to let Tom know.  Might be a more generic problem beyond it being part of an "unsupported plug-in"??

 

I don't think this is a Tom problem.  I have found a problem in the powerdown package.

oh is rc.unraid not a part of unraid itself?  My misunderstanding.

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.