Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add drive model to partitions in health report #229

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

anjalshireesh
Copy link
Contributor

@anjalshireesh anjalshireesh commented Sep 27, 2023

Capture the drive model in partitions data in the health report. It will be read from /run/udev/data/b<major>:<minor>

Capture the drive model in partitions data in the health report. It will
be read from `/sys/class/block/<drive-name>/device/model`
@anjalshireesh anjalshireesh marked this pull request as ready for review September 27, 2023 10:21
Copy link
Member

@balamurugana balamurugana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To get reliable drive information, fetching it from /run/udev/data/b<major>:<minor> is the best choice.

@anjalshireesh
Copy link
Contributor Author

To get reliable drive information, fetching it from /run/udev/data/b<major>:<minor> is the best choice.

Thanks @balamurugana , I've updated the code to do this. PTAL.

@anjalshireesh anjalshireesh force-pushed the health branch 2 times, most recently from 71fe9c5 to f9a864e Compare September 28, 2023 14:54
Copy link
Contributor

@shtripat shtripat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Verified with health report generated.

      {
        "device": "/dev/nvme0n1p3",
        "model": "KXG6AZNV512G TOSHIBA",
        "mountpoint": "/",
        "fs_type": "btrfs",
        "mount_options": "rw,relatime,bind",
        "mount_fs_type": "btrfs",
        "space_total": 510405902336,
        "space_free": 271951970304
      }

@anjalshireesh anjalshireesh merged commit 97ab5db into minio:main Sep 29, 2023
5 checks passed
@anjalshireesh anjalshireesh deleted the health branch September 29, 2023 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants