storaged-project / udisks

The UDisks project provides a daemon, tools and libraries to access and manipulate disks, storage devices and technologies.
https://storaged.org/doc/udisks2-api/latest/
Other
348 stars 142 forks source link

Libatasmart vs smartctl #433

Closed bhack closed 5 months ago

bhack commented 7 years ago

libatasmart is quite unmaintained but has some advantage to be structured as a library and to has a quite parsable output. Need we to incomrporate something from smartctl source files to maintain libatasmart in an updated status? See https://github.com/storaged-project/udisks/issues/423#issuecomment-339954239

stikonas commented 6 years ago

smartctl can produce json output. That should be parsable too.

vpodzime commented 6 years ago

smartctl can produce json output. That should be parsable too.

Since which version? My smartctl on Fedora 27 (smartmontools-6.5-5) doesn't really look like it could do so.

stikonas commented 6 years ago

@vpodzime "since trunk". Will be released with 6.7. We are already using it in kpmcore git. Had to migrate away from libatasmart too.

bhack commented 6 years ago

https://www.smartmontools.org/ticket/766

vpodzime commented 6 years ago

Then I'm afraid it's not a real option for udisks now. Patches adding it as an alternative source of SMART data are of course welcome, though. :wink:

hjmallon commented 5 years ago

SMART data is currently available on udisks2 API under UDisks2.Drive.Ata. Smartmontools supports retrieving SMART data from other types of disks too (e.g. NVMe and USB SAT). How would the API be changed to make that work?

Also smartmontools 7.0 is out with JSON output.

vpodzime commented 5 years ago

How would the API be changed to make that work?

I think it would make most sense to add a new interface UDisks2.Drive.SMART.

Also smartmontools 7.0 is out with JSON output.

That's great news!

fenio commented 5 years ago

What's the current status of that? Is Udisks2.Drive.SMART support on a roadmap?

tbzatek commented 5 years ago

What's the current status of that? Is Udisks2.Drive.SMART support on a roadmap?

Certainly not for the 2.9 release, there's quite a bit of work involved. Patches are welcome as usual, the good first start is to write a libblockdev plugin, together with libatasmart one, with a common API. The intention is to keep libatasmart around for a while for older systems with smartmontools plugin taking priority if available.

cTurtle98 commented 4 years ago

any updates? I am still unable to test nvme drives with gnome-disks-utility on kubuntu 20.04 LTS

tbzatek commented 4 years ago

No news since my last post. No contribution from the community either.

stikonas commented 4 years ago

Note that just switching to smartctl wouldn't automatically fix nvme drives. smartctl has a different json fields when you have nvme, so you still have to implement nvme support separately. But at least it should be possible

tbzatek commented 4 years ago

Note that just switching to smartctl wouldn't automatically fix nvme drives. smartctl has a different json fields when you have nvme, so you still have to implement nvme support separately. But at least it should be possible

Of course, that's how the new libblockdev layer abstraction would be designed. Actual presentation on UDisks side is a separate thing.

There's a native NVMe support planned through libnvme that would also provide reading SMART data. The libblockdev plugin priority will handle the actual backend selection seamlessly.

xgiovio commented 3 years ago

any news on this?

tbzatek commented 3 years ago

any news on this?

No progress on smartmontools integration, not on a short-term roadmap for the moment.

However I'm working on NVMe support right now which will provide drive health information among other stuff.

xgiovio commented 3 years ago

Thank you.

On 16 Feb 2021, at 12:51, Tomáš Bžatek notifications@github.com wrote:

 any news on this?

No progress on smartmontools integration, not on a short-term roadmap for the moment.

However I'm working on NVMe support right now which will provide drive health information among other stuff.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

Leeo97one commented 2 years ago

However I'm working on NVMe support right now which will provide drive health information among other stuff.

Any progress?

bhack commented 2 years ago

Check also https://github.com/smartmontools/smartmontools/issues/133

tbzatek commented 2 years ago

However I'm working on NVMe support right now which will provide drive health information among other stuff.

Any progress?

Yes, please see #975. If you have any comments and suggestions for the new API, feel free to post comments in that pull request.

tbzatek commented 2 years ago

Check also smartmontools/smartmontools#133

Oh nice, thanks. I'll keep that on my watch list.

One thing I was thinking about was SAS drive support in the new smart libblockdev plugin (likely libblockdev-3.1 and udisks-2.11+). With NVMe being covered natively through libnvme, this separate plugin would focus to IDE/SATA/SAS only.