New Application: unraid_info


Recommended Posts

@ purko

 

The code to read SMART from a spun-down drive OUTSIDE the array is not yet enabled, as I have to pull the model info directly from the drive

Before you know its model, you don't yet know if the drives is capable of being queried without waking up. So you can't bother the drive that way.

 

One way that comes to mind, `hdparm -i` gives model info without disturbing the drive.

Another way, the link in '/dev/disk/by-id/' will also give you the model info.

 

Link to comment
  • Replies 101
  • Created
  • Last Reply

Top Posters In This Topic

New version posted in the OP:

 

0.0.5-Beta

Added "read_smart_if_spun_down" flag to disks outside the array.

Added -T to print a table of drives

Added a note to status output if any array drives did not return SMART data.

Changed format of summary for info for disks outside the array.

Changes format of summary for info.

Link to comment

How about adding the -i option, which would mean "ignore what state the drive is in, and just get the info; don't bother checking that database, don't worry if the drive will wake up or not."  (Something like a force option, but you've already used up -f and -F)

 

Link to comment

How about adding the -i option, which would mean "ignore what state the drive is in, and just get the info; don't bother checking that database, don't worry if the drive will wake up or not."   (Something like a force option, but you've already used up -f and -F)

 

You could always just use a different color and "font" "[glow=yellow,2,300]F[/glow]"

;) ;) ;)

Link to comment

Now that I am home and have access to my test system, I added code that kick is when the array is degraded (i.e. 1 disk is down, but the array is still online).

 

It will now list each array disk with a problem in the status report:

 

================== unRAID Server Summary ==================

          Array State: STARTED
[color=blue]         Array Status: DEGRADED - 1 DISABLED DISK
     !!! DISK PROBLEM: Disk1 (sda) reports status DISK_DSBL[/color]
Total Space on Array: 504,023,312 KB (480.674 GB)
  Total Free on Array: 494,853,024 KB (471.929 GB)
         Percent Free: 98.18%
    Largest Freespace: 243,645,744 KB (232.359 GB) on disk5
    Last parity check: 2 days ago
   Hottest array temp: 38° (disk5) (/dev/hdf) WDC WD2500JB-00EVA0
Longest running disk: disk3 (/dev/hde) (10,184 hours / 1.16 years)

Highest temp outside array: 29°
    Disks outside the array: 3 ( /dev/hda /dev/hdb /dev/sdc )

 

Link to comment

I just posted version 0.0.6, that includes a fix for what you rported:

 

0.0.6-Beta

Added -w switch to wakeup all drives that will not return smart when spun down.

Added a list of any disks with problems when array status is anything other than OK.

Fixed bug in determining ability of a disk outside the array to return SMART when spun down

 

Note if you want to use the -w switch, you need to list it first... or at least before any switches that create output like -S

Link to comment
Works. Thanks.

 

Good!

 

I'm still working on the different potential statuses of the array... yes all the possible values are in md.c, but what combination of drive events equate to which status is not easily determined.

 

So if the "Array Status" reported by unraid_info is ever not accurate, please run a complete dump with

 

   unraid_info -d

 

and post the results.

Link to comment

I'm trying to avoid shelling out for any commands... and that method is not reliable (and won't work on my machine in the first place since that is not where I keep emhttp since I keep multiple versions on the same system for testing).

 

I have a way that (I hope) will be more reliable... just let me get it working.

Link to comment

I have posted version 0.0.7.  See link in OP.

 

This version adds a switch -X to test each array disk to see if it can return SMART information when spun down.

 

This will eventually be used to auto-generate the drive config file that the user can then modify.

 

Note it will spin up and down some array drives, and to get accurate results, it should be run when nothing else is accessing the array.

 

 

I would greatly appreciate users reporting back which models of drives CAN report SMART when spun down, using this thread:

 

  http://lime-technology.com/forum/index.php?topic=5654.msg52888#msg52888

 

Link to comment

How about the opposite question...  Have you seen any drives lately which can't give you SMART info while sleeping?

 

What I'm thinking is, maybe you shouldn't be worrying much about that database of "drives that CAN report SMART when spun down".

I mean, if I had such an ancient drive, and if it bothered me, you've provided me with a way to manually change the "can_read_smart_when_sleeping" setting in that drive config file, right?

 

Link to comment
How about the opposite question...  Have you seen any drives lately which can't give you SMART info while sleeping?

 

Yup... a Hitachi HDP725050GLA360 I got earlier in 2009.

 

you've provided me with a way to manually change the "can_read_smart_when_sleeping" setting in that drive config file, right?

 

Yup.

 

If a config file exists, it will use the value for "read_smart_when_spun_down" from the config file, which you can change (just a text ini file).

 

You can (in the next version) create a new default config file using the -X testing routine.... and edit it if you want.

 

If there is no config file, it uses my default code to decide which drives can "read_smart_when_spun_down" based on a list of model numbers.

Link to comment

Version 0.0.8 Beta is now posted.  This version adds:

 

Added more drives to list of drive models that can return SMART info when spun down

