Skip to main content
Pure Technical Services

How to Suspend/Resume a Cloud Block Store array in AWS

Currently viewing public documentation. Please login to access the full scope of documentation.

 

Introduction

This document goes through the process of suspending (shut down) and resuming (restarting) Cloud Block Store arrays in AWS.

To deploy a CBS array in AWS, please follow the process listed in the CBS Deployment Guide for AWS at the following link:

https://support.purestorage.com/Flas..._Guide_for_AWS

After a CBS array has been deployed successfully in AWS, user's can see the following information for the deployed CBS array under CloudFormation in the AWS Management Console. The GUIEndpoint and the ManagementEndpoint show the management IP address that is used to access the CBS array via GUI or CLI:

Before_Suspend_CF.jpg

For CBS arrays in an active state, if users go to EC2 > Instances in the AWS Management Console and view the controller and virtual drive instances that belong to that array, the controller and virtual drive instances should be in the Running state, as shown below:

BeforeSuspend_EC2s.jpg

Users are not required to disconnect hosts from the CBS array before suspending it. In the example below, a Host called WinHost has been created on the CBS array before it is suspended. A volume called TestVolume has been created and connected to WinHost. WinHost is connected to a Windows EC2 instance via iSCSI:

WinHost.jpg

On the Windows EC2 instance, under Targets in the iSCSI Initiator Properties box, note that the CBS array is connected:

resumed_iscsi.jpg

Under Disk Management, the disk for TestVolume is online. It has been initialized and simple volume called PureVolume has been created:

DiskMgmt_Before.jpg

Next, we go to This PC, and see that PureVolume shows up as the D: drive:

This_PC_Before.jpg

A test file called PureDocument has been created in the PureVolume D: drive:

Folder_File_Before.jpg

 

Suspend operation

In Purity 6.1, the command to suspend a CBS array needs to be issued from the CLI prompt of the array. In order to connect to the array via SSH, you'll need the .pem file that was selected under KeyName at the time the CBS array was launched, as shown in the CBS launch screenshot below:

SSH_Key.jpg

Navigate to the folder where the .pem file is located, and if the access permissions for the .pem file are not already set to 400 (chmod 400 means that only the owner has read access), set the permissions to 400, as shown below:

ssh_1.jpg

Next, SSH into the CBS array as pureuser by issuing the command shown in the screenshot below. Replace the IP address with the management IP address of your CBS array, and replace AWSTMEKEY.pem with the name of the .pem file that was selected during CBS deployment:

Ssh_to_array_2.jpg

Before suspending the CBS array, issue the following command to view the expected resume time. The expected resume time depends on the amount of data currently stored on the CBS array. The larger the amount of data, the longer it takes to resume the array.

Expected_resume_time.jpg

The time displayed by the above command is the resume time rounded up to the hour. In this example, the array is almost empty, so it should take approximately 15 to 20 minutes for the array to resume. This is rounded up to 1hr and displayed in the output of the purearray list --expected-resume-time command.

Before suspending the array, make sure that there are no I/O's taking place to the array.

Issue the following CLI command to put the array in suspend mode:

pureuser@CBS_TestArray> purearray suspend --expected-resume-time 1h CBS_TestArray

Where:

CBS_TestArray = The name of the CBS array

1h = The expected resume time of the CBS array in hours. Please enter the value displayed on your CBS array for the output to the previous command.

As part of the suspend command, the user has to type in the number of hours that the array is expected to take for the resume operation. This has been added to the suspend command to make sure that when users suspend their CBS arrays, they are aware of how long it'll take for the array to resume. The expected resume time should help customers decide when to start the resume operation, so that the array is fully operational and ready for serve data when they need it.

The following screenshot shows the suspend command, and the output for the suspend command:

suspend_cmd.jpg

When the CLI command to suspend the array is executed, a few basic health checks are run to make sure that the array is in a healthy state, and the suspend operation can commence. If the array is in a healthy state, the output of the suspend command will display the status Array has started suspension and will shutdown soon, indicating that the health checks have passed. If any of the health checks fail, the suspend process will not be started and the CLI command will return a failure status.

