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

Change the way the Disk sensors are created in HA [Feature] #142

Open
thanomichalis opened this issue Dec 7, 2023 · 6 comments
Open

Change the way the Disk sensors are created in HA [Feature] #142

thanomichalis opened this issue Dec 7, 2023 · 6 comments
Labels
enhancement New feature or request planned To be implemented in future release

Comments

@thanomichalis
Copy link

thanomichalis commented Dec 7, 2023

Is your feature request related to a problem? Please describe.

Everytime the OMV is restarting, the drive letters are changing for each ssd disk. So if disk with serial X has a letter sda and disk with serial Y has sdb, in the next restart, the X is assigned the sdb and the Y assigned the sda.
The integration however, is taking into consideration the sda and sdb to identify and keep the records from s.m.a.r.t. for each disk. Therefore, the history and the statistics data kept in HA, are mixing the two disks.

Describe the solution you'd like

We need to change the way HA identify and create the sensor to look not the letter that OMV assigns to the disks, but the their serial number which is unique.

@thanomichalis thanomichalis added the enhancement New feature or request label Dec 7, 2023
@tomaae
Copy link
Owner

tomaae commented Dec 8, 2023

serial number is a no-go. some controllers or usb dont provide serial. same for mc which dont have serial at all.
it has to be something that is unique and is always provided.

@tomaae tomaae added the planned To be implemented in future release label Dec 8, 2023
@thanomichalis
Copy link
Author

@tomaae i see. However it is an issue, cause it is not only the history and statistics, but also the fact that in HA any automation regarding the disks, cannot be reliable since the sensors, are becoming unavailable or they have the wrong data.
We may use the UUID though.

@tomaae
Copy link
Owner

tomaae commented Dec 11, 2023

yes, I was thinking of UUID too, but it needs confirming and testing that UUID stays the same while dev changes.

@thanomichalis
Copy link
Author

@tomaae I am not a programmer nor familiar with what exactly should i do, but if you give me some script to add it in my HA installation on rpi4, i might be able to run some tests.

@SamJongenelen
Copy link

I can confirm my UUID stays the same, as I use OMV and docker, and all my Docker Volumes use the /dev/disk-by-UUID path, hardcoded by me. Unless I don't understand correctly what you @tomaae meant by 'while dev changes' I think its a good idea to use UUID.

@Henkow
Copy link

Henkow commented May 9, 2024

It for sure stays the same. I also would like UUID instead. The current implementation doesn't make it possible to rename the drives to what they actually are. I for instance can't name the OS drive as SSD since it may go from sda to sdd upon reboot.

Speaking of this, the same issue is the case with containers running. Would be nice if "OMV Compose" could be removed from the name so it only display what service is running, would make it more clean as "OMV Compose" takes up so much space. Can't really hardcode any since the container running a given service may go from omv_compose_5 to omv_compose_3 upon reboot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request planned To be implemented in future release
Projects
None yet
Development

No branches or pull requests

4 participants