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.

PATCH: 5.0-rc11: Error messages during reboot/poweroff

Featured Replies

Tom,

 

Thanks for a wonderful product.

 

When rebooting or powering off I see the following error messages on the console:

 

  ls: cannot access /dev/hd[a-z]: No such file or directory

 

  /etc/rc.d/rc.unRAID: line 195: echo: write error: Invalid argument

 

These errors are benign but might be alarming to your users.

 

The second error results from issuing a stop command to /proc/mdcmd while the array is already stopped:

 

root@bigben:/etc/rc.d# ./rc.unRAID status | grep State
State: STOPPED
ls: cannot access /dev/hd[a-z]: No such file or directory
root@bigben:/etc/rc.d# echo stop > /proc/mdcmd
-bash: echo: write error: Invalid argument

 

I'd like to suggest a trivial patch to redirect both of these to /dev/null:

 

--- rc.unRAID.orig	2013-02-24 13:06:21.000000000 -0500
+++ rc.unRAID	2013-02-24 13:06:56.000000000 -0500
@@ -192,7 +192,7 @@
        then logger "Stopping the Array"
             echo status > /proc/mdcmd
             cat < /proc/mdcmd | tr -d '\000' > /tmp/mdcmd.$$.1
-            echo stop > /proc/mdcmd
+            echo stop > /proc/mdcmd 2>/dev/null
             sleep 3
             echo status > /proc/mdcmd
             cat < /proc/mdcmd | tr -d '\000' > /tmp/mdcmd.$$.2
@@ -289,7 +289,7 @@

     if [ "${SMARTCTL}" = "YES" ]; then 
        echo "SMART overall health assessment"
-       ls -1 /dev/sd[a-z] /dev/hd[a-z]  | while read DEVICE
+       ls -1 /dev/sd[a-z] /dev/hd[a-z] 2>/dev/null | while read DEVICE
        do echo -e "${DEVICE}: \c"
           smartctl -n standby -H ${DEVICE} 2>&1 | egrep -v 'Home|===|^$|smartctl version|mandatory SMART' 
        done 

 

Cheers,

Greg

  • Author

There's also a couple of errors coming from ls during boot up.

 

Here's an updated patch:

--- rc.unRAID.orig	2013-02-24 13:06:20.000000000 -0500
+++ rc.unRAID	2013-02-24 13:45:15.000000000 -0500
@@ -60,13 +60,13 @@
     logger -tdiskstats  < /proc/diskstats  

     if [ "${HDPARM}" = "YES" ] ; then 
-       ls -1 /dev/sd[a-z] /dev/hd[a-z]  | while read DEVICE
+       ls -1 /dev/sd[a-z] /dev/hd[a-z] 2>/dev/null | while read DEVICE
        do hdparm -I -i ${DEVICE}
        done 2>&1 | logger -thdparm
     fi

     if [ "${SMARTCTL}" = "YES" ] ; then 
-       ls -1 /dev/sd[a-z] /dev/hd[a-z]  | while read DEVICE
+       ls -1 /dev/sd[a-z] /dev/hd[a-z] 2>/dev/null | while read DEVICE
        do smartctl -n standby -d ata -a ${DEVICE}
        done 2>&1 | sed 's/\t/        /g' | logger -tsmartctl
     fi
@@ -192,7 +192,7 @@
        then logger "Stopping the Array"
             echo status > /proc/mdcmd
             cat < /proc/mdcmd | tr -d '\000' > /tmp/mdcmd.$$.1
-            echo stop > /proc/mdcmd
+            echo stop > /proc/mdcmd 2>/dev/null
             sleep 3
             echo status > /proc/mdcmd
             cat < /proc/mdcmd | tr -d '\000' > /tmp/mdcmd.$$.2
@@ -289,7 +289,7 @@

     if [ "${SMARTCTL}" = "YES" ]; then 
        echo "SMART overall health assessment"
-       ls -1 /dev/sd[a-z] /dev/hd[a-z]  | while read DEVICE
+       ls -1 /dev/sd[a-z] /dev/hd[a-z] 2>/dev/null | while read DEVICE
        do echo -e "${DEVICE}: \c"
           smartctl -n standby -H ${DEVICE} 2>&1 | egrep -v 'Home|===|^$|smartctl version|mandatory SMART' 
        done 

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.