When the array goes into suspend mode, the SSH session disconnects.

When the array is suspended, the virtual drive instances that belong to the array are terminated, and the controller instances are stopped; but not terminated. Therefore, while the array is suspended, users will be able to see the controller instances in a Stopped state under EC2 > Instances in AWS, as shown below:

Suspended_EC2s.jpg

The following screenshot shows the state of the CBS array in Pure1 while it is in a suspended state.

Suspended_Pure1.jpg

 

Resume operation

The resume operation is performed by invoking an AWS Lambda function. This Lambda function can be invoked via the command line, and the AWS CLI tool can be used to log into AWS to invoke the Lambda function. Users need to log into their AWS accounts as a user that has permissions to invoke a lambda function.

Follow the steps below to go through this process:

Go to Identity and Access Management in the AWS Management Console, and under Users, click on Add user:

Add_User.jpg

Enter a name for the user, and be sure to select Programmatic Access for the Access Type:

New_User.jpg

Next, add a policy to set permissions for the user. You can either attach an existing AWS policy, or create a customer managed policy. Make sure that the policy includes the Lambda: InvokeFunction or the Lambda:* permission, such as the AWSLambdaRole AWS policy shown below:

Lambda_Func.png

When creating the user, be sure to download/save the Access Key ID and Secret Access Key information:

Prog_keys.jpg

Download and install the AWS Command Line Interface (CLI) tool from AWS for your particular Operating System. Check out the following link for details: 

https://aws.amazon.com/cli/

Configure the AWS CLI tool using the Access Key ID and Secret Access Key information from the previous step:

AWS_Configure.jpg

Test the AWS CLI tool to make sure it is properly installed and connected to your AWS account. E.g: you can issue the aws s3 ls command and verify that it lists the S3 buckets in your AWS account.

Next, go to CloudFormation in the AWS Management Console, and select the CloudFormation stack for your CBS array. Go to the Outputs tab and copy the resume handler next to the ResumeLambda key. You can either copy the whole string under the Value column, or copy just the resume handler portion, which is highlighted in the screenshot below:

resume_lambda_name.jpg

To resume the CBS array, use the following AWS CLI command:

$ aws lambda invoke --function-name CBS_TestArray-ResumeHandler-XXXXXXXXXX response.json

Where CBS_TestArray-ResumeHandler-XXXXXXXXXX is the name of the ResumeHandler for the Lambda function that was copied in the previous step

The following screenshot shows an example of the AWS CLI command used to resume the array, and the output. A StatusCode of 200 shows that the Lambda function for the resume operation has been invoked:

resume_cmd.jpg

It is recommended that users verify the status of the resume command by taking a look at the response.json file. If there are no errors, the response.json file will contain the following Status:

Json.png

When the CBS array begins to resume, under EC2 > Instances, you can see controller ct0 of the CBS array getting initialized first:

resuming_1.jpg

Eventually, both of the controller instances and all the virtual drive instances will be back up and in Running state:

resumed_ec2s.jpg

The amount of time taken by the CBS array to resume depends on the amount of data that is stored on the array. Please check the status of the CBS array in Pure1 to see whether the resume operation is complete. When the resume operation is complete, the array state in Pure1 will change from suspended to active, and users will then be able to log into the array via GUI or CLI.

Host connections after the CBS array has resumed

When the CBS array has resumed, the iSCSI connections to the hosts should be back up and running again.

In this example, if we go to the Windows EC2 instance, and look at under the Targets tab in the iSCSI Initiator Properties box, we see that the CBS array is connected:

resumed_iscsi.jpg

In Disk Management, we see that the disk PureVolume is Online, and in a Healthy state:

resumed_disk_mgmt.jpg

Finally, we go to This PC, and under the PureVolume D: drive, we can view the file that was created before the array was suspended:

resumed_This_PC.jpg