PowerVC

 View Only

Simplifying the management of resources with PowerVC resource manager utility

By Swapna Harriharan posted Mon December 11, 2023 01:59 AM

  

In this blog, we detail the powervc-resmgr command and subcommands that help you to easily manage your resources such as snapshots, groups, group snapshots, and resources associated with volumes.

Background

Fetching details and cleanup of resources such as groups, group snapshots, and volume snapshots in the transient status that is used to be a tedious task when creating instance snapshots, volumes, or virtual machine (VM) clones until PowerVC 2.1.0.

Overview

In PowerVC 2.1.0, we introduced the powervc-resmgr command that helps you to perform these tasks easily.

  • Cleanup resources that are failed or stuck in an intermittent state.
  • Display all the corresponding entities or resources that are associated with a resource.
  • Reset the status of a given resource.

Prerequisites

To make sure only authorized PowerVC users access resources by using the powervc-resmgr command, you must update the required details in the /opt/ibm/powervc/powervcrc file and run commands from it.


Let us now look at the PowerVC resource manager commands in detail.

PowerVC resource manager subcommands

The powervc-resmgr command provides additional subcommands to manage resources in PowerVC.

·        instance-snapshot. Manage instance snapshots and its associated resources.

·        group. Manage groups and its associated resources.

·        group-snapshot. Manage group snapshots and its associated resources.

·        volume-resources. Manage the resources associated with volume.

1. powervc-resmgr instance-snapshot command

Run the powervc-resmgr instance-snapshot command to manage the instance snapshot and its associated resources.

Run the powervc-resmgr instance-snapshot display command to display the instance snapshots.

Run the powervc-resmgr instance-snapshot display -h command to show the associated help message.

Run the powervc-resmgr instance-snapshot display ---instance_id command to display the instance snapshots for a given instance_id.

Run the powervc-resmgr instance-snapshot display ---instance_id –only_transient command to display instance snapshots in transient status only.

Run the powervc-resmgr instance-snapshot cleanup -h command to display the associated help message.

2. powervc-resmgr group command

Run the powervc-resmgr group command to manage groups and its associated resources.

Run the powervc-resmgr group display -h command to display the associated help message.

Run the powervc-resmgr group display –group_id command to display volumes and associated resources of the group_id.

Run the powervc-resmgr group reset -h command to display the associated help message.

Run the powervc-resmgr group cleanup -h command to display the associated help message.

Run the powervc-resmgr group remove-vols-from-group -h command to display the associated help message.

3. powervc-resmgr group-snapshot command

Run the powervc-resmgr group-snapshot command to manage group snapshots and its associated resources.

Run the powervc-resmgr group-snapshot display -h command to display the associated help message.

Run the powervc-resmgr group-snapshot display --group_snapshot_id command to cleanup group snapshots and associated resources for the given group snapshot.

Run the powervc-resmgr group-snapshot reset -h command to display the associated help message.

Run the powervc-resmgr group-snapshot cleanup -h command to display the associated help message.

4. powervc-resmgr volume-resources command

Run the powervc-resmgr volume-resources command to manage resources associated with volume. To get a view of all resources from the top volume level, you can use volume-resources to check if the volume has any group, group-snapshots or volume snapshots. Volume-resources displays information in a tabular format. 

Run the powervc-resmgr volume-resources display -h command to display the associated help message.

Run the powervc-resmgr volume-resources cleanup -h command to display the associated help message.

Run the powervc-resmgr volume-resources cleanup command deletes all the associated resources including group, group-snapshots, and volume snapshots but not the volume. Hence, you need not perform individual resource cleanup.

Example.

5. powervc-resmgr volume-delete command

The OpenStack cinder delete command does not allow users to delete the volume if it is in an in-use state, even if it does not have any associated VM to it. This is because there are some stale BDM attachment entries left behind due to some failed detach or VM delete operation.

The powervc-resmgr volume-delete command is a PowerVC custom volume-delete command that provides an additional capability to clean up the volumes if it is in-use but has no associated VM to it. The command checks for the instance if the volume is in-use, and accordingly deletes the stale volume attachment entries along with the volume cleanup. If the volume is stuck in some transient state, you can use the –force option to delete forcefully.

Considerations

  • No input validations are performed by using the powervc-resmgr command as all validations are done at the corresponding APIs that run in the backend. If you encounter any errors, you must check the log messages in the /var/log/cinder/resource_manager.log log file.
  • When trying to cleanup volume snapshots by using the powervc-resmgr volume-resources cleanup command, and if volume is associated with any instance snapshot, you see a prompt to use the instance-snapshot cleanup command instead of the volume-resources cleanup command.
  • When running the powervc-resmgr group-snapshot cleanup command, if any volume snapshots are stuck in a transient state, those volume snapshots are forcefully deleted during the group snapshot cleanup.
  • With running the powervc-resmgr group cleanup command, volumes are removed from the group before deleting the group so that those volumes are intact.

Troubleshooting

·        You can validate if the services are running by using the powervc-services cinder status command.

·        You can check these log files if you encounter any errors.

  • /var/log/cinder/resource_manager.log
  • /var/log/cinder/api.log
  • /var/log/cinder/volume-<<storage_host_id>>.log

If you have any questions, feel free to add your comments in the Comments section.

Keep watching our social outlets for more interesting information about PowerVC! Find and follow us on FacebookLinkedInTwitter, and YouTube

Blog authors

Rajni Kumari

Prashanth Kumar Reddy

Swapna Harriharan

Chhavi Agarwal

0 comments
46 views

Permalink