Display BTRFS device stats


Recommended Posts

I would like to see BTRFS device stats being displayed in the webGUI and receive notifications for errors:

 

# btrfs device stats /mnt/disk1
[/dev/md1].write_io_errs    0
[/dev/md1].read_io_errs     0
[/dev/md1].flush_io_errs    0
[/dev/md1].corruption_errs  0
[/dev/md1].generation_errs  0

 

Thank you.

Link to comment

I've been asking for this for pools for a long time, and last info I have is that it should be implemented soon, hopefully when zfs support is added, this way it can used for both filesystems.

 

Basically monitor the output of "btrfs device stats /mountpoint" (or "zpool status poolname" for zfs) and use the existing GUI errors column for pools, which currently is just for show since it's always 0, to display the sum of all the possible device errors (there are 5 for btrfs and 3 for zfs), and if it's non zero for any pool device generate a system notification, optionally hovering the mouse over the errors would show the type and number of errors like we have now when hovering the mouse over the SMART thumbs down icon in the dash.
 
Additionally you'd also need a button or check mark to reset the errors, it would run "btrfs dev stats -z /mountpoint" or "zpool clear poolname".

 

I never asked for array support for this, but it would also be a good idea, again for both zfs and btrfs, especially since we know that data corruption with btrfs can go undetected when transferring data using user shares, it will likely be the same with zfs, we could also use the existing errors column, in the array it is used but it could show errors for both md driver and the fs.

  • Like 1
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.