rockstor / rockstor-core

Linux/BTRFS based Network Attached Storage(NAS)
http://rockstor.com/docs/contribute_section.html
GNU General Public License v3.0
554 stars 137 forks source link

Show warn on dashboard when disk mounted in degraded mode or raid unsync #1531

Open niulin opened 7 years ago

niulin commented 7 years ago

If disk is mounted in degraded mode or the raid is unsync, should give a warn on dashboard.

schakrava commented 7 years ago

Thanks for the issue, sounds like a good idea to me.

phillxnet commented 7 years ago

I have just linked a now resolved issue that partly addresses this issue by surfacing mount options:

1763 "improve mount status reporting capability"

That issue doesn't address the warnings component of this issue but does surface 'degraded' via mount options and adds the ability, via pool and share model extensions (is_mounted and mount_status), to be aware of such things. It does however add 'unmounted' warnings (red text) on all pool and share listings if they are not mounted. It could be that an interpretation of "... raid is unsync ..." in btrfs terms is essentially an unmount status. However I think highlighting the ro (read only) and degraded mount options, when seen would cover this given ro is the fail over response to pool / share problems in btrfs. Given a pool (volume) / sub volume could be intentionally mounted ro we could highlight (surface as warning) only if ro is not also a requested mount option. But is all cases I think degraded should be highlighted; irrespective of if it is config request status: via UI custom mount options.

phillxnet commented 6 years ago

A missing disk pool warning, in flashing red, is now surfaced (in Web-UI header so on all pages) as from pr: "surface pool missing disk info in UI. Fixes #1897" #1902 Linking for context.

phillxnet commented 6 years ago

The remaining element of this issue pertains to: "If disk is mounted in degraded mode ... give a warn on dashboard." Although we already indicate mount status via the the already linked and merged: "improve mount status reporting capability. Fixes #1763" #1771 It is not in the form of a warning, but the degraded status is at least indicted.

Currently we have addressed the "... raid is unsync ..." element if that is to be interpreted as dev stats warnings which the following merged pr addresses: "Show warn on dashboard if errors occurs on IO or fs. Fixes #1532" #1958 (another @niulin issue) or indeed a missing disk which we now also address in the similarly linked (my last commnet): "surface pool missing disk info in UI. Fixes #1897" #1902

So I propose all that remains here is to 'colour' / highlight the "degraded" word when found in a mount status column entry. And as degraded is not actually an error condition but potentially by choice, the colouring could be mid level, ie more orange than red, so as to bring attention to it but not necessarily have it at the same full red used by the Web-UI header errors for example.