Configure smartmontools for Dell PERC H700

I am trying to configure my disks for RAID status using the following line…

-d megaraid,0 /dev/sda

When I click submit, I get the following error…

The following unknown ‘-d’ options were found ‘/dev/sda’

Has anyone done this?

@coreybrett Welcome to the Rockstor community.

From the S.M.A.R.T docs section, specifically the S.M.A.R.T through Hardware RAID Controllers subsection, the link provided (also on the Web-UI config page) to the smartmontools page “Checking disks behind RAID controllers” suggests that your syntax is correct.

Maybe not, I know the 3ware config options were tested, as show in the referenced doc section, thanks to @kcomer who helped with developing this feature in the following thread:

At the time I put in a few of the other raid controller driver options but it looks from your report that we may have a input validation issue here, given your apparently correct syntax.

Linking for context to the pull request that added the custom smart options feature:

https://github.com/rockstor/rockstor-core/pull/1221

and from that it looks like the validation code (in java script) is here:

And sure enough it looks very much like I’ve missed out, in raidTargetRegExp, the validation for plain old sda / sdb type raid targets used by the megaraid driver.

As a result I’ve opened the following issue:

https://github.com/rockstor/rockstor-core/issues/1942

I should be able to have a go at this one myself but it may not be for a while yet as I have an ongoing backlog. But you may like to have a go yourself: in which case please see the Developers subsection of our Community Contribution doc section which should step you though building a development environment where you can test out the additional regex.

If you do fancy having a go please indicate this on the issue. No worries otherwise and remember that if you build on an existing Rockstor rpm install it will wipe your existing db which may not be what you want.

Thanks again for reporting this issue.

thanks for the feedback, I was really impressed with Rockstor and
would love to use it for a project I’m doing

unfortunately, not being able to see the status of the raid array is a
deal breaker

seems like that would be a great feature to add to the dashboard
(which is amazing BTW)

also receiving notifications via email when there are issues with
arrays would be critical

thank you

@coreybrett Glad you like it thus far, given caveates:

My additions in [ …] brackets above.

Shame, but this does look doable, I’ve had another more robust idea on how it could be coded: I’ll add this info to the issue I opened as a result of this thread shortly.

We do have at least one open issue on better S.M.A.R.T reporting in the following issue. Please add any specific ideas so that we might collect together what has been requested:
https://github.com/rockstor/rockstor-core/issues/700

Agreed, you may find the following issue interesting as it has @maxhq’s (forum member / code contributor) logcheck based, well presented, solution within:

https://github.com/rockstor/rockstor-core/issues/701

Hope that helps and I’ll try to get to the megaraid issue soon, and it would be great if you could test the results, assuming you are still persevering, as I unfortunately have no access to megaraid controllers myself.

@coreybrett Hello again. Just having a quick look at your:

via the open:
https://github.com/rockstor/rockstor-core/issues/1942

could you confirm if a by-id type name, if used as a megaraid target dev, works as expected?

I.e. if you use the by-id name instead of ‘/dev/sda’ does it work OK?

That is if you find the appropriate /dev/disk/by-id name for a given disk from for example:

ls -la /dev/disk/by-id/

and then it’s appropriate megaraid Device ID (DID) second column output from:

storcli /c0 /eall /sall show

which in your given example was ‘0’ for your given device (/dev/sda), does the following command give the expected S.M.A.R.T results:

/usr/sbin/smartctl -a -d megaraid,0 /dev/disk/by-id/your-dev-name-here

Rockstor currently only caters, in these custom smart options, for each physical disk being exposed individually, ie JBOD: as this results in Rockstor disks corresponding to actual pysical hdd, ssd devices.

If the full path by-id name works in place of the canonical /dev/sda type name I should be able to add an ‘autodev’ type target which simply auto inserts (in the background) the by-id name for the associated Rockstor disk entry that the given custom smart options is entered for.

This info should help me edge our S.M.A.R.T through raid controller custom options on a bit, hopefully enough to get you sorted on this front.

Thanks.

@coreybrett With regard to:

I have just submitted a pull request, awaiting review, that may help you:

https://github.com/rockstor/rockstor-core/pull/1945

However, in the process of adding the required but missing ‘/dev/sdX’ type validation regex for the raid target device parameter (and an additional, hopefully more robust, ‘autodev’ option), I discovered a ‘loop hole’ in the existing validation code that may well serve your requirements in the mean time. Try leaving out the ‘/dev/sda’ device target, ie:

-d megaraid,0

(Obviously assuming the one-to-one device nature of JOBD.)

Rockstor will by default substitute the current devices full path by-id name, which has so far worked for us with all other S.MA.R.T command line options so will hopefully also work in this raid target device parameter scenario.

Given my current backlog I decided to proceed with submitting the pull request rather than await your confirmation of function re my last post in this thread. Further modifications can always be made via additional pull requests going forward.

Hope that helps and let us know how these options work out for your.

@coreybrett Hello again, re:

the indicated fix / pull request has now passed review and has been released in stable channel update version 3.9.2-30:

Hope that helps.