CS01-HS Posted October 2, 2020 Share Posted October 2, 2020 What's everyone doing to ensure persistent drive labels for reporting (Grafana), etc. ? My sdg and sdh swapped labels with sdi and sdj. I thought I could take advantage of hotswap to correct it - DON'T DO THIS (I'm rebuilding parity now because of it.) So is there a fix or do we just accept some level of randomness? Quote Link to comment
itimpi Posted October 2, 2020 Share Posted October 2, 2020 You can never rely on the stX type names not changing as they are assigned dynamically during the booting process so various timing factors can affect the order they get assigned. Instead you can use one of the names shown under the /dev/by-* type folders if you want an invariant name 1 Quote Link to comment
ChatNoir Posted October 2, 2020 Share Posted October 2, 2020 I think @falconexe had a way to replace sdX by the disk S/N in his UUD topic : Don't remember the details and don't have much time to look for it right now. 1 Quote Link to comment
CS01-HS Posted October 2, 2020 Author Share Posted October 2, 2020 2 hours ago, ChatNoir said: I think @falconexe had a way to replace sdX by the disk S/N in his UUD topic Thanks. I don't see it in the dashboard (which instead shows a configurable "cache devices" setting) but I'll dig into the thread. Clever trick installing smartmontools in the container, I had been using HDDTemp docker. Quote Link to comment
ChatNoir Posted October 2, 2020 Share Posted October 2, 2020 Back from work. I remembered correctly, not sure if it applies to everything you want to do. Quote To Use Static Drive Serial Numbers in Grafana (For DiskIO Queries) Do the Following: Edit telegraf.conf > [[inputs.diskio]] > Add device_tags = ["ID_SERIAL"] > Use ID_SERIAL Flag in Grafana Now Upon Booting, You Don't Have to Worry About SD* Mounts Changing (So Your Graphs Don't Get Messed Up!) You Can Also Set Overrides on the Query Fields to Map the Serial Number to a Common Disk Name Like "DISK01" etc. 1 Quote Link to comment
CS01-HS Posted October 2, 2020 Author Share Posted October 2, 2020 That's great, thanks for finding it. My setup's a lot cleaner now. I think that was my only sdX dependency so problem solved. 1 Quote Link to comment
Recommended Posts
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.