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.

Resync notification email

Featured Replies

I was wondering if it is possible to include some more info in the resync (rebuild) notification email unRAID is sending when rebuilding a drive. For instance drive temperature would be very useful to know alongside with percentage completed.

I was wondering if it is possible to include some more info in the resync (rebuild) notification email unRAID is sending when rebuilding a drive. For instance drive temperature would be very useful to know alongside with percentage completed.

unRAID has no e-mail notifications.  It never has had any e-mail capability.  I suspect you need to take this to the customizations forum.
  • Author

Yeah, Joe, you are right. I suspect this is coming from the email notification package installed from unMenu. Please move to the customizations forum. Thanks much and sorry for posting here..

looks like the values the notification script looks for are no longer there.

 

From smtp_status.sh:

  RESYNCPERCENT=`egrep "^mdResyncPrcnt" /tmp/array_status | cut -d "=" -f2`
  RESYNCFINISH=`egrep "^mdResyncFinish" /tmp/array_status | cut -d "=" -f2`
  RESYNCSPEED=`egrep "^mdResyncSpeed"   /tmp/array_status | cut -d "=" -f2`

 

root@Tower:~# mdcmd status | grep mdResync
mdResync=1953514552
mdResyncPos=16510528
mdResyncDt=30
mdResyncDb=3126024
root@Tower:~#

 

At least in the recent 5.0 betas.

looks like the values the notification script looks for are no longer there.

 

From smtp_status.sh:

  RESYNCPERCENT=`egrep "^mdResyncPrcnt" /tmp/array_status | cut -d "=" -f2`
  RESYNCFINISH=`egrep "^mdResyncFinish" /tmp/array_status | cut -d "=" -f2`
  RESYNCSPEED=`egrep "^mdResyncSpeed"   /tmp/array_status | cut -d "=" -f2`

 

root@Tower:~# mdcmd status | grep mdResync
mdResync=1953514552
mdResyncPos=16510528
mdResyncDt=30
mdResyncDb=3126024
root@Tower:~#

 

At least in the recent 5.0 betas.

Did you check for those variables while the resync was in progress?

Sure did. A resync was in progress when I grep'd mdcmd.

Thats what I got this weekend.

 

Subject:unRaid Resync Notification

Status update for unRAID  Tower

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Status: The unRaid array is resync/rebuilding parity.

 

Parity CHECK/RESYNC in progress,  89.5% complete,  est. finish in 45.1 minutes. Speed: 56664 kb/s.

Server Name: Tower

Server IP: 192.168.1.127

Date: Sat Mar  5 03:47:04 PST 2011

 

I think temps would be a nice addition as well. I've been tinkering with fans and it would be nice to know if I'm putting my machine in a bad spot.

  • Author

Definitely should temps be presented here in that status mail.

This is what I get:

 

Subject:unRaid Resync Notification

Status update for unRAID  Tower

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Status: The unRaid array is resync/rebuilding parity.

 

 

Server Name: Tower

Server IP: 192.168.1.15

Date: Mon Mar  7 12:47:05 EST 2011

Filesystem          1K-blocks      Used Available Use% Mounted on

/dev/sdf1              1988320    504832  1483488  26% /boot

/dev/md5            1953454928    32840 1953422088  1% /mnt/disk5

/dev/sdl1            1953454872  50519120 1902935752  3% /mnt/cache

/dev/md3            1953454928 977393892 976061036  51% /mnt/disk3

/dev/md2            976732736 639209920 337522816  66% /mnt/disk2

/dev/md4            1953454928 823173348 1130281580  43% /mnt/disk4

/dev/md1            1953454928 1432293112 521161816  74% /mnt/disk1

shfs                8790552448 3872103112 4918449336  45% /mnt/user

/dev/md6            732552188    32840 732519348  1% /mnt/disk6

/dev/md7            732552188    32840 732519348  1% /mnt/disk7

