I'll do. Will take time. Its 4am over here so not today. Maybe next week i'll find the time.Read it over, you will figure it out.
I'll do. Will take time. Its 4am over here so not today. Maybe next week i'll find the time.Read it over, you will figure it out.
Been working on it for a while; I do my best to both keep it up to date and make it more understandable.Wow, that is very similar to my script, even some of my newer changes seem to have migrated into it. I didn't even know it was out there in this version, I recall the original version.
That is good. I'm all about the good of the people here, if we create a better product, teach people how to do things, share knowledge, that is my goal. i need to take a look at what you have, I see some differences for sure that I may want to take advantage of. I know I'm not a very good programmer so I will take my beating and learn where I can.Been working on it for a while; I do my best to both keep it up to date and make it more understandable.
No worries.If I came off as a little harsh last night
When you figure it out, teach me how it works. it's a lot in a single script. I could break it down into a few smaller pieces but the issue with that is a person would need all the pieces to make it work. I like a single file myself but there is merit to smaller pieces. I've been thinking about it, I just don't want to do it yet. It would consume a lot of my time because I would restructure more of it.and now slowly understand how the script fully works.
Is your version on github (or some other dvcs site) somewhere? I do not think I have ever seen a link to it aside from flat downloads.That is good. I'm all about the good of the people here, if we create a better product, teach people how to do things, share knowledge, that is my goal. i need to take a look at what you have, I see some differences for sure that I may want to take advantage of. I know I'm not a very good programmer so I will take my beating and learn where I can.
Yes, here is the site: https://github.com/JoeSchmuck/Multi-ReportIs your version on github
Not a silly question. The value is the number of days since the last SMART Short or Long tests was conducted as reported by the drive. And in your example the last test was a "long" test. There is a value that you can set as the trigger point, by default it's 2 days, you could change it to 1000 days if you desire, but I would never suggest that.Possibly a silly question, but I often see the "Last Test Age" come up as something that needs attention. I was wondering what the number refers to?
###### FreeNAS config backup settings configBackup="true" # Set to "true" to save config backup (which renders next two options operational); "false" to keep disable config backups. configSendDay="Wed" # Set to the day of the week the config is emailed. (All, Mon, Tue, Wed, Thu, Fri, Sat, Sun, Month) saveBackup="false" # Set to "false" to delete FreeNAS config backup after mail is sent; "true" to keep it in dir below. backupLocation="/tmp/" # Directory in which to store the backup FreeNAS config files.
Nope, the script as of right now does not monitor fragmentation because I never considered it and no one has asked for it before. It's an easy thing to add actually. I wish there was a tool to defrag ZFS pools but I'm not aware of any as of right now. If there is such a tool, I'd love to hear about it. I would also think TrueNAS would incorporate that tool whenever it becomes available.Also I will shamelessly say that it would be nice to have the pool free space fragmentation monitored as well if possible; I did not find anything about it in the config file, my bad if I missed it.
I use a cronjob that runs the script only at Wednesday at a fixed time; I will come again if I won't get the config today.@Davvo The default config file will send the TrueNAS configuration file on Monday's, but yours looks to be setup for Wednesday's. If that is all you changed then it should be working but only on Wednesdays (tomorrow).
Yup, not touching the script just using it as reference for the commented parts above the code.Now I'm assuming you are editing the multi_report_config.txt file, not the script directly.
If I'm not wrong the pool rebalancing script does defragmentation as a side bonus, but that's under specific conditions (you need to have the space in the pool to store a temporary copy of all your files in order to run the script iirc). I agree that a more intelligent way to do so would be a great addition to the TrueNAS/ZFS code.I wish there was a tool to defrag ZFS pools but I'm not aware of any as of right now. If there is such a tool, I'd love to hear about it. I would also think TrueNAS would incorporate that tool whenever it becomes available.
Thank you, that would be wonderful.So do you want me to add Defrag to the Zpool chart? If yes, I would have it only create a warning not a critical error message. You will be able to set it to a specific value, and from what little I have read on the subject, 80% is still acceptable but nearing 90% is not, so the default threshold will be 80% (user changeable). It will be this weekend when I can get to it and this will be just before I finalize version 2.0.
I'm not so sure about that, not a true defragmentation. It looks like it has the ability to improve defragmentation as you said under the right situations but it doesn't do this by making files contiguous, it does it by spreading the files out evenly amongst many vdevs, if I'm reading it correctly. And to be honest, I have not read about this script before so 15 seconds of reading does not make me the expert.If I'm not wrong the pool rebalancing script does defragmentation as a side bonus
Let me know how that goes. If it fails to work, send send me a copy of your config file so I can test it. I have no idea why it wouldn't work but maybe I induced an error. Never know.I use a cronjob that runs the script only at Wednesday at a fixed time; I will come again if I won't get the config today.
Well, I don't think it's necessary to use another vdev; if the data is fragmented and there is enough space available you just need to rewrite the data in order to get those blocks written in a sequential order, then free the older blocks that stored such data. That's what that script does because incidentally is the same process used for balancing the pool since ZFS stripes the data on different vdevs. It's a dumb method that works for home use.I'm not so sure about that, not a true defragmentation. It looks like it has the ability to improve defragmentation as you said under the right situations but it doesn't do this by making files contiguous, it does it by spreading the files out evenly amongst many vdevs, if I'm reading it correctly. And to be honest, I have not read about this script before so 15 seconds of reading does not make me the expert.
I think the only true way to force a defragmentation is to move all the files off to another vdev and then move them back, that would defragment the files but you need to have the space for all the files. Creating a script that does that wouldn't be difficult but you need the extra space and most people just don't have it.
I looked at my FRAG value last night, 2%. But then again I don't store a lot of changing data on my NAS.
Will do, but I'm confident it will work.Let me know how that goes. If it fails to work, send send me a copy of your config file so I can test it. I have no idea why it wouldn't work but maybe I induced an error. Never know.
Ouch that's definitely a priority, though now I imagine your wife physically bonking you with the refrigerator in your geeky lair.If I have time this weekend I will update the script, the wife hit me with a failing refrigerator last night. My priority has shifted, must have refrigerator. I hope I can fix it, much cheaper than a new one.
-dump email
parameter and answer "y" to the question if you want to send the data to Joe. If you answer anything else, the dump will only go to your email address.I posted the update, or thought I attached it. Must have just removed it. I attached it again above. But yes, the github location will work as well, it's been updated.Download from here until the resource gets updated I guess?
GitHub - JoeSchmuck/Multi-Report: FreeNAS/TrueNAS Script for emailed drive information.
FreeNAS/TrueNAS Script for emailed drive information. - JoeSchmuck/Multi-Reportgithub.com
I posted the update, or thought I attached it. Must have just removed it. I attached it again above. But yes, the github location will work as well, it's been updated.