Resource icon

multi_report.sh version for Core and Scale 3.0

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
You mean the script, right? Not the system's TN version.
It is the script when running the '-config' switch. You must save your changes (Write) in order to save the multi_report_config.txt with the alterations the user just made. The script does not alter the TrueNAS configuration file.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
(If one uses the right script to update. :rolleyes:)
Let me guess, you were not renaming the script to 'multi_report.sh' and that was the issue? Sorry about that but it really couldn't be helped. I could have made the script use the renamed file but that left the window open for upgrade failures. From here forward, the script needs to be renamed to 'multi_report.sh'. During the update this file 'multi_report.sh' will be updated with the new changes.
 

awasb

Patron
Joined
Jan 11, 2021
Messages
415
Exactly. Your crystal orb is well cleaned :cool:
 

Deeda

Explorer
Joined
Feb 16, 2021
Messages
65
Another successfull upgrade using -update :cool:
 

pteron

Dabbler
Joined
Dec 30, 2016
Messages
21
When I update using multi_report.sh -update it correctly grabs the latest file but it doesn't make the multi_report.sh executable, so on the next cron run I get a 'file not executable' error.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
When I update using multi_report.sh -update it correctly grabs the latest file but it doesn't make the multi_report.sh executable, so on the next cron run I get a 'file not executable' error.
Did you receive any error messages during the initial upgrade? Did you run the script from the directory where it resides? The new script should fix any problems with running from another directory but only on the 'next' update. You will likely need to manually chmod +x multi_report.sh per the user guide. Hopefully the next time around it will not be an issue. If it is, please let me know.

If you ran the -update a second time after making the file executable, and it is still having the same problem, please let me know. I will need to take a look at the script to see where I missed a full path statement but I thought I got all of them.
 

Deeda

Explorer
Joined
Feb 16, 2021
Messages
65
I had the same error, putting "bash" at the start of the command fixed it.
 

pteron

Dabbler
Joined
Dec 30, 2016
Messages
21
Did you receive any error messages during the initial upgrade? Did you run the script from the directory where it resides? The new script should fix any problems with running from another directory but only on the 'next' update. You will likely need to manually chmod +x multi_report.sh per the user guide. Hopefully the next time around it will not be an issue. If it is, please let me know.

If you ran the -update a second time after making the file executable, and it is still having the same problem, please let me know. I will need to take a look at the script to see where I missed a full path statement but I thought I got all of them.
This was the third time I've had to fix the perms after -update
 

awasb

Patron
Joined
Jan 11, 2021
Messages
415
Had the same permissions issue. I tar-ed everything (just to be sure in case ...), deleted the old script versions (while keeping the configs and stats), downloaded the actual version and did a fresh config. It's really easy and way faster than it was before with the new -conf dialogue. Now everything works as expected.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
This was the third time I've had to fix the perms after -update
The current version has hopefully the corrections so you do not see that again, but previous versions might of course. And if you were to run -update right now, which would just reload the script, if the problem still happens then it's not fixed.

I had the same error, putting "bash" at the start of the command fixed it.
That is odd, I'm not sure why you would need to do that as the means it's running bash in a bash shell. I'd like to try to replicate the problem. Maybe when you have some time, toss me an email or PM me with information like permissions for the directory, how CRON is setup, if you are not running as root, then the privileges of the user. And is it Core or Scale.

I'm not great at FreeBSD nor Debian, probably never will be, but I try to learn where I can. Ultimately there may be some actions the end user may still need to perform, but I will try to get it to be fully automatic. But I do need to replicate it on my own system so I can figure out the proper solution.

Had the same permissions issue. I tar-ed everything (just to be sure in case ...), deleted the old script versions (while keeping the configs and stats), downloaded the actual version and did a fresh config. It's really easy and way faster than it was before with the new -conf dialogue. Now everything works as expected.
Thanks for the feedback. You didn't have to do anything special to make the script work, other than configure it using the -config switch, or by using a pre-existing multi_report_config.txt file? I'm just trying to figure out what the issue is. I'm almost positive it's a permissions issue, it always is.
 