/dev/md8            732552188    32840 732519348  1% /mnt/disk8

/dev/md9            732552188    32840 732519348  1% /mnt/disk9

 

and yeah, another vote for temps.

5.0b6a

 

I noticed it around 5.0b4. Don't think it's a problem in the 4.x series. The equations used in ArrayStatus.php could be useful in rewriting the script I suppose.

and yeah, another vote for temps.

Vote for temps and error count.

the script/unmenu package can be modified by anyone to include this kind of information.

 

Joe L has a version I have been working on that adds an option for HTML formatting to make everything look a little more pretty.

 

 

the script/unmenu package can be modified by anyone to include this kind of information.

While this is true, any modifications made would be wiped out with an update.

the script/unmenu package can be modified by anyone to include this kind of information.

While this is true, any modifications made would be wiped out with an update.

 

#AUTO_UPDATE=NO at the top would stop it from being overwritten.

But then wouldn't we lose whatever features / fixes were released in the update?  My point is that if it is integrated into the original code branch, there would be no need to repeat the edits.

But then wouldn't we lose whatever features / fixes were released in the update?  My point is that if it is integrated into the original code branch, there would be no need to repeat the edits.

 

correct, but once it is updated just delete the file and be done with it.

the script/unmenu package can be modified by anyone to include this kind of information.

While this is true, any modifications made would be wiped out with an update.

 

#AUTOUPDATE=NO at the top would stop it from being overwritten.

That would be

#AUTO_UPDATE=NO

 

Anywhere on a line of its own in the script.  (You left out the underscore)

the script/unmenu package can be modified by anyone to include this kind of information.

While this is true, any modifications made would be wiped out with an update.

 

#AUTOUPDATE=NO at the top would stop it from being overwritten.

That would be

#AUTO_UPDATE=NO

 

Anywhere on a line of its own in the script.  (You left out the underscore)

And if you post the changes, I'll incorporate them for others benefit too.

ok. So this works to bring back the percentage, time left and speed. Also added Sync Error count:

 

changes made to smtp_status.sh:

 

original:

# RESYNC MESSAGES
RESYNC=`egrep "^mdResync" /tmp/array_status | cut -d "=" -f2 | sed 1q`
if [ "$RESYNC" != "0" -a "$RESYNC" != "" ]; then 
 RESYNCPERCENT=`egrep "^mdResyncPrcnt" /tmp/array_status | cut -d "=" -f2` 
 RESYNCFINISH=`egrep "^mdResyncFinish" /tmp/array_status | cut -d "=" -f2` 
 RESYNCSPEED=`egrep "^mdResyncSpeed"   /tmp/array_status | cut -d "=" -f2`  
 NL=`echo "\n"`                                               
 sSubject="unRaid Resync Notification"                        
 emsg="The unRaid array is resync/rebuilding parity.${NL}${NL}"
 if [ ! -z "${RESYNCPERCENT}" ]; then 
   emsg="${emsg}Parity CHECK/RESYNC in progress, "      
   emsg="${emsg} ${RESYNCPERCENT}% complete, "          
   emsg="${emsg} est. finish in $RESYNCFINISH minutes." 
   emsg="${emsg} Speed: ${RESYNCSPEED} kb/s."           
 fi                                                           
 bIncludeMdcmd="False"                                        
fi

 

modified:

# RESYNC MESSAGES
mdresync=`/root/mdcmd status | grep -w "mdResync" | cut -d "=" -f2`
mdresyncdb=`/root/mdcmd status | grep -w "mdResyncDb" | cut -d "=" -f2`
mdresyncdt=`/root/mdcmd status | grep -w "mdResyncDt" | cut -d "=" -f2`
mdresyncpos=`/root/mdcmd status | grep -w "mdResyncPos" | cut -d "=" -f2`
syncerrors=`/root/mdcmd status | grep -w "sbSyncErrs" | cut -d "=" -f2`

