New TrueNAS Core widget support in 0.8.11 #3268
Replies: 8 comments 5 replies
-
Thanks for posting a discussion about homepage here on GitHub. Homepage now uses a fancy new AI tool thanks to our friends at Glime, so the answer below is the AI bot's attempt to answer your question. If you feel it's sufficient you can mark the answer and close this post, otherwise feel free to leave it open of course! Thanks for using Homepage! ❤️ To address your concern about the TrueNAS widget reporting raw space instead of usable space, it's important to clarify how the widget is currently designed to report storage metrics. Based on the context provided, the widget's behavior is likely tied to the data it receives from the TrueNAS API. The TrueNAS API provides various storage metrics, including raw space, which is the total physical capacity of the disks without accounting for redundancy, parity, or other factors that affect usable space. Usable space, on the other hand, is the actual storage capacity available to store data, which considers the RAID configuration, overhead, and other factors. If the widget is indeed showing raw space instead of usable space, this could be due to the widget configuration or how the data is being interpreted from the API response. To resolve this, you may need to check if there's an option to display usable space in the widget configuration or if the widget needs to be updated to calculate usable space based on the raw space and RAID configuration. Unfortunately, without direct access to the widget's code or the API response, I cannot provide a specific solution. However, I recommend reaching out to the developers of the widget or checking the TrueNAS API documentation to see if there's a way to obtain and display usable space instead of raw space. If you're part of the development team or have the ability to modify the widget, you may need to adjust the widget's code to calculate the usable space based on the raw space and the specific RAID configuration of the pools. For further assistance, you may want to check the TrueNAS documentation or contact TrueNAS support for more details on how to interpret the API data correctly. This comment was generated by Glime. |
Beta Was this translation helpful? Give feedback.
-
Thanks glime bot dude. I think what you want is /pool/dataset endpoint. Every pool should contain top level dataset with the same name as the pool. There you'll find both .used and .available value in raw and parsed formats. Reference: |
Beta Was this translation helpful? Give feedback.
-
@rgon10 any thoughts on this? |
Beta Was this translation helpful? Give feedback.
-
Any update on this? And can we report this as a bug? |
Beta Was this translation helpful? Give feedback.
-
So the following API call below outputs the following info on my TrueNAS Core server (ignore Pool2, my screenshots are regarding Pool1). From what I can see the Homepage Widget must be displaying:
That appears to match: But the real space is: From the total output below, I can't spot what TrueNAS is showing? root@truenascorevm[~]# curl -H "Authorization: Bearer " -X GET "http://192.168.0.6/api/v2.0/pool" -H "accept: application/json"
|
Beta Was this translation helpful? Give feedback.
-
I'm on Truenas Scale but get the same type of output as ZoltrixGFC when calling the pool endpoint. I think the problem is, as mentioned in #3493, pool gets the full capacity of the pool regardless of the raid setting. It might be getting other things as well like snapshots/backups etc to determine the total size, not really sure but it never seems to get a size that makes sense. Getting the used and available space from /pool/dataset/id/{id} like zkvvoob did in #3493 would be the easiest way to get the correct values, but it would be making extra api calls as shamoon said. My Truenas setup has three pools and each has a different setup. One a mirror, one raidz2, and one just a single disk. Factor in the endless ways other people will have their pools setup and I'd imagine trying to figure it out by adding raid support would be a headache to maintain. Not sure if there's a clean way this can be done without making multiple api calls. I can work on it next week if the maintainers are willing to go the multiple api call route, otherwise i'm not seeing an easy way this can be done unless someone has better ideas or knows of an api endpoint we're missing. |
Beta Was this translation helpful? Give feedback.
-
Just noticed this today, sounds like there is no easy fix, wondering if we can ask TrueNAS to report via the api a more consumer friendly number? |
Beta Was this translation helpful? Give feedback.
-
I asked on the forum a month ago, but got no reply: https://forums.truenas.com/t/api-calls-for-pool-stats-only-shows-raw-data/22638 |
Beta Was this translation helpful? Give feedback.
-
Thank you for bringing support for pools in the TrueNAS widget for TrueNAS core.
The only thing I've noticed is that it seems to report on raw space, and not usable space.
Eg, for TrueNAS 1 and Pool1 shown in the screenshot below, it's actually 71TBs of usable, not 94TBs.
Beta Was this translation helpful? Give feedback.
All reactions