awasb

Patron
Joined
Jan 11, 2021
Messages
415
Step by step:

  1. tar-ed original files.
  2. deleted every exec/script and kept all configs
  3. downloaded actual version to $myscriptdir
  4. changed dir to $myscriptdir; executed ./multi_report.sh -config (in script dir).

No fancy pants stuff, no further hacking.

Additional info: I don't use symbolic links. The script is called via cron with absolute path.
 

pteron

Dabbler
Joined
Dec 30, 2016
Messages
21
That is odd, I'm not sure why you would need to do that as the means it's running bash in a bash shell. I'd like to try to replicate the problem. Maybe when you have some time, toss me an email or PM me with information like permissions for the directory, how CRON is setup, if you are not running as root, then the privileges of the user. And is it Core or Scale.
putting bash before the script simply invokes the script in bash instead of the script invoking bash itself via the #! at the top.

It's a way to get around the lack of execute permission

I've just run the -update and it maintains the execute perms now.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Well if someone runs into another installation issue, or any issue, please don't be shy, share your issue and we will see if we can solve it. So no bug fix as of now. :smile:
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994

garyc

Cadet
Joined
Dec 1, 2015
Messages
9
TrueNAS-SCALE-22.12.2 with 39 spinning rust and 2 mirrored ssds for boot pool. Total of 41 disks. It appears that when the sd devices go beyond 26 and start using designations such as sdaa, sdab, sdac, etc. the reports truncate to sda and just give the same reports on sda instead of sdaa, sdab, etc. Does anyone else see this issue. It is a great script tool otherwise. Thanks.

1684201997564-png.66656
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
TrueNAS-SCALE-22.12.2 with 39 spinning rust and 2 mirrored ssds for boot pool. Total of 41 disks. It appears that when the sd devices go beyond 26 and start using designations such as sdaa, sdab, sdac, etc. the reports truncate to sda and just give the same reports on sda instead of sdaa, sdab, etc. Does anyone else see this issue. It is a great script tool otherwise. Thanks.

1684201997564-png.66656
Well I knew someday someone would find this out. I've known this would be a problem but fixing it is a bit more involved so I placed it on the very back burner and waited for someone to call me out on it. It may take me a little time to come up with the proper fix that works on both Core and Scale. Once I have it, can I contact you to test it out? I do not actually have that many drives so I can only simulate that number of drives, so it's not a true test.
 

garyc

Cadet
Joined
Dec 1, 2015
Messages
9
Well I knew someday someone would find this out. I've known this would be a problem but fixing it is a bit more involved so I placed it on the very back burner and waited for someone to call me out on it. It may take me a little time to come up with the proper fix that works on both Core and Scale. Once I have it, can I contact you to test it out? I do not actually have that many drives so I can only simulate that number of drives, so it's not a true test.
I would be happy to assist you. I am glad I said something!
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I would be happy to assist you. I am glad I said something!
Me too. I try to promote feedback, good or bad. My goal is to just make a product that works properly for everyone so don't be shy, if you see something wrong please report it.
 

dak180

Patron
Joined
Nov 22, 2017
Messages
310
Well I knew someday someone would find this out. I've known this would be a problem but fixing it is a bit more involved so I placed it on the very back burner and waited for someone to call me out on it.
Fairly sure that TrueNAS Report would not have that issue if it helps any.
 

garyc

Cadet
Joined
Dec 1, 2015
Messages
9
Fairly sure that TrueNAS Report would not have that issue if it helps any.
You are correct. I had to bend the rules a little and install bc. However, it did not have the problem. All 41 drives reported. I am not sure what will break on the next update since I had to install a non supported utility. Oh well, wouldn't be the first time I trashed the boot and had to restore it.
Thanks.

Joe- I will still be willing to test yours as well. I appreciate both of your work. Thanks!
 
Top