RESYNC=`egrep "^mdResync" /tmp/array_status | cut -d "=" -f2 | sed 1q`
if [ "$RESYNC" != "0" -a "$RESYNC" != "" ]; then 
  let RESYNCPERCENT=$[$mdresyncpos/($mdresync/100+1)]
  let RESYNCFINISH=$[(($mdresyncdt*($mdresync-$mdresyncpos))/($mdresyncdb/100+1)/100/60)]
  let RESYNCSPEED=$[($mdresyncdb)/($mdresyncdt*1024)]
  NL=`echo "\n"`                                               
  sSubject="unRaid Resync Notification"                        
  emsg="The unRaid array is resync/rebuilding parity.${NL}${NL}"
  if [ ! -z "${RESYNCPERCENT}" ]; then 
    emsg="${emsg}Parity CHECK/RESYNC in progress:\n "      
    emsg="${emsg}  ${RESYNCPERCENT}% complete, "          
    emsg="${emsg} est. finish in $RESYNCFINISH minutes," 
    emsg="${emsg} Speed: ${RESYNCSPEED} MB/s,"
emsg="${emsg} Sync Errors: ${syncerrors}\n"
  fi                                                           
  bIncludeMdcmd="False"                                        
fi   

 

The result is:

 

Subject:unRaid Resync Notification

Status update for unRAID  Tower

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Status: The unRaid array is resync/rebuilding parity.

 

Parity CHECK/RESYNC in progress:

  70% complete,  est. finish in 133 minutes, Speed: 70 MB/s, Sync Errors: 0

 

Server Name: Tower

Server IP: 192.168.1.15

Date: Mon Mar  7 17:55:25 EST 2011

Filesystem          1K-blocks      Used Available Use% Mounted on

/dev/sdf1              1988320    503264  1485056  26% /boot

/dev/md5            1953454928    32840 1953422088  1% /mnt/disk5

/dev/sdl1            1953454872  50519120 1902935752  3% /mnt/cache

/dev/md3            1953454928 977393892 976061036  51% /mnt/disk3

/dev/md2            976732736 639209920 337522816  66% /mnt/disk2

/dev/md4            1953454928 823173348 1130281580  43% /mnt/disk4

/dev/md1            1953454928 1432293112 521161816  74% /mnt/disk1

shfs                8790552448 3872103112 4918449336  45% /mnt/user

/dev/md6            732552188    32840 732519348  1% /mnt/disk6

/dev/md7            732552188    32840 732519348  1% /mnt/disk7

/dev/md8            732552188    32840 732519348  1% /mnt/disk8

/dev/md9            732552188    32840 732519348  1% /mnt/disk9

 

 

I don't know if the changes are compatible with pre-5.0 versions. If someone can kindly test and report the results that would be great.

 

modified script attached.

 

Edit: Updated script to include sync error count.

smtp_status.zip

  • 4 weeks later...

Can someone please explain how I implement the smtp_status.sh script above?  I'm running 5b6a and I get almost not info on my resync emails.  I can't find an smtp_status.sh file anywhere on my flash drive?

  • Author

Looking up in /boot/packages/mail_status-unmenu-package.conf reveals /etc/cron.hourly/smtp_status.sh, however it is created out of the mail_status-unmenu-package.conf file each time unRAID boots. So, edit the later file instead of /etc/cron.hourly/smtp_status.sh itself.

 

Best would be of course to modify that file in the unMenu repository.

  • 5 months later...

Not trying to rush anything, just curious if there is an ETA on  an updated email status package that includes the new variables? I'm assuming it will need to be a forked version, as the new variables don't exist in the earlier versions of UnRaid...

 

Thanks! :)

Not trying to rush anything, just curious if there is an ETA on  an updated email status package that includes the new variables? I'm assuming it will need to be a forked version, as the new variables don't exist in the earlier versions of UnRaid...

 

Thanks! :)

 

Someone should be looking at integrating this code with some of the known status scripts!

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.