Okay, this code was created to deal with one of our post installation steps where we had to set the HP Smart Array controller default settings. This was missed out by our Engineering, you see, but it presented a good opportunity for me to write scripts again!
Okay for our settings, I want to ensure that all new servers rolled out have read/write cache ratio at 50% and their rebuild/expand priority of the array to medium. It uses the HP smart script utility, cpqacuxe.exe to do this.
What it does:
- Grabs the current controller config file
- Checks if changes need to be made
- Creates a new config file from it
- Make the changes
- Grabs the controller config file, again
- Checks that the changes has been made
Please be mindful that I had not put in a lot of error trapping into the code, but it should not kill or destroy your array controller. Also the code is rather loose, I have not optimise nor tightened it yet, there is probably better way of implementing what I want to do.