Added spin status summary line to Array Summary report.

Added open file count to Array Summary report.

Added -h help to get usage information

Added -o option to report count of open files that will block array shutdown.

Link to comment

Added spin status summary line to Array Summary report.

Added open file count to Array Summary report.

 

Love it!

 

Spin Status:  SpunUp:0   SpunDown:6

My SpunDown disks were 8.  

(Looks like for some reason it excluded the out-of-array disks from the count).

 

Link to comment

Version 0.0.8 Beta is now posted.  This version adds:

 

Added more drives to list of drive models that can return SMART info when spun down

Added spin status summary line to Array Summary report.

Added open file count to Array Summary report.

Added -h help to get usage information

Added -o option to report count of open files that will block array shutdown.

Earlier, in version .7 I had this output:

================== unRAID Server Summary ==================

 

          Array State: STARTED

        Array Status: OK

Total Space on Array: 5,567,591,920 KB (5309.669 GB)

  Total Free on Array: 239,032,444 KB (227.959 GB)

        Percent Free: 4.29%

    Largest Freespace: 76,283,332 KB (72.749 GB) on disk8

    Last parity check: 7 days ago

  Hottest array temp: 30° (disk10) (/dev/hda) ST3750640A

Longest running disk: disk1 (/dev/hdb) (37,649 hours / 4.30 years)

*note: 1 array disk(s) did not return SMART data

 

Highest temp outside array: 37°

    Disks outside the array: 6 ( /dev/hdi /dev/hdj /dev/sda /dev/sdb /dev/sdc /dev/sdd )

 

Now, in version .8 I get this:

================== unRAID Server Summary ==================

 

          Array State: STARTED

        Array Status: OK

Total Space on Array: 5,567,591,920 KB (5309.669 GB)

  Total Free on Array: 239,032,444 KB (227.959 GB)

        Percent Free: 4.29%

    Largest Freespace: 76,283,332 KB (72.749 GB) on disk8

    Last parity check: 8 days ago

  Hottest array temp: 21° (disk11) (/dev/sde) WDC WD10EACS-00D

Longest running disk: disk11 (/dev/sde) (11,631 hours / 1.33 years)

          Spin Status:  SpunUp:0  SpunDown:11

*note: 10 array disk(s) did not return SMART data

  Open Files on array: 0

 

Highest temp outside array: 37°

    Disks outside the array: 6 ( /dev/hdi /dev/hdj /dev/sda /dev/sdb /dev/sdc /dev/sdd )

 

The statistics are very misleading, as they sometimes do not include drives that are spun-down.

For example, my oldest disk got a lot less old in the most recent printout. 4.3 years in the older printout vs. 1.33 years in the newer.

 

What would be useful is the duration of time since the last I/O on a given disk in the array.  Useful for knowing why it has not spun down.

The /proc/mdcmd structure has the timestamp (seconds since unix epoch) of the last I/O for each disk spinning.  The timestamp is "0" if the drive is sleeping.  It is easy to calculate the duration of time since the last I/O.

 

 

Link to comment

Joe:

 

That doesn't have anything to do with a version difference.  The statistics are always calculated the same way... they use SMART data from all spun-up disks, and SMART data from spun-down disks that can return SMART data when spun down.  The stats never include SMART data from spun-down disks that are unable to return SMART data when spun down.... unless you force them to be spun up with the -w (--wakeup) switch.

 

If you look at your output, you will see this in your first output:

*note: 1 array disk(s) did not return SMART data

 

and this in the second:

 

 *note: 10 array disk(s) did not return SMART data

 

So in the second example, all 11 of your array drives were spun down and 10 of the 11 could not return SMART data in the second example.

 

The "*note" is to alert you that your output is based ONLY on a subset of your disks that DID return SMART data.  If all disks return SMART data (i.e. are either spun up or can return SMART when spun down, that *note does not appear).

 

If you want to get 100% reliable results, you have to spin up drives that can not return SMART data when spun down.  You can do that with the -w (--wakeup) switch.

 

unraid_info -w -S

 

Link to comment

purko:

 

Yes, all the statistics are based on the array drives only.

 

Only the last two lines of summary report output that explicitly mention drives outside the array, take into account drives outside the array.

 

My intention is that ANY information that includes drives outside the array will explicitly say so (as above).  If drives outside the array are not explicitly mentioned, then the information is based on the array drives only.

 

And of course, the -a parameter reports on disks both in and outside the array.

Link to comment

Yes, all the statistics are based on the array drives only.

 

Only the last two lines of summary report output that explicitly mention drives outside the array, take into account drives outside the array.

 

My intention is that ANY information that includes drives outside the array will explicitly say so (as above).  If drives outside the array are not explicitly mentioned, then the information is based on the array drives only.

 

Limetech has a business reason not to care about anything that's outside the protected array (disks, extra NICs, etc).

I don't have a reason to make such a distinction. The whole thing is my server, and I equally care about all my disks.

 

The info on the unRAID management page is strictly limited to the array. Your info should aim to give the big picture by default.

 

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.