Add SMART tests and settings for unassigned devices


ljm42

Recommended Posts

I installed a new Seagate 8TB archive drive in unRAID 6.3.0-rc6 and proceeded to preclear it.  I found that SMART was disabled by default.

 

Request 1: please automatically enable SMART on all unassigned devices that support it.  i.e.:

  smartctl -s on /dev/sdX

 

 

Once smart is enabled, this page allows you to view basic smart attributes for the disk:

  http://tower/Main/DeviceAttributes?name=sdl&file=/tmp/screen_buffer

 

However, this page is missing the Smart Settings, Self-Test, Capabilities, and Identity tabs that array drives have, even though most of this functionality would apply to an unassigned drive as well.  I had to drop to the command line to run a "long" test on the drive, rather than doing it from the GUI.

 

Request 2: Please add all of the Smart Settings, Self-Test, Capabilities and Identity functionality that array drives have, to unassigned devices that support SMART

Link to comment
  • 3 months later...
1 hour ago, dlandon said:

The UD plugin supports SMART reports on disks.  Please post diagnostics for us to look at.

This only seems to be true for disks that are mounted unless I am missing something.

 

it would also be nice to be able to get notifications about SMART issues from UD disks in the same way we do for the main array disks (or is this implemented and I have never had a UD disk that qualified for a notification :) ).

Link to comment
On 4/4/2017 at 10:44 PM, bonienl said:

SMART support is already built-in the stock Unassigned Devices page. I suppose you are using the plugin.

 

 

5 hours ago, dlandon said:

The UD plugin supports SMART reports on disks.  Please post diagnostics for us to look at.

 

All of my drives are now part of an array, so I can't give a diagnostic.  But at the time I submitted this I had two problems:

 

1. I had to manually enable SMART on the new drive by dropping to the command line and issuing the smartctl command mentioned above.  This doesn't seem right.  Either unRAID, UD, or preclear should automatically enable SMART on a new drive.  To me, it seems like unRAID should do it.  

 

Here is a similar request:

  https://forums.lime-technology.com/topic/45929-new-wd-blue-4tb-comes-with-smart-disable/

 

 

2. I wish I had taken screen shots, but this shouldn't be hard for someone with an unassigned hard drive to test.  Just go to Main -> UD and click on a device name.  I think stock and plugin both behave the same, you get a url like this:
  http://tower/Main/DeviceAttributes?name=sdl&file=/tmp/screen_buffer
which is fairly useless compared to what you get when you click on an array drive:
  http://tower/Main/Device?name=disk1

So the second request is to have the /Main/DeviceAttributes script show the same Smart Settings, Self-Test, etc information that the /Main/Device script shows.

Link to comment

With current unRAID, unassigned devices (both stock or using the plugin), show all the SMART info from the Self Test option down, they are still missing the SMART settings section.

 

There are also two other "issues":

 

- like ljm42 mentioned some disks come with SMART disable, it won't work for those unless they are part of the array/cache pool (or SMART is manually enabled).

- with the UD plugin installed it's not possible to access the SMART options for unmounted disks.

Edited by johnnie.black
  • Upvote 2
Link to comment
3 hours ago, johnnie.black said:

With current unRAID, unassigned devices (both stock or using the plugin), show all the SMART info from the Self Test option down, they are still missing the SMART settings section.

 

There are also two other "issues":

 

- like ljm42 mentioned some disks come with SMART disable, it won't work for those unless they are part of the array/cache pool (or SMART is manually enabled).

- with the UD plugin installed it's not possible to access the SMART options for unmounted disks.

The "SMART Settings" are only available on array drives.  This is under LT control.  The UD plugin cannot get around this.

 

I believe that the setting in the bios to enable SMART will turn it on for all disks.

 

The UD plugin will show SMART options for disks that are unmounted if they are not in a standby state - i.e. they are spinning.

Link to comment
1 minute ago, dlandon said:

Works for me.

 

Thanks for checking.  Would you mind showing a screenshot of what you see for the device properties of an unassigned hard drive versus one that is in the array?  When I started this thread, a *lot* more data was available for array drives, even those most of it would be valid for an unassigned drive as well.

Link to comment
9 minutes ago, ljm42 said:

 

Thanks for checking.  Would you mind showing a screenshot of what you see for the device properties of an unassigned hard drive versus one that is in the array?  When I started this thread, a *lot* more data was available for array drives, even those most of it would be valid for an unassigned drive as well.

 

UD SMART Report:

58e6ba3bde044_UDSMART.png.b6ca059d4d870ead7ea3232d4a0166f9.png

Link to comment
13 minutes ago, johnnie.black said:

 

Well I guess we need someone else to check and see if the problem is with me or with you.

 

It works for mounted disks but not for unmounted (but spun up) disks.

What does this command show? 

Quote

/usr/sbin/hdparm -C /dev/sdX | /bin/grep -c standby

 

I stand corrected.  This is only used for determining spun up status.

Edited by dlandon
Link to comment
14 minutes ago, johnnie.black said:

 

Well I guess we need someone else to check and see if the problem is with me or with you.

 

It works for mounted disks but not for unmounted (but spun up) disks.

When you click on the disk and it is not mounted, what shows on the screen?

Link to comment

OK.  After doing a bit of research I think you have hit upon a special case I implemented for those who did not want certain UD disks to spin up at all.  Some disks spin up whenever their temperature or SMART report is checked.  The temperature check and SMART reporting is disabled when there is no script defined.  It looks like you don't have any scripts defined.  That would cause the behavior you are experiencing.  If you define the default script that doesn't do anything, the 'sdl' icon will be enabled and you can see the SMART report.  Click on the script icon and then click the 'Default Script' button and then save it, you will get the 'sdl' enabled and be able to see the SMART report.

Link to comment

I just plugged in an NTFS-formatted USB hard drive and the "Smart Attributes" link wasn't active until I mounted it.  Once mounted, this url:
  http://tower/Main/New?name=sdm
shows the Self-Test, Attributes, Capabilities, & Identity tab like your screen shot.  Very cool.

 

Is mounting the drive required?  I noticed johnnie's sdl drive isn't mounted either.

 

Perhaps that was part of my problem back in Dec, I was looking for details on a brand new (and therefore unmountable, right?) hard drive.

 

EDIT -> I created a dummy script and now the Smart Attributes link is available for the drive when it is unmounted too

Edited by ljm42
Link to comment

So to recap:

 

The UD plugin will display a "Smart Attributes" link (which shows the Self-Test, Attributes, Capabilities, and Identity tabs) for an unassigned device if:
  a. The drive is mounted
  b. -or- if you have defined a device script

 

If the drive is not mounted and there is no script, UD assumes it is a warm spare and will not do anything that might spin the drive up.

 

It sounds like stock unRAID will display this link at all times, although I have not tested it.

 

--

 

Here are some potential enhancement requests based on this discussion:

  1. Provide some way to enable SMART on unassigned devices, if the device supports it but it is disabled by default.  Otherwise the user has to drop to the command line to enable SMART.
    • If this functionality is provided by unRAID it can either be fully automatic or it could be an option on the Identity tab (i.e. provide an "Enable" button next to the line that says SMART support is disabled)
    • This could potentially be automated by the UD plugin
    • Or it could be handled by @gfjardim's preclear plugin, by having it automatically enable SMART before a preclear rather than just telling you it is disabled.  This options seems the least intrusive.
       
  2. Modify unRAID to allow custom SMART Settings and temperature thresholds to be set for unassigned devices, and modify the back end scripts to use them. Currently these settings are only available to array drives.
     
  3. Consider modifying UD to make it more clear why the "Smart Attributes" link is disabled. This seems to be a source of confusion.
  • Upvote 1
Link to comment
OK.  After doing a bit of research I think you have hit upon a special case I implemented for those who did not want certain UD disks to spin up at all.  Some disks spin up whenever their temperature or SMART report is checked.  The temperature check and SMART reporting is disabled when there is no script defined.  It looks like you don't have any scripts defined.  That would cause the behavior you are experiencing.  If you define the default script that doesn't do anything, the 'sdl' icon will be enabled and you can see the SMART report.  Click on the script icon and then click the 'Default Script' button and then save it, you will get the 'sdl' enabled and be able to see the SMART report.


Ok, that explains it, thanks for looking into it.

Sent from my SM-A500FU using Tapatalk

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.