Overview
This script automates the SMR update
process for vApp environments.
Important Notes
Windows servers are not updated by this
script; they are skipped and must be handled manually.
Prerequisites
Before running the script, ensure the
following on the Storage MnR Environment:
- Root SSH access is available.
- Python is installed on the Storage MnR
environment.
- Use `/bin/bash` to run the script (do not
use `sh`).
- Download the attached `vApp_Storage_MnR_Update.zip`
and copy it to the Storage MnR Environment.
Script Options
The script supports the following
command-line options:
- `-h` : Display help and exit.
- `-p` : Pre-check VM SSH connectivity before running
update.
- `-i` : Collects the SMR Linux servers and
establishes SSH connection and vApp update preparation.
- `-r` : Retry SSH connections for failed servers if
failed_servers_file exists and is not empty.
- `-c` : Removes CSV and log files generated by the
vApp SMR Update script.
Execution Steps
1. SSH to the SMR Environment.
2. Navigate to the directory where
`vApp_Storage_MnR_Update.zip` is copied.
3. Extract the archive:
unzip vApp_Storage_MnR_Update.zip
4. Change to the extracted directory:
cd
vApp_Storage_MnR_Update
5. Copy the SMR update file
`Storage_MnR_6.1.0.0_vApp_Update_UI.zip` into vApp_Storage_MnR_Update directory.
6. Run the following command to gather all the Linux environments in the SMR setup :
/bin/bash vApp_Storage_MnR_Update.sh -i
7. Review the generated file `SMRVMList.csv` and verify that all VM entries are correct.
8. Re-run the update command to initiate the upgrade:
/bin/bash vApp_Storage_MnR_Update.sh -i
9. Enter the root passwords for all environments when prompted. For any SSH connection failure refer the SSH Failure Handling section.
10. After the kernel update:
- All VMs will automatically reboot.
- Wait for all systems to come back online.
11. Perform a connectivity pre-check after reboot, by running the below command :
/bin/bash vApp_Storage_MnR_Update.sh -p
12. Once SSH connection to all the VM's is successful, Run the update script again to complete the process:
/bin/bash vApp_Storage_MnR_Update.sh -i
13. The update process will begin. Once update completed below message will be shown:
"SMR Update script successfully completed on all servers"
Logs
Upgrade logs are available in the SRM Environment at below location:
/opt/APG/Tools/Update-Manager/9.1
SSH Failure Handling
If any SSH connections fail during execution, retry them using:
/bin/bash vApp_Storage_MnR_Update.sh -r
This will attempt reconnection for servers listed in `failed_servers.txt`.
Once SSH connections are successful for all the SRM environments, Resume the update process from Step 8 in the Execution Steps.
Cleanup
After completing the upgrade, remove temporary and generated files using:
/bin/bash vApp_Storage_MnR_Update.sh -c
This helps keep the environment clean and organized.