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.

Temps and spin status of drives behind advanced controllers.

Featured Replies

A suggestion for 5.1....

 

With the proliferation of higher-end drive controllers with SATA-behind-SAS issues in getting SMART data, drive temps, and spin status, perhaps consider a per-disk field for a user-defined command to get temperatures and another for spin status.

 

For example to check my parity drive, I use:

 

/boot/custom/smartctl -n idle  -i -d areca,16,2 /dev/sg9

 

which will tell me the spin status.

 

/boot/custom/smartctl -A -d areca,16/2 /dev/sg9 | grep ^194 | awk '{print $10}'

 

returns the temperature.

 

Along those lines, a checkbox to "check temps if drive is spun down" would be nice too ;)

I have been resisting these kinds of hacks because of the confusion and maintenance issues it can cause users.  Probably it's inevitable we'll need to add this, but I think it's better to punish companies producing non-standard-compliant h/w by not buying their crappy controllers  >:(

  • Author

I understand... 'epecially w/r/t maintenance.

 

Since the newer smartctl handles spinstatus, spinup, and temp, perhaps all that is needed is a field for the smartctl designation for the drive.  For straight SATA, it is /dev/sdX and all spinchecking, spindown, and temp queries are done via smartctl against "/dev/sdX".  if the field is "-d areca,12/2 /dev/sg9" then the same smartctl command line code will work.

 

In any event, returning temps and SMAT when spun down is VERY common with modern drives, so taking advantage of that with a checkbox doesn't reward bad manufacturers ;)

I understand... 'epecially w/r/t maintenance.

 

Since the newer smartctl handles spinstatus, spinup, and temp, perhaps all that is needed is a field for the smartctl designation for the drive.  For straight SATA, it is /dev/sdX and all spinchecking, spindown, and temp queries are done via smartctl against "/dev/sdX".  if the field is "-d areca,12/2 /dev/sg9" then the same smartctl command line code will work.

Right, all that is needed is a field, but is this per disk, per controller, (or both?), and what exactly should the user put in there, and how do they know that?  In your line above, if upon next boot linux assigned "sg8" instead of "sg9", then oops another issue.

 

In any event, returning temps and SMAT when spun down is VERY common with modern drives, so taking advantage of that with a checkbox doesn't reward bad manufacturers ;)

This I agree with and should figure out a way to make it happen, though it's tricky because of changing device id's.

  • Author

/dev/sg9 is the controller.  -d areca,n/e is where n=drive slot and e=enclosure number.  The syntax for 3ware, etc, is similar.

 

Actually both can be figured out via a script.  I could probably make a script that you can call with "/dev/sdX" and it could figure out what controller it is on, which enclosure and slot, and return the spinstat and/or temp.  If I could do that, perhaps then the "advanced" option would just be a single, system-wide selection to "use alternate code for retrieving spin status and temperatures" and emhttp simply call that shell script instead of hdparm and smartctl.  The only tricky part would be if you had something like a 2-drive RAID-0 as an unRAID disk, in which case the script can return the same thing now.... undefined.... or the "highest" temp and the uniform spinstatus (if both are spun up, or spun down).

 

This I agree with and should figure out a way to make it happen, though it's tricky because of changing device id's.

 

It only makes sense for the selection to be stored based on drive model and/or serial number... so if a drive floats to another slot or device, the setting "sticks" to the physical device.

 

 

 

  • Author

FWIW, as a test I wrote a script that determines what driver/controller a /dev/sdX device is on, and then prepares a proper command line to feed to smartctl that will return the SMART data even for SATA drives behind an advanced controller like Areca or 3Ware that don't normally return SMART data.

 

I replaced smartctl in /usr/sbin with the script, and now I have my temps back in the unRAID UI, and temps when drives are spundown, regardless of which controller they are on.  ;)

 

 

  • 2 months later...

A suggestion for 5.1....

 

With the proliferation of higher-end drive controllers with SATA-behind-SAS issues in getting SMART data, drive temps, and spin status, perhaps consider a per-disk field for a user-defined command to get temperatures and another for spin status.

 

For example to check my parity drive, I use:

 

/boot/custom/smartctl -n idle  -i -d areca,16,2 /dev/sg9

 

which will tell me the spin status.

 

/boot/custom/smartctl -A -d areca,16/2 /dev/sg9 | grep ^194 | awk '{print $10}'

 

returns the temperature.

 

Along those lines, a checkbox to "check temps if drive is spun down" would be nice too ;)

 

I'm trying to figure out how to use smart to get drive temps for my Areca 1210... i tried something similar above, but didn't work :(

I'll keep searching the forum; but if someone could help out here that would be great. thanks.

 

EDIT:

Never mind... figured it out... needed firmware upgrade and just had to figure out which /dev/sgX it was (mine is /dev/sg3).

 

Thanks for this post.

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.