id
stringlengths
8
78
source
stringclasses
743 values
chunk_id
int64
1
5.05k
text
stringlengths
593
49.7k
storagegateway-vgw-ug-029
storagegateway-vgw-ug.pdf
29
such as if you migrate an application to use a larger storage volume. • Moving Your Volumes to a Different Gateway - Learn how to detach and reattach volumes, which is useful if you need to move your volumes to a different Volume Gateway as your performance needs change. • Creating a recovery snapshot - Learn how to create a recovery snapshot from a volume recovery point for a gateway, and where to find that snapshot in the Storage Gateway console after you create it. • Editing a snapshot schedule - Learn how to customize a snapshot schedule by changing either the time the snapshot occurs each day or the frequency that snapshots are taken. • Deleting snapshots of your storage volumes - Learn how to delete unnecessary snapshots when you no longer need them. • Understanding Volume Statuses and Transitions - Learn about the various volume status values that Storage Gateway reports to help determine whether a volume is functioning normally, or if there is a problem that might require action on your part. • Moving your data to a new gateway - Learn how to move data between gateways as your data and performance needs grow, or if you receive an AWS notification to migrate your gateway. Editing Basic Gateway Information You can use the Storage Gateway console to edit basic information for an existing gateway, including the gateway name, time zone, and CloudWatch log group. To edit basic information for an existing gateway 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose Gateways, then choose the gateway for which you want to edit basic information. Editing Gateway Information API Version 2013-06-30 73 AWS Storage Gateway Volume Gateway User Guide 3. 4. 5. 6. From the Actions dropdown menu, choose Edit gateway information. For Gateway name, enter a name for your gateway. You can search for this name to find your gateway on the list pages in the Storage Gateway console. Note Gateway names must be between 2 and 255 characters, and cannot include a slash (\ or /). Changing a gateway's name will disconnect any CloudWatch alarms set up to monitor the gateway. To reconnect the alarms, update the GatewayName for each alarm in the CloudWatch console. For Gateway time zone, choose the local time zone for the part of the world where you want to deploy your gateway. For Choose how to set up log group, choose how to set up Amazon CloudWatch Logs to monitor the health of your gateway. You can choose from the following options: • Create a new log group – Set up a new log group to monitor your gateway. • Use an existing log group – Choose an existing log group from the corresponding dropdown list. • Deactivate logging – Do not use Amazon CloudWatch Logs to monitor your gateway. 7. When you finish modifying the settings you want to change, choose Save changes. Adding and expanding volumes As your application needs grow, you might need to add more volumes to your gateway, or expand the size of existing volumes. When you add or expand volumes, you must consider the size of the cache storage and upload buffer you allocated to the gateway. The gateway must have sufficient buffer and cache space for new volumes. For more information, see Determining the size of upload buffer to allocate. You can add volumes using the Storage Gateway console or Storage Gateway API. For instructions on how to add a volume using the Storage Gateway console, see Creating a storage volume. For information about using the Storage Gateway API to add volumes, see CreateCachediSCSIVolume. You can expand the size of existing volumes using either of the following methods: Adding and expanding volumes API Version 2013-06-30 74 AWS Storage Gateway Volume Gateway User Guide • Create a snapshot of the volume you want to expand and then use the snapshot to create a new volume of a larger size. For information about how to create a snapshot, see Creating a recovery snapshot. For information about how to use a snapshot to create a new volume, see Creating a storage volume. • Use the cached volume you want to expand to clone a new volume of a larger size. For information about how to clone a volume, see Cloning a cached volume from a recovery point. For information about how to create a volume, see Creating a storage volume. Cloning a cached volume from a recovery point You can create a new volume from any existing cached volume in the same AWS Region. The new volume is created from the most recent recovery point of the selected volume. A volume recovery point is a point in time at which all data of the volume is consistent. To clone a volume, you choose the
storagegateway-vgw-ug-030
storagegateway-vgw-ug.pdf
30
new volume of a larger size. For information about how to clone a volume, see Cloning a cached volume from a recovery point. For information about how to create a volume, see Creating a storage volume. Cloning a cached volume from a recovery point You can create a new volume from any existing cached volume in the same AWS Region. The new volume is created from the most recent recovery point of the selected volume. A volume recovery point is a point in time at which all data of the volume is consistent. To clone a volume, you choose the Clone from last recovery point option in the Create volume dialog box, then select the volume to use as the source. Cloning from an existing volume is faster and more cost-effective than creating an Amazon EBS snapshot. Cloning does a byte-to-byte copy of your data from the source volume to the new volume, using the most recent recovery point from the source volume. Storage Gateway automatically creates recovery points for your cached volumes. To see when the last recovery point was created, check the TimeSinceLastRecoveryPoint metric in Amazon CloudWatch. The cloned volume is independent of the source volume. That is, changes made to either volume after cloning have no effect on the other. For example, if you delete the source volume, it has no effect on the cloned volume. You can clone a source volume while initiators are connected and it is in active use. Doing so doesn't affect the performance of the source volume. For information about how to clone a volume, see Creating a storage volume. You can also use the cloning process in recovery scenarios. For more information, see Your Cached Gateway is Unreachable And You Want to Recover Your Data. The following procedure shows you how to clone a volume from a volume recovery point and use that volume. To clone and use a volume from an unreachable gateway 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. Cloning a volume API Version 2013-06-30 75 AWS Storage Gateway Volume Gateway User Guide 2. On the Storage Gateway console, choose Create volume. 3. 4. In the Create volume dialog box, choose a gateway for Gateway. For Capacity, type the capacity for your volume. The capacity must be at least the same size as the source volume. 5. Choose Clone from last recovery point and select a volume ID for Source volume. The source volume can be any cached volume in the selected AWS Region. 6. Type a name for iSCSI target name. The target name can contain lowercase letters, numbers, periods (.), and hyphens (-). This target name appears as the iSCSI target node name in the Targets tab of the iSCSI Microsoft initiator UI after discovery. For example, the name target1 appears as iqn.1007-05.com.amazon:target1. Ensure that the target name is globally unique within your storage area network (SAN). 7. Verify that the Network interface setting is the IP address of your gateway, or choose an IP address for Network interface. If you have defined your gateway to use multiple network adapters, choose the IP address that your storage applications use to access the volume. Each network adapter defined for a gateway represents one IP address that you can choose. If the gateway VM is configured for more than one network adapter, the Create volume dialog box displays a list for Network interface. In this list, one IP address appears for each adapter configured for the gateway VM. If the gateway VM is configured for only one network adapter, no list appears because there's only one IP address. 8. Choose Create volume. The Configure CHAP Authentication dialog box appears. You can configure CHAP later. For information, see Configuring CHAP Authentication for Your iSCSI Targets. The next step is to connect your volume to your client. For more information, see Connecting your volumes to your client. Viewing volume usage When you write data to a volume, you can view the amount of data stored on the volume in the Storage Gateway Management Console. The Details tab for each volume shows the volume usage information. Viewing volume usage API Version 2013-06-30 76 AWS Storage Gateway Volume Gateway User Guide To view amount of data written to a volume 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. In the navigation pane, choose Volumes and then choose the volume you are interested in. 3. Choose the Details tab. The following fields provide information about the volume: • Size: The total capacity of the selected volume. • Used: The size of data stored on the volume. Note These values are not available for volumes created before May 13, 2015, until you store data on the volume. Deleting storage volumes You might need to delete a volume as your application needs
storagegateway-vgw-ug-031
storagegateway-vgw-ug.pdf
31
To view amount of data written to a volume 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. In the navigation pane, choose Volumes and then choose the volume you are interested in. 3. Choose the Details tab. The following fields provide information about the volume: • Size: The total capacity of the selected volume. • Used: The size of data stored on the volume. Note These values are not available for volumes created before May 13, 2015, until you store data on the volume. Deleting storage volumes You might need to delete a volume as your application needs change—for example, if you migrate your application to use a larger storage volume. Before you delete a volume, make sure that there are no applications currently writing to the volume. Also, make sure that there are no snapshots in progress for the volume. If a snapshot schedule is defined for the volume, you can check it on the Snapshot Schedules tab of the Storage Gateway console. For more information, see Editing a snapshot schedule. You can delete volumes using the Storage Gateway console or the Storage Gateway API. For information on using the Storage Gateway API to remove volumes, see Delete Volume. The following procedure demonstrates using the console. Before you delete a volume, back up your data or take a snapshot of your critical data. For stored volumes, your local disks aren't erased. After you delete a volume, you can't get it back. To delete a volume 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose Volumes, then select one or more volumes to delete. Deleting storage volumes API Version 2013-06-30 77 AWS Storage Gateway Volume Gateway User Guide 3. For Actions choose Delete volume. The confirmation dialog box appears. 4. Verify that you want to delete the specified volumes, then type the word delete in the confirmation box and choose Delete. Moving Your Volumes to a Different Gateway As your data and performance needs grow, you might want to move your volumes to a different Volume Gateway. To do so, you can detach and attach a volume by using the Storage Gateway console or API. By detaching and attaching a volume, you can do the following: • Move your volumes to better host platforms or newer Amazon EC2 instances. • Refresh the underlying hardware for your server. • Move your volumes between hypervisor types. When you detach a volume, your gateway uploads and stores the volume data and metadata to the Storage Gateway service in AWS. You can easily attach a detached volume to a gateway on any supported host platform later. Note A detached volume is billed at the standard volume storage rate until you delete it. For information about how to reduce your bill, see Reducing the amount of billed storage on a volume. Note There are some limitations for attaching and detaching volumes: • Detaching a volume can take a long time. When you detach a volume, the gateway uploads all the data on the volume to AWS before the volume is detached. The time it takes for the upload to complete depends on how much data needs to be uploaded and your network connectivity into AWS. • If you detach a cached volume, you can't reattach it as a stored volume. Moving Your Volumes to a Different Gateway API Version 2013-06-30 78 AWS Storage Gateway Volume Gateway User Guide • If you detach a stored volume, you can't reattach it as a cached volume. • A detached volume can't be used until it is attached to a gateway. • When you attach a stored volume, it needs to fully restore before you can attach it to a gateway. • When you start attaching or detaching a volume, you need to wait till the operation completed before you use the volume. • Currently, forcibly deleting a volume is only supported in the API. • If you delete a gateway while your volume is detaching from that gateway, it results in data loss. Wait until the volume detach operation is complete before you delete the gateway. • If a stored gateway is in restoring state, you can't detach a volume from it. The following steps show you how to detach and attach a volume using the Storage Gateway console. For more information about doing this using the API, see DetachVolume or AttachVolume in the AWS Storage Gateway API Reference. To detach a volume from a gateway 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose Volumes, the select one or more volumes to detach. 3. For Actions, choose Detach volume. The confirmation dialog box appears. 4. Verify that you want to detach the specified volumes, then type the word detach in the confirmation box and choose Detach. Note If a volume that
storagegateway-vgw-ug-032
storagegateway-vgw-ug.pdf
32
steps show you how to detach and attach a volume using the Storage Gateway console. For more information about doing this using the API, see DetachVolume or AttachVolume in the AWS Storage Gateway API Reference. To detach a volume from a gateway 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose Volumes, the select one or more volumes to detach. 3. For Actions, choose Detach volume. The confirmation dialog box appears. 4. Verify that you want to detach the specified volumes, then type the word detach in the confirmation box and choose Detach. Note If a volume that you detach has a lot of data on it, it transitions from Attached to Detaching status until it finishes uploading all the data. Then the status changes to Detached. For small amounts of data, you might not see the Detaching status. If the volume doesn't have data on it, the status changes from Attached to Detached. You can now attach the volume to a different gateway. Moving Your Volumes to a Different Gateway API Version 2013-06-30 79 AWS Storage Gateway Volume Gateway User Guide To attach a volume to a gateway 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. On the navigation pane, choose Volumes. The status of each volume that is detached shows as Detached. 3. 4. 5. From the list of detached volumes, choose the volume that you want to attach. You can attach only one volume at a time. For Actions, choose Attach volume. In the Attach Volume dialog box, choose the gateway that you want to attach the volume to, and then enter the iSCSI target that you want to connect the volume to. If you are attaching a stored volume, enter its disk identifier for Disk ID. 6. Choose Attach volume. If a volume that you attach has a lot of data on it, it transitions from Detached to Attached if the AttachVolume operation succeeds. 7. In the Configure CHAP authentication wizard that appears, enter the Initiator name, Initiator secret, and Target secret, and then choose Save. For more information about working with Challenge-Handshake Authentication Protocol (CHAP) authentication, see Configuring CHAP Authentication for Your iSCSI Targets. Creating a recovery snapshot The following procedure shows you how to create a recovery snapshot from a volume recovery point for a gateway, and where to find that snapshot in the Storage Gateway console after you create it. You can take recovery snapshots on a one time, ad hoc basis or you can set up a snapshot schedule to take recurring snapshots of the volume at regular intervals that you specify. To create and use a recovery snapshot of a volume from an existing gateway 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. In the navigation pane on the left side of the console page, choose Gateways. 3. Choose the gateway for which you want to create a snapshot, and then choose the Details tab. The Details tab displays a recovery snapshot message for the selected gateway. 4. Choose Create recovery snapshot to open the Create recovery snapshot dialog box. Creating a recovery snapshot API Version 2013-06-30 80 AWS Storage Gateway Volume Gateway User Guide 5. From the list of volumes that appears, choose the volume that you want to recover, and then choose Create snapshots. Storage Gateway initiates the snapshot process for the specified volume. When the snapshot process is complete, you can find the snapshot listed in the Snapshots column when viewing the volume on the Volumes page of the Storage Gateway console. Editing a snapshot schedule For stored volumes, AWS Storage Gateway creates a default snapshot schedule of once a day. Note You can't remove the default snapshot schedule. Stored volumes require at least one snapshot schedule. However, you can change a snapshot schedule by specifying either the time the snapshot occurs each day or the frequency (every 1, 2, 4, 8, 12, or 24 hours), or both. For cached volumes, AWS Storage Gateway doesn't create a default snapshot schedule. No default schedule is created because your data is stored in Amazon S3, so you don't need snapshots or a snapshot schedule for disaster recovery purposes. However, you can set up a snapshot schedule at any time if you need to. Creating snapshot for your cached volume provides an additional way to recover your data if necessary. By using the following steps, you can edit the snapshot schedule for a volume. To edit the snapshot schedule for a volume 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. 3. 4. In the navigation pane, choose Volumes, and then choose the volume the snapshot was created from. For Actions, choose Edit snapshot schedule. In the Edit snapshot schedule dialog box, modify the schedule, and then choose Save. Editing a snapshot schedule API
storagegateway-vgw-ug-033
storagegateway-vgw-ug.pdf
33
snapshot schedule at any time if you need to. Creating snapshot for your cached volume provides an additional way to recover your data if necessary. By using the following steps, you can edit the snapshot schedule for a volume. To edit the snapshot schedule for a volume 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. 3. 4. In the navigation pane, choose Volumes, and then choose the volume the snapshot was created from. For Actions, choose Edit snapshot schedule. In the Edit snapshot schedule dialog box, modify the schedule, and then choose Save. Editing a snapshot schedule API Version 2013-06-30 81 AWS Storage Gateway Volume Gateway User Guide Deleting snapshots of your storage volumes You can delete a snapshot of your storage volume. For example, you might want to do this if you have taken many snapshots of a storage volume over time and you don't need the older snapshots. Because snapshots are incremental backups, if you delete a snapshot, only the data that is not needed in other snapshots is deleted. Topics • Deleting Snapshots by Using the AWS SDK for Java • Deleting Snapshots by Using the AWS SDK for .NET • Deleting Snapshots by Using the AWS Tools for Windows PowerShell On the Amazon EBS console, you can delete snapshots one at a time. For information about how to delete snapshots using the Amazon EBS console, see Deleting an Amazon EBS Snapshot in the Amazon EC2 User Guide. To delete multiple snapshots at a time, you can use one of the AWS SDKs that supports Storage Gateway operations. For examples, see Deleting Snapshots by Using the AWS SDK for Java, Deleting Snapshots by Using the AWS SDK for .NET, and Deleting Snapshots by Using the AWS Tools for Windows PowerShell. Deleting Snapshots by Using the AWS SDK for Java To delete many snapshots associated with a volume, you can use a programmatic approach. The example following demonstrates how to delete snapshots using the AWS SDK for Java. To use the example code, you should be familiar with running a Java console application. For more information, see Getting Started in the AWS SDK for Java Developer Guide. If you need to just delete a few snapshots, use the console as described in Deleting snapshots of your storage volumes. Example : Deleting Snapshots by Using the AWS SDK for Java The following Java code example lists the snapshots for each volume of a gateway and whether the snapshot start time is before or after a specified date. It uses the AWS SDK for Java API for Storage Gateway and Amazon EC2. The Amazon EC2 API includes operations for working with snapshots. Deleting Snapshots API Version 2013-06-30 82 AWS Storage Gateway Volume Gateway User Guide Update the code to provide the service endpoint, your gateway Amazon Resource Name (ARN), and the number of days back you want to save snapshots. Snapshots taken before this cutoff are deleted. You also need to specify the Boolean value viewOnly, which indicates whether you want to view the snapshots to be deleted or to actually perform the snapshot deletions. Run the code first with just the view option (that is, with viewOnly set to true) to see what the code deletes. For a list of AWS service endpoints you can use with Storage Gateway, see AWS Storage Gateway Endpoints and Quotas in the AWS General Reference. import java.io.IOException; import java.util.ArrayList; import java.util.Calendar; import java.util.Collection; import java.util.Date; import java.util.GregorianCalendar; import java.util.List; import com.amazonaws.auth.PropertiesCredentials; import com.amazonaws.services.ec2.AmazonEC2Client; import com.amazonaws.services.ec2.model.DeleteSnapshotRequest; import com.amazonaws.services.ec2.model.DescribeSnapshotsRequest; import com.amazonaws.services.ec2.model.DescribeSnapshotsResult; import com.amazonaws.services.ec2.model.Filter; import com.amazonaws.services.ec2.model.Snapshot; import com.amazonaws.services.storagegateway.AWSStorageGatewayClient; import com.amazonaws.services.storagegateway.model.ListVolumesRequest; import com.amazonaws.services.storagegateway.model.ListVolumesResult; import com.amazonaws.services.storagegateway.model.VolumeInfo; public class ListDeleteVolumeSnapshotsExample { public static AWSStorageGatewayClient sgClient; public static AmazonEC2Client ec2Client; static String serviceURLSG = "https://storagegateway.us-east-1.amazonaws.com"; static String serviceURLEC2 = "https://ec2.us-east-1.amazonaws.com"; // The gatewayARN public static String gatewayARN = "*** provide gateway ARN ***"; // The number of days back you want to save snapshots. Snapshots before this cutoff are deleted // if viewOnly = false. public static int daysBack = 10; Using the AWS SDK for Java API Version 2013-06-30 83 AWS Storage Gateway Volume Gateway User Guide // true = show what will be deleted; false = actually delete snapshots that meet the daysBack criteria public static boolean viewOnly = true; public static void main(String[] args) throws IOException { // Create a Storage Gateway and amazon ec2 client sgClient = new AWSStorageGatewayClient(new PropertiesCredentials( ListDeleteVolumeSnapshotsExample.class.getResourceAsStream("AwsCredentials.properties"))); sgClient.setEndpoint(serviceURLSG); ec2Client = new AmazonEC2Client(new PropertiesCredentials( ListDeleteVolumeSnapshotsExample.class.getResourceAsStream("AwsCredentials.properties"))); ec2Client.setEndpoint(serviceURLEC2); List<VolumeInfo> volumes = ListVolumesForGateway(); DeleteSnapshotsForVolumes(volumes, daysBack); } public static List<VolumeInfo> ListVolumesForGateway() { List<VolumeInfo> volumes = new ArrayList<VolumeInfo>(); String marker = null; do { ListVolumesRequest request = new ListVolumesRequest().withGatewayARN(gatewayARN); ListVolumesResult result = sgClient.listVolumes(request); marker = result.getMarker(); for (VolumeInfo vi : result.getVolumeInfos()) { volumes.add(vi); System.out.println(OutputVolumeInfo(vi)); } } while (marker != null); return volumes; } private static void DeleteSnapshotsForVolumes(List<VolumeInfo> volumes, Using the AWS SDK for Java API Version
storagegateway-vgw-ug-034
storagegateway-vgw-ug.pdf
34
boolean viewOnly = true; public static void main(String[] args) throws IOException { // Create a Storage Gateway and amazon ec2 client sgClient = new AWSStorageGatewayClient(new PropertiesCredentials( ListDeleteVolumeSnapshotsExample.class.getResourceAsStream("AwsCredentials.properties"))); sgClient.setEndpoint(serviceURLSG); ec2Client = new AmazonEC2Client(new PropertiesCredentials( ListDeleteVolumeSnapshotsExample.class.getResourceAsStream("AwsCredentials.properties"))); ec2Client.setEndpoint(serviceURLEC2); List<VolumeInfo> volumes = ListVolumesForGateway(); DeleteSnapshotsForVolumes(volumes, daysBack); } public static List<VolumeInfo> ListVolumesForGateway() { List<VolumeInfo> volumes = new ArrayList<VolumeInfo>(); String marker = null; do { ListVolumesRequest request = new ListVolumesRequest().withGatewayARN(gatewayARN); ListVolumesResult result = sgClient.listVolumes(request); marker = result.getMarker(); for (VolumeInfo vi : result.getVolumeInfos()) { volumes.add(vi); System.out.println(OutputVolumeInfo(vi)); } } while (marker != null); return volumes; } private static void DeleteSnapshotsForVolumes(List<VolumeInfo> volumes, Using the AWS SDK for Java API Version 2013-06-30 84 AWS Storage Gateway Volume Gateway User Guide int daysBack2) { // Find snapshots and delete for each volume for (VolumeInfo vi : volumes) { String volumeARN = vi.getVolumeARN(); String volumeId = volumeARN.substring(volumeARN.lastIndexOf("/")+1).toLowerCase(); Collection<Filter> filters = new ArrayList<Filter>(); Filter filter = new Filter().withName("volume-id").withValues(volumeId); filters.add(filter); DescribeSnapshotsRequest describeSnapshotsRequest = new DescribeSnapshotsRequest().withFilters(filters); DescribeSnapshotsResult describeSnapshotsResult = ec2Client.describeSnapshots(describeSnapshotsRequest); List<Snapshot> snapshots = describeSnapshotsResult.getSnapshots(); System.out.println("volume-id = " + volumeId); for (Snapshot s : snapshots){ StringBuilder sb = new StringBuilder(); boolean meetsCriteria = !CompareDates(daysBack, s.getStartTime()); sb.append(s.getSnapshotId() + ", " + s.getStartTime().toString()); sb.append(", meets criteria for delete? " + meetsCriteria); sb.append(", deleted? "); if (!viewOnly & meetsCriteria) { sb.append("yes"); DeleteSnapshotRequest deleteSnapshotRequest = new DeleteSnapshotRequest().withSnapshotId(s.getSnapshotId()); ec2Client.deleteSnapshot(deleteSnapshotRequest); } else { sb.append("no"); } System.out.println(sb.toString()); } } } private static String OutputVolumeInfo(VolumeInfo vi) { String volumeInfo = String.format( "Volume Info:\n" + Using the AWS SDK for Java API Version 2013-06-30 85 AWS Storage Gateway Volume Gateway User Guide " ARN: %s\n" + " Type: %s\n", vi.getVolumeARN(), vi.getVolumeType()); return volumeInfo; } // Returns the date in two formats as a list public static boolean CompareDates(int daysBack, Date snapshotDate) { Date today = new Date(); Calendar cal = new GregorianCalendar(); cal.setTime(today); cal.add(Calendar.DAY_OF_MONTH, -daysBack); Date cutoffDate = cal.getTime(); return (snapshotDate.compareTo(cutoffDate) > 0) ? true : false; } } Deleting Snapshots by Using the AWS SDK for .NET To delete many snapshots associated with a volume, you can use a programmatic approach. The following example demonstrates how to delete snapshots using the AWS SDK for .NET version 2 and 3. To use the example code, you should be familiar with running a .NET console application. For more information, see Getting Started in the AWS SDK for .NET Developer Guide. If you need to just delete a few snapshots, use the console as described in Deleting snapshots of your storage volumes. Example : Deleting Snapshots by Using the AWS SDK for .NET In the following C# code example, an AWS Identity and Access Management user can list the snapshots for each volume of a gateway. The user can then determine whether the snapshot start time is before or after a specified date (retention period) and delete snapshots that have passed the retention period. The example uses the AWS SDK for .NET API for Storage Gateway and Amazon EC2. The Amazon EC2 API includes operations for working with snapshots. The following code example uses the AWS SDK for .NET version 2 and 3. You can migrate older versions of .NET to the newer version. For more information, see Migrating Your Code to the Latest Version of the AWS SDK for .NET. Using the AWS SDK for .NET API Version 2013-06-30 86 AWS Storage Gateway Volume Gateway User Guide Update the code to provide the service endpoint, your gateway Amazon Resource Name (ARN), and the number of days back you want to save snapshots. Snapshots taken before this cutoff are deleted. You also need to specify the Boolean value viewOnly, which indicates whether you want to view the snapshots to be deleted or to actually perform the snapshot deletions. Run the code first with just the view option (that is, with viewOnly set to true) to see what the code deletes. For a list of AWS service endpoints you can use with Storage Gateway, see AWS Storage Gateway Endpoints and Quotas in the AWS General Reference. First, you create an user and attach the minimum IAM policy to the user. Then you schedule automated snapshots for your gateway. The following code creates the minimum policy that allows an user to delete snapshots. In this example, the policy is named sgw-delete-snapshot. { "Version": "2012-10-17", "Statement": [ { "Sid": "StmtEC2Snapshots", "Effect": "Allow", "Action": [ "ec2:DeleteSnapshot", "ec2:DescribeSnapshots" ], "Resource": [ "*" ] }, { "Sid": "StmtSgwListVolumes", "Effect": "Allow", "Action": [ "storagegateway:ListVolumes" ], "Resource": [ "*" ] } ] } Using the AWS SDK for .NET API Version 2013-06-30 87 AWS Storage Gateway Volume Gateway User Guide The following C# code finds all snapshots in the specified gateway that match the volumes and the specified cut-off period and then deletes them. using System; using System.Collections.Generic; using System.Text; using Amazon.EC2; using Amazon.EC2.Model; using Amazon.StorageGateway.Model; using Amazon.StorageGateway; namespace DeleteStorageGatewaySnapshotNS { class Program { /* * Replace the variables below to match your environment. */ /*
storagegateway-vgw-ug-035
storagegateway-vgw-ug.pdf
35
"Allow", "Action": [ "ec2:DeleteSnapshot", "ec2:DescribeSnapshots" ], "Resource": [ "*" ] }, { "Sid": "StmtSgwListVolumes", "Effect": "Allow", "Action": [ "storagegateway:ListVolumes" ], "Resource": [ "*" ] } ] } Using the AWS SDK for .NET API Version 2013-06-30 87 AWS Storage Gateway Volume Gateway User Guide The following C# code finds all snapshots in the specified gateway that match the volumes and the specified cut-off period and then deletes them. using System; using System.Collections.Generic; using System.Text; using Amazon.EC2; using Amazon.EC2.Model; using Amazon.StorageGateway.Model; using Amazon.StorageGateway; namespace DeleteStorageGatewaySnapshotNS { class Program { /* * Replace the variables below to match your environment. */ /* IAM AccessKey */ static String AwsAccessKey = "AKIA................"; /* IAM SecretKey */ static String AwsSecretKey = "*******************************"; /* Account number, 12 digits, no hyphen */ static String OwnerID = "123456789012"; /* Your Gateway ARN. Use a Storage Gateway ID, sgw-XXXXXXXX* */ static String GatewayARN = "arn:aws:storagegateway:ap- southeast-2:123456789012:gateway/sgw-XXXXXXXX"; /* Snapshot status: "completed", "pending", "error" */ static String SnapshotStatus = "completed"; /* Region where your gateway is activated */ static String AwsRegion = "ap-southeast-2"; /* Minimum age of snapshots before they are deleted (retention policy) */ static int daysBack = 30; /* Using the AWS SDK for .NET API Version 2013-06-30 88 AWS Storage Gateway Volume Gateway User Guide * Do not modify the four lines below. */ static AmazonEC2Config ec2Config; static AmazonEC2Client ec2Client; static AmazonStorageGatewayClient sgClient; static AmazonStorageGatewayConfig sgConfig; static void Main(string[] args) { // Create an EC2 client. ec2Config = new AmazonEC2Config(); ec2Config.ServiceURL = "https://ec2." + AwsRegion + ".amazonaws.com"; ec2Client = new AmazonEC2Client(AwsAccessKey, AwsSecretKey, ec2Config); // Create a Storage Gateway client. sgConfig = new AmazonStorageGatewayConfig(); sgConfig.ServiceURL = "https://storagegateway." + AwsRegion + ".amazonaws.com"; sgClient = new AmazonStorageGatewayClient(AwsAccessKey, AwsSecretKey, sgConfig); List<VolumeInfo> StorageGatewayVolumes = ListVolumesForGateway(); List<Snapshot> StorageGatewaySnapshots = ListSnapshotsForVolumes(StorageGatewayVolumes, daysBack); DeleteSnapshots(StorageGatewaySnapshots); } /* * List all volumes for your gateway * returns: A list of VolumeInfos, or null. */ private static List<VolumeInfo> ListVolumesForGateway() { ListVolumesResponse response = new ListVolumesResponse(); try { ListVolumesRequest request = new ListVolumesRequest(); request.GatewayARN = GatewayARN; response = sgClient.ListVolumes(request); foreach (VolumeInfo vi in response.VolumeInfos) { Console.WriteLine(OutputVolumeInfo(vi)); Using the AWS SDK for .NET API Version 2013-06-30 89 Volume Gateway User Guide AWS Storage Gateway } } catch (AmazonStorageGatewayException ex) { Console.WriteLine(ex.Message); } return response.VolumeInfos; } /* * Gets the list of snapshots that match the requested volumes * and cutoff period. */ private static List<Snapshot> ListSnapshotsForVolumes(List<VolumeInfo> volumes, int snapshotAge) { List<Snapshot> SelectedSnapshots = new List<Snapshot>(); try { foreach (VolumeInfo vi in volumes) { String volumeARN = vi.VolumeARN; String volumeID = volumeARN.Substring(volumeARN.LastIndexOf("/") + 1).ToLower(); DescribeSnapshotsRequest describeSnapshotsRequest = new DescribeSnapshotsRequest(); Filter ownerFilter = new Filter(); List<String> ownerValues = new List<String>(); ownerValues.Add(OwnerID); ownerFilter.Name = "owner-id"; ownerFilter.Values = ownerValues; describeSnapshotsRequest.Filters.Add(ownerFilter); Filter statusFilter = new Filter(); List<String> statusValues = new List<String>(); statusValues.Add(SnapshotStatus); statusFilter.Name = "status"; statusFilter.Values = statusValues; describeSnapshotsRequest.Filters.Add(statusFilter); Filter volumeFilter = new Filter(); List<String> volumeValues = new List<String>(); Using the AWS SDK for .NET API Version 2013-06-30 90 AWS Storage Gateway Volume Gateway User Guide volumeValues.Add(volumeID); volumeFilter.Name = "volume-id"; volumeFilter.Values = volumeValues; describeSnapshotsRequest.Filters.Add(volumeFilter); DescribeSnapshotsResponse describeSnapshotsResponse = ec2Client.DescribeSnapshots(describeSnapshotsRequest); List<Snapshot> snapshots = describeSnapshotsResponse.Snapshots; Console.WriteLine("volume-id = " + volumeID); foreach (Snapshot s in snapshots) { if (IsSnapshotPastRetentionPeriod(snapshotAge, s.StartTime)) { Console.WriteLine(s.SnapshotId + ", " + s.VolumeId + ", " + s.StartTime + ", " + s.Description); SelectedSnapshots.Add(s); } } } } catch (AmazonEC2Exception ex) { Console.WriteLine(ex.Message); } return SelectedSnapshots; } /* * Deletes a list of snapshots. */ private static void DeleteSnapshots(List<Snapshot> snapshots) { try { foreach (Snapshot s in snapshots) { DeleteSnapshotRequest deleteSnapshotRequest = new DeleteSnapshotRequest(s.SnapshotId); DeleteSnapshotResponse response = ec2Client.DeleteSnapshot(deleteSnapshotRequest); Console.WriteLine("Volume: " + s.VolumeId + Using the AWS SDK for .NET API Version 2013-06-30 91 AWS Storage Gateway Volume Gateway User Guide " => Snapshot: " + s.SnapshotId + " Response: " + response.HttpStatusCode.ToString()); } } catch (AmazonEC2Exception ex) { Console.WriteLine(ex.Message); } } /* * Checks if the snapshot creation date is past the retention period. */ private static Boolean IsSnapshotPastRetentionPeriod(int daysBack, DateTime snapshotDate) { DateTime cutoffDate = DateTime.Now.Add(new TimeSpan(-daysBack, 0, 0, 0)); return (DateTime.Compare(snapshotDate, cutoffDate) < 0) ? true : false; } /* * Displays information related to a volume. */ private static String OutputVolumeInfo(VolumeInfo vi) { String volumeInfo = String.Format( "Volume Info:\n" + " ARN: {0}\n" + " Type: {1}\n", vi.VolumeARN, vi.VolumeType); return volumeInfo; } } } Deleting Snapshots by Using the AWS Tools for Windows PowerShell To delete many snapshots associated with a volume, you can use a programmatic approach. The example following demonstrates how to delete snapshots using the AWS Tools for Windows PowerShell. To use the example script, you should be familiar with running a PowerShell script. Using the AWS Tools for Windows PowerShell API Version 2013-06-30 92 AWS Storage Gateway Volume Gateway User Guide For more information, see Getting Started in the AWS Tools for Windows PowerShell. If you need to delete just a few snapshots, use the console as described in Deleting snapshots of your storage volumes. Example : Deleting Snapshots
storagegateway-vgw-ug-036
storagegateway-vgw-ug.pdf
36
PowerShell To delete many snapshots associated with a volume, you can use a programmatic approach. The example following demonstrates how to delete snapshots using the AWS Tools for Windows PowerShell. To use the example script, you should be familiar with running a PowerShell script. Using the AWS Tools for Windows PowerShell API Version 2013-06-30 92 AWS Storage Gateway Volume Gateway User Guide For more information, see Getting Started in the AWS Tools for Windows PowerShell. If you need to delete just a few snapshots, use the console as described in Deleting snapshots of your storage volumes. Example : Deleting Snapshots by Using the AWS Tools for Windows PowerShell The following PowerShell script example lists the snapshots for each volume of a gateway and whether the snapshot start time is before or after a specified date. It uses the AWS Tools for Windows PowerShell cmdlets for Storage Gateway and Amazon EC2. The Amazon EC2 API includes operations for working with snapshots. You need to update the script and provide your gateway Amazon Resource Name (ARN) and the number of days back you want to save snapshots. Snapshots taken before this cutoff are deleted. You also need to specify the Boolean value viewOnly, which indicates whether you want to view the snapshots to be deleted or to actually perform the snapshot deletions. Run the code first with just the view option (that is, with viewOnly set to true) to see what the code deletes. <# .DESCRIPTION Delete snapshots of a specified volume that match given criteria. .NOTES PREREQUISITES: 1) AWS Tools for Windows PowerShell from https://aws.amazon.com/powershell/ 2) Credentials and AWS Region stored in session using Initialize-AWSDefault. For more info see, https://docs.aws.amazon.com/powershell/latest/userguide/ specifying-your-aws-credentials.html .EXAMPLE powershell.exe .\SG_DeleteSnapshots.ps1 #> # Criteria to use to filter the results returned. $daysBack = 18 $gatewayARN = "*** provide gateway ARN ***" $viewOnly = $true; #ListVolumes $volumesResult = Get-SGVolume -GatewayARN $gatewayARN $volumes = $volumesResult.VolumeInfos Write-Output("`nVolume List") foreach ($volumes in $volumesResult) Using the AWS Tools for Windows PowerShell API Version 2013-06-30 93 AWS Storage Gateway Volume Gateway User Guide { Write-Output("`nVolume Info:") Write-Output("ARN: " + $volumes.VolumeARN) write-Output("Type: " + $volumes.VolumeType) } Write-Output("`nWhich snapshots meet the criteria?") foreach ($volume in $volumesResult) { $volumeARN = $volume.VolumeARN $volumeId = ($volumeARN-split"/")[3].ToLower() $filter = New-Object Amazon.EC2.Model.Filter $filter.Name = "volume-id" $filter.Value.Add($volumeId) $snapshots = get-EC2Snapshot -Filter $filter Write-Output("`nFor volume-id = " + $volumeId) foreach ($s in $snapshots) { $d = ([DateTime]::Now).AddDays(-$daysBack) $meetsCriteria = $false if ([DateTime]::Compare($d, $s.StartTime) -gt 0) { $meetsCriteria = $true } $sb = $s.SnapshotId + ", " + $s.StartTime + ", meets criteria for delete? " + $meetsCriteria if (!$viewOnly -AND $meetsCriteria) { $resp = Remove-EC2Snapshot -SnapshotId $s.SnapshotId #Can get RequestId from response for troubleshooting. $sb = $sb + ", deleted? yes" } else { $sb = $sb + ", deleted? no" } Write-Output($sb) } } Using the AWS Tools for Windows PowerShell API Version 2013-06-30 94 AWS Storage Gateway Volume Gateway User Guide Understanding Volume Statuses and Transitions Each volume has an associated status that tells you at a glance what the health of the volume is. Most of the time, the status indicates that the volume is functioning normally and that no action is needed on your part. In some cases, the status indicates a problem with the volume that might or might not require action on your part. You can find information following to help you decide when you need to act. You can see volume status on the Storage Gateway console or by using one of the Storage Gateway API operations, for example DescribeCachediSCSIVolumes or DescribeStorediSCSIVolumes. Topics • Understanding Volume Status • Understanding Attachment Status • Understanding Cached Volume Status Transitions • Understanding Stored Volume Status Transitions Understanding Volume Status The following table shows volume status on the Storage Gateway console. Volume status appears in the Status column for each storage volume on your gateway. A volume that is functioning normally has a status of Available. In the following table, you can find a description of each storage volume status, and if and when you should act based on each status. The Available status is the normal status of a volume. A volume should have this status all or most of the time it's in use. Status Available Meaning The volume is available for use. This status is the normal running st atus for a volume. When a Bootstrapping phase is completed, the volume returns to Available state. That is, the gateway has synchronized any changes made to the volume since it first entered Pass Through status. Bootstrapping The gateway is synchronizing data locally with a copy of the data stored in AWS. You typically don't need to take action for this status, Understanding Volume Status and Transitions API Version 2013-06-30 95 AWS Storage Gateway Volume Gateway User Guide Status Meaning because the storage volume automatically sees the Available status
storagegateway-vgw-ug-037
storagegateway-vgw-ug.pdf
37
volume is available for use. This status is the normal running st atus for a volume. When a Bootstrapping phase is completed, the volume returns to Available state. That is, the gateway has synchronized any changes made to the volume since it first entered Pass Through status. Bootstrapping The gateway is synchronizing data locally with a copy of the data stored in AWS. You typically don't need to take action for this status, Understanding Volume Status and Transitions API Version 2013-06-30 95 AWS Storage Gateway Volume Gateway User Guide Status Meaning because the storage volume automatically sees the Available status in most cases. The following are scenarios when a volume status is Bootstrapping: • • • A gateway has unexpectedly shut down. A gateway's upload buffer has been exceeded. In this scenario, bootstrapping occurs when your volume has the Pass Through status and the amount of free upload buffer increases sufficiently. You can provide additional upload buffer space as one way to incre ase the percentage of free upload buffer space. In this particular scenario, the storage volume goes from Pass Through to Bootstrap ping to Available status. You can continue to use this volume during this bootstrapping period. However, you can't take snapshots of the volume at this point. You are creating a stored Volume Gateway and preserving existing local disk data. In this scenario, your gateway starts uploading all of the data to AWS. The volume has the Bootstrapping status until all of the data from the local disk is copied to AWS. You can use the volume during this bootstrapping period. However, you can't take snapshots of the volume at this point. The volume is currently being created and is not ready for use. The Creating status is transitional. No action is required. The volume is currently being deleted. The Deleting status is transitio nal. No action is required. An error occurred from which the volume cannot recover. For inform ation on what to do in this situation, see Troubleshooting volume issues. Creating Deleting Irrecoverable Understanding Volume Status API Version 2013-06-30 96 AWS Storage Gateway Volume Gateway User Guide Status Meaning Pass Through Data maintained locally is out of sync with data stored in AWS. Data written to a volume while the volume is in Pass Through status remains in the cache until the volume status is Bootstrapping. This data starts to upload to AWS when Bootstrapping status begins. The Pass Through status can occur for several reasons, listed following : • • The Pass Through status occurs if your gateway has run out of upload buffer space. Your applications can continue to read from and write data to your storage volumes while the volumes have the Pass Through status. However, the gateway isn't writing any of your volume data to its upload buffer or uploading any of this data to AWS. The gateway continues to upload any data written to the volume before the volume entered the Pass Through status. Any pending or scheduled snapshots of a storage volume fail while the volume has the Pass Through status. For information about what to do when your storage volume has the Pass Through status because the uplo ad buffer has been exceeded, see Troubleshooting volume issues. To return to ACTIVE status, a volume in Pass Through must complete the Bootstrapping phase. During Bootstrapping, the volume re-establishes synchronization within AWS, so that it can resume the record (log) of changes to the volume, and activate CreateSnapshot functionality. During Bootstrapping, writes to the volume are recorded in upload buffer. The Pass Through status occurs when there is more than one storage volume bootstrapping at once. Only one gateway storage volume can bootstrap at a time. For example, suppose that you create two storage volumes and choose to preserve existing data on both of them. In this case, the second storage volume has the Pass Through status until the first storage volume finishes bootstrap Understanding Volume Status API Version 2013-06-30 97 AWS Storage Gateway Volume Gateway User Guide Status Meaning ping. In this scenario, you don't need to act. Each storage volume changes to the Available status automatically when it is finished being created. You can read and write to the storage volume while it has the Pass Through or Bootstrapping status. • • • Infrequently, the Pass Through status can indicate that a disk allocated for upload buffer use has failed. For information about what action to take in this scenario, see Troubleshooting volume issues. The Pass Through status can occur when a volume is in Active or Bootstrapping state. In this case, the volume receives a write, but the upload buffer has insufficient capacity to record (log) that write. The Pass Through status occurs when a volume is in any state and the gateway is not shut down
storagegateway-vgw-ug-038
storagegateway-vgw-ug.pdf
38
the storage volume while it has the Pass Through or Bootstrapping status. • • • Infrequently, the Pass Through status can indicate that a disk allocated for upload buffer use has failed. For information about what action to take in this scenario, see Troubleshooting volume issues. The Pass Through status can occur when a volume is in Active or Bootstrapping state. In this case, the volume receives a write, but the upload buffer has insufficient capacity to record (log) that write. The Pass Through status occurs when a volume is in any state and the gateway is not shut down cleanly. This type of shutdown can happen because the software crashed or the VM was powered off. In this case, a volume in any state transitions to Pass Through status. Restoring The volume is being restored from an existing snapshot. This statu s applies only for stored volumes. For more information, see How Volume Gateway works. If you restore two storage volumes at the same time, both storage vo lumes show Restoring as their status. Each storage volume changes to the Available status automatically when it is finished being created. You can read and write to a storage volume and take a snapshot of it while it has the Restoring status. Understanding Volume Status API Version 2013-06-30 98 AWS Storage Gateway Volume Gateway User Guide Status Meaning Restoring Pass Through The volume is being restored from an existing snapshot and has encountered an upload buffer issue. This status applies only for stored volumes. For more information, see How Volume Gateway works. One reason that can cause the Restoring Pass Through status is if your gateway has run out of upload buffer space. Your applications can continue to read from and write data to your storage volumes while they have the Restoring Pass Through status. However, you can't take snapshots of a storage volume during the Restoring Pass Through status period. For information about what action to take when your storage volume has the Restoring Pass Through status because up load buffer capacity has been exceeded, see Troubleshooting volume issues. Infrequently, the Restoring Pass Through status can indicate that a disk allocated for an upload buffer has failed. For information about what action to take in this scenario, see Troubleshooting volume issues. Upload Buffer Not Configured You can't create or use the volume because the gateway doesn't have an upload buffer configured. For information on how to add upload buffer capacity for volumes in a cached volume setup, see Determini ng the size of upload buffer to allocate. For information on how to add upload buffer capacity for volumes in a stored volume setup, see Determining the size of upload buffer to allocate. Understanding Attachment Status You can detach a volume from a gateway or attach it to a gateway by using the Storage Gateway console or API. The following table shows volume attachment status on the Storage Gateway console. Volume attachment status appears in the Attachment status column for each storage volume on your gateway. For example, a volume that is detached from a gateway has a status of Detached. For information about how to detach and attach a volume, see Moving Your Volumes to a Different Gateway. Understanding Volume Status API Version 2013-06-30 99 AWS Storage Gateway Volume Gateway User Guide Status Meaning Attached Detached Detaching The volume is attached to a gateway. The volume is detached from a gateway. The volume is being detached from a gateway. When you are detach ing a volume and the volume doesn't have data on it, you might not see this status. Understanding Cached Volume Status Transitions Use the following state diagram to understand the most common transitions between statuses for volumes in cached gateways. You don't need to understand the diagram in detail to use your gateway effectively. Rather, the diagram provides detailed information if you are interested in knowing more about how Volume Gateways work. The diagram doesn't show the Upload Buffer Not Configured status or the Deleting status. Volume states in the diagram appear as green, yellow, and red boxes. You can interpret the colors as described following. Color Green Yellow Volume Status The gateway is operating normally. The volume status is Available or eventually becomes Available. The volume has the Pass Through status, which indicates there is a potential issue with the storage volume. If this status appears because the upload buffer space is filled, then in some cases buffer space becomes available again. At that point, the storage volume self-corrects to the Available status. In other cases, you might have to add more upload buffer space to your gateway to allow the storage volume status to become Available. For information on how Understanding Cached Volume Status Transitions API Version 2013-06-30 100 AWS Storage Gateway Color Red Volume
storagegateway-vgw-ug-039
storagegateway-vgw-ug.pdf
39
volume status is Available or eventually becomes Available. The volume has the Pass Through status, which indicates there is a potential issue with the storage volume. If this status appears because the upload buffer space is filled, then in some cases buffer space becomes available again. At that point, the storage volume self-corrects to the Available status. In other cases, you might have to add more upload buffer space to your gateway to allow the storage volume status to become Available. For information on how Understanding Cached Volume Status Transitions API Version 2013-06-30 100 AWS Storage Gateway Color Red Volume Gateway User Guide Volume Status to troubleshoot a case when upload buffer capacity has been exceeded, see Troublesh ooting volume issues. For information on how to add upload buffer capacity, see Determining the size of upload buffer to allocate. The storage volume has the Irrecoverable status. In this case, you should delete the volume. For information on how to do this, see To delete a volume. In the diagram, a transition between two states is depicted with a labeled line. For example, the transition from the Creating status to the Available status is labeled as Create Basic Volume or Create Volume from Snapshot. This transition represents creating a cached volume. For more information about creating storage volumes, see Adding and expanding volumes. Understanding Cached Volume Status Transitions API Version 2013-06-30 101 AWS Storage Gateway Volume Gateway User Guide Note The volume status of Pass Through appears as yellow in this diagram. However, this doesn't match the color of this status icon in the Status box of the Storage Gateway console. Understanding Cached Volume Status Transitions API Version 2013-06-30 102 AWS Storage Gateway Volume Gateway User Guide Understanding Stored Volume Status Transitions Use the following state diagram to understand the most common transitions between statuses for volumes in stored gateways. You don't need to understand the diagram in detail to use your gateway effectively. Rather, the diagram provides detailed information if you are interested in understanding more about how Volume Gateways work. The diagram doesn't show the Upload Buffer Not Configured status or the Deleting status. Volume states in the diagram appear as green, yellow, and red boxes. You can interpret the colors as described following. Color Green Yellow Volume Status The gateway is operating normally. The volume status is Available or eventually becomes Available. When you are creating a storage volume and preserving data, then the path from the Creating status to the Pass Through status occurs if another volume is bootstrapping. In this case, the volume with the Pass Through s tatus goes to the Bootstrapping status and then to the Available status when the first volume is finished bootstrapping. Other than the specific scenario mentioned, yellow (Pass Through status) indicates that there is a potential issue with the storage volume, the most common one being an upload buffer issue. If upload buffer capacity has been exceeded, then in some cases buffer space becomes available again. At that point, the storage volume self-corrects to the Available status. In other cases, you might have to add more upload buffer capacity to your gateway to return the storage volume to the Available status. For information on how to troubleshoot a case when upload buffer capacity has been exceeded, see Troublesh Understanding Stored Volume Status Transitions API Version 2013-06-30 103 AWS Storage Gateway Color Red Volume Gateway User Guide Volume Status ooting volume issues. For information on how to add upload buffer capacity, see Determining the size of upload buffer to allocate. The storage volume has the Irrecoverable status. In this case, you should delete the volume. For information on how to do this, see Deleting storage volumes. In the following diagram, a transition between two states is depicted with a labeled line. For example, the transition from the Creating status to the Available status is labeled as Create Basic Volume. This transition represents creating a storage volume without preserving data or creating the volume from a snapshot. Understanding Stored Volume Status Transitions API Version 2013-06-30 104 AWS Storage Gateway Volume Gateway User Guide Note The volume status of Pass Through appears as yellow in this diagram. However, this doesn't match the color of this status icon in the Status box of the Storage Gateway console. Moving your data to a new gateway You can move data between gateways as your data and performance needs grow, or if you receive an AWS notification to migrate your gateway. The following are some reasons for doing this: Moving your data to a new gateway API Version 2013-06-30 105 AWS Storage Gateway Volume Gateway User Guide • Move your data to better host platforms or newer Amazon EC2 instances. • Refresh the underlying hardware for your server. The steps that you follow to move your
storagegateway-vgw-ug-040
storagegateway-vgw-ug.pdf
40
color of this status icon in the Status box of the Storage Gateway console. Moving your data to a new gateway You can move data between gateways as your data and performance needs grow, or if you receive an AWS notification to migrate your gateway. The following are some reasons for doing this: Moving your data to a new gateway API Version 2013-06-30 105 AWS Storage Gateway Volume Gateway User Guide • Move your data to better host platforms or newer Amazon EC2 instances. • Refresh the underlying hardware for your server. The steps that you follow to move your data to a new gateway depend on the gateway type that you have. Note Data can only be moved between the same gateway types. Moving stored volumes to a new stored Volume Gateway To move your stored volume to a new stored Volume Gateway 1. Stop any applications that are writing to the old stored Volume Gateway. 2. Use the following steps to create a snapshot of your volume, and then wait for the snapshot to complete. a. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. b. c. d. In the navigation pane, choose Volumes, and then choose the volume that you want to create the snapshot from. For Actions, choose Create snapshot. In the Create snapshot dialog box, enter a snapshot description, and then choose Create snapshot. You can verify that the snapshot was created using the console. If data is still uploading to the volume, wait until the upload is complete before you go to the next step. To see the snapshot status and validate that none are pending, select the snapshot links on the volumes. 3. Use the following steps to stop the old stored Volume Gateway: a. In the navigation pane, choose Gateways, and then choose the old stored Volume Gateway that you want to stop. The status of the gateway is Running. Moving stored volumes to a new stored Volume Gateway API Version 2013-06-30 106 AWS Storage Gateway Volume Gateway User Guide b. For Actions, choose Stop gateway. Verify the ID of the gateway from the dialog box, and then choose Stop gateway. While the gateway is stopping, you might see a message that indicates the status of the gateway. When the gateway shuts down, a message and a Start gateway button appear in the Details tab. When the gateway shuts down, the status of the gateway is Shutdown. c. Shut down the VM using the hypervisor controls. For more information about stopping a gateway, see Starting and Stopping a Volume Gateway. 4. Detach the storage disks associated with your stored volumes from the gateway VM. This excludes the root disk of the VM. 5. Activate a new stored Volume Gateway with a new hypervisor VM image available from the Storage Gateway console at https://console.aws.amazon.com/storagegateway/home. 6. Attach the physical storage disks that you detached from the old stored Volume Gateway VM in step 5. 7. To preserve existing data on the disk, use the following steps to create stored volumes. a. On the Storage Gateway console, choose Create volume. b. c. d. In the Create volume dialog box, select the stored Volume Gateway that you created in step 5. Choose a Disk ID value from the list. For Volume content, select the Preserve existing data on the disk option. For more information about creating volumes, see Creating a storage volume. 8. (Optional) In the Configure CHAP authentication wizard that appears, enter the Initiator name, Initiator secret, and Target secret, and then choose Save. For more information about working with Challenge-Handshake Authentication Protocol (CHAP) authentication, see Configuring CHAP Authentication for Your iSCSI Targets. 9. Start the application that writes to your stored volume. 10. When you have confirmed that your new stored Volume Gateway is working correctly, you can delete the old stored Volume Gateway. Moving stored volumes to a new stored Volume Gateway API Version 2013-06-30 107 AWS Storage Gateway Volume Gateway User Guide Important Before you delete a gateway, be sure that no applications are currently writing to that gateway's volumes. If you delete a gateway while it is in use, data loss can occur. Use the following steps to delete the old stored Volume Gateway: Warning When a gateway is deleted, there is no way to recover it. a. b. c. In the navigation pane, choose Gateways, and then choose the old stored Volume Gateway that you want to delete. For Actions, choose Delete gateway. In the confirmation dialog box that appears, select the check box to confirm your deletion. Make sure that the gateway ID listed specifies the old stored Volume Gateway that you want to delete, and then choose Delete. 11. Delete the old gateway VM. For information about deleting a VM, see the documentation for your hypervisor. Moving cached volumes
storagegateway-vgw-ug-041
storagegateway-vgw-ug.pdf
41
Volume Gateway: Warning When a gateway is deleted, there is no way to recover it. a. b. c. In the navigation pane, choose Gateways, and then choose the old stored Volume Gateway that you want to delete. For Actions, choose Delete gateway. In the confirmation dialog box that appears, select the check box to confirm your deletion. Make sure that the gateway ID listed specifies the old stored Volume Gateway that you want to delete, and then choose Delete. 11. Delete the old gateway VM. For information about deleting a VM, see the documentation for your hypervisor. Moving cached volumes to a new gateway virtual machine To move your cached volumes to a new cached Volume Gateway virtual machine (VM) 1. Stop any applications that are writing to the old cached Volume Gateway. 2. Unmount or disconnect iSCSI volumes from any clients that are using them. This helps keep data on those volumes consistent by preventing clients from changing or adding data to those volumes. 3. Use the following steps to create a snapshot of your volume, and then wait for the snapshot to complete. a. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. Moving cached volumes to a new gateway virtual machine API Version 2013-06-30 108 AWS Storage Gateway Volume Gateway User Guide b. c. d. In the navigation pane, choose Volumes, and then choose the volume that you want to create the snapshot from. For Actions, choose Create snapshot. In the Create snapshot dialog box, enter a snapshot description, and then choose Create snapshot. You can verify that the snapshot was created using the console. If data is still uploading to the volume, wait until the upload is complete before you go to the next step. To see the snapshot status and validate that none are pending, select the snapshot links on the volumes. For more information about checking volume status in the console, see Understanding Volume Statuses and Transitions. For information about cached volume status, see Understanding Cached Volume Status Transitions . 4. Use the following steps to stop the old cached Volume Gateway: a. b. In the navigation pane, choose Gateways, and then choose the old cached Volume Gateway that you want to stop. The status of the gateway is Running. For Actions, choose Stop gateway. Verify the ID of the gateway from the dialog box, and then choose Stop gateway. Make a note of the gateway ID, as it is needed in a later step. While the old gateway is stopping, you might see a message that indicates the status of the gateway. When the old gateway shuts down, a message and a Start gateway button appear in the Details tab. When the gateway shuts down, the status of the gateway is Shutdown. c. Shut down the old VM using the hypervisor controls. For more information about shutting down an Amazon EC2 instance, see Stopping and starting your instances in the Amazon EC2 User Guide. For more information about shutting down a KVM, VMware, or Hyper-V VM, see your hypervisor documentation. For more information about stopping a gateway, see Starting and Stopping a Volume Gateway. 5. Detach all disks, including the root disk, cache disks, and upload buffer disks, from the old gateway VM. Moving cached volumes to a new gateway virtual machine API Version 2013-06-30 109 AWS Storage Gateway Note Volume Gateway User Guide Make a note of the root disk's volume ID, as well as the gateway ID associated with that root disk. You detach this disk from the new Storage Gateway hypervisor in a later step. (See step 11.) If you are using an Amazon EC2 instance as the VM for your cached Volume Gateway, see Detaching an Amazon EBS volume from a Linux instance in the Amazon EC2 User Guide. For information about detaching disks from a KVM, VMware, or Hyper-V VM, see the documentation for your hypervisor. 6. Create a new Storage Gateway hypervisor VM instance, but don't activate it as a gateway. For more information about creating a new Storage Gateway hypervisor VM, see Set up a Volume Gateway. This new gateway will assume the identity of the old gateway. Note Do not add disks for cache or upload buffer to the new VM. Your new VM will use the same cache disks and upload buffer disks that were used by the old VM. 7. Your new Storage Gateway hypervisor VM instance should use the same network configuration as the old VM. The default network configuration for the gateway is Dynamic Host Configuration Protocol (DHCP). With DHCP, your gateway is automatically assigned an IP address. If you need to manually configure a static IP address for your new VM, see Configuring Your Gateway Network for more details. If your gateway must use a Socket Secure version 5 (SOCKS5) proxy
storagegateway-vgw-ug-042
storagegateway-vgw-ug.pdf
42
buffer to the new VM. Your new VM will use the same cache disks and upload buffer disks that were used by the old VM. 7. Your new Storage Gateway hypervisor VM instance should use the same network configuration as the old VM. The default network configuration for the gateway is Dynamic Host Configuration Protocol (DHCP). With DHCP, your gateway is automatically assigned an IP address. If you need to manually configure a static IP address for your new VM, see Configuring Your Gateway Network for more details. If your gateway must use a Socket Secure version 5 (SOCKS5) proxy to connect to the internet, see Configuring a SOCKS5 proxy for your on- premises gateway for more details. 8. Start the new VM. 9. Attach the disks that you detached from the old cached Volume Gateway VM in step 5, to the new cached Volume Gateway. Attach them in the same order to the new gateway VM as they are on the old gateway VM. All disks must make the transition unchanged. Do not change volume sizes, as that will cause metadata to become inconsistent. Moving cached volumes to a new gateway virtual machine API Version 2013-06-30 110 AWS Storage Gateway Volume Gateway User Guide 10. Initiate the gateway migration process by connecting to the new VM with a URL that uses the following format. http://your-VM-IP-address/migrate?gatewayId=your-gateway-ID You can re-use the same IP address for the new gateway VM as you used for the old gateway VM. Your URL should look similar to the example following. http://198.51.100.123/migrate?gatewayId=sgw-12345678 Use this URL from a browser, or from the command line using curl, to initiate the migration process. When the gateway migration process is successfully initiated, you will see the following message: Successfully imported Storage Gateway information. Please refer to Storage Gateway documentation to perform the next steps to complete the migration. 11. Detach the old gateway's root disk, whose volume ID you noted in step 5. 12. Start the gateway. Use the following steps to start the new cached Volume Gateway: a. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. b. In the navigation pane, choose Gateways and then choose the new gateway you want to start. The status of the gateway is Shutdown. c. Choose Details, and then choose Start gateway. For more information about starting a gateway, see Starting and Stopping a Volume Gateway. 13. Your volumes should now be available to your applications at the new gateway VM's IP address. 14. Confirm that your volumes are available, and delete the old gateway VM. For information about deleting a VM, see the documentation for your hypervisor. Moving cached volumes to a new gateway virtual machine API Version 2013-06-30 111 AWS Storage Gateway Volume Gateway User Guide Monitoring Storage Gateway This section describes how to monitor a Storage Gateway, including monitoring resources associated with the gateway, using Amazon CloudWatch. You can monitor the gateway's upload buffer and cache storage. You use the Storage Gateway console to view metrics and alarms for your gateway. For example, you can view the number of bytes used in read and write operations, the time spent in read and write operations, and the time taken to retrieve data from the Amazon Web Services Cloud. With metrics, you can track the health of your gateway and set up alarms to notify you when one or more metrics fall outside a defined threshold. Storage Gateway provides CloudWatch metrics at no additional charge. Storage Gateway metrics are recorded for a period of two weeks. By using these metrics, you can access historical information and get a better perspective on how your gateway and volumes are performing. Storage Gateway also provides CloudWatch alarms, except high-resolution alarms, at no additional charge. For more information about CloudWatch pricing, see Amazon CloudWatch pricing. For more information about CloudWatch, see Amazon CloudWatch User Guide. For information specific to monitoring a Volume Gateway and its associated resources, see Monitoring your Volume Gateway. Topics • Understanding gateway metrics • Monitoring the upload buffer • Monitoring cache storage • Understanding CloudWatch alarms • Creating recommended CloudWatch alarms for your gateway • Creating a custom CloudWatch alarm for your gateway • Monitoring your Volume Gateway Understanding gateway metrics For the discussion in this topic, we define gateway metrics as metrics that are scoped to the gateway—that is, they measure something about the gateway. Because a gateway contains one or more volumes, a gateway-specific metric is representative of all volumes on the gateway. For Understanding gateway metrics API Version 2013-06-30 112 AWS Storage Gateway Volume Gateway User Guide example, the CloudBytesUploaded metric is the total number of bytes that the gateway sent to the cloud during the reporting period. This metric includes the activity of all the volumes on the gateway. When working with gateway metric data, you specify the
storagegateway-vgw-ug-043
storagegateway-vgw-ug.pdf
43
the discussion in this topic, we define gateway metrics as metrics that are scoped to the gateway—that is, they measure something about the gateway. Because a gateway contains one or more volumes, a gateway-specific metric is representative of all volumes on the gateway. For Understanding gateway metrics API Version 2013-06-30 112 AWS Storage Gateway Volume Gateway User Guide example, the CloudBytesUploaded metric is the total number of bytes that the gateway sent to the cloud during the reporting period. This metric includes the activity of all the volumes on the gateway. When working with gateway metric data, you specify the unique identification of the gateway that you are interested in viewing metrics for. To do this, you specify both the GatewayId and the GatewayName values. When you want to work with metric for a gateway, you specify the gateway dimension in the metrics namespace, which distinguishes a gateway-specific metric from a volume- specific metric. For more information, see Using Amazon CloudWatch Metrics. Note Some metrics return data points only when new data has been generated during the most recent monitoring period. Metric Description AvailabilityNotifi cations Number of availability-related health notifications generated by the gateway. Use this metric with the Sum statistic to observe whether the gateway is experienc ing any availability-related events. For details about the events, check your configured CloudWatch log group. Unit: Number Percent of application reads served from the cache. The sample is taken at the end of the reporting period. Unit: Percent CacheHitPercent Understanding gateway metrics API Version 2013-06-30 113 AWS Storage Gateway Volume Gateway User Guide Metric Description CachePercentDirty CacheUsed IoWaitPercent MemTotalBytes MemUsedBytes The overall percentage of the gateway cache that has not been persisted to AWS. The sample is taken at the end of the reporting period. Use this metric with the Sum statistic. Ideally, this metric should remain low. Unit: Percent The total number of bytes being used in the gateway's cache storage. The sample is taken at the end of the reporting period. Unit: Bytes Percent of time that the gateway is waiting on a response from the local disk. Unit: Percent Amount of RAM provisioned to the gateway VM, in bytes. Unit: Bytes Amount of RAM currently in use by the gateway VM, in bytes. Unit: Bytes Understanding gateway metrics API Version 2013-06-30 114 AWS Storage Gateway Volume Gateway User Guide Metric Description QueuedWrites ReadBytes ReadTime The number of bytes waiting to be written to AWS, sampled at the end of the reporting period for all volumes in the gateway. These bytes are kept in your gateway's working storage. Unit: Bytes The total number of bytes read from your on-premises applications in the reporting period for all volumes in the gateway. Use this metric with the Sum statistic to measure throughput and with the Samples statistic to measure IOPS. Unit: Bytes The total number of milliseco nds spent to do read operations from your on- premises applications in the reporting period for all volumes in the gateway. Use this metric with the Average statistic to measure latency. Unit: Milliseconds Understanding gateway metrics API Version 2013-06-30 115 AWS Storage Gateway Volume Gateway User Guide Metric Description TimeSinceLastRecov eryPoint TotalCacheSize UploadBufferPercen tUsed UploadBufferUsed UserCpuPercent The time since the last available recovery point. For more information, see Your Cached Gateway is Unreachab le And You Want to Recover Your Data. Unit: Seconds The total size of the cache in bytes. The sample is taken at the end of the reporting period. Unit: Bytes Percent use of the gateway's upload buffer. The sample is taken at the end of the reporting period. Unit: Percent The total number of bytes being used in the gateway's upload buffer. The sample is taken at the end of the reporting period. Unit: Bytes Percent of CPU time spent on gateway processing, averaged across all cores. Unit: Percent Understanding gateway metrics API Version 2013-06-30 116 AWS Storage Gateway Volume Gateway User Guide Metric Description WorkingStorageFree WorkingStoragePerc entUsed WorkingStorageUsed WriteBytes The total amount of unused space in the gateway's working storage. The sample is taken at the end of the reporting period. Unit: Bytes Percent use of the gateway's upload buffer. The sample is taken at the end of the reporting period. Unit: Percent The total number of bytes being used in the gateway's upload buffer. The sample is taken at the end of the reporting period. Unit: Bytes The total number of bytes written to your on-premises applications in the reporting period for all volumes in the gateway. Use this metric with the Sum statistic to measure throughput and with the Samples statistic to measure IOPS. Unit: Bytes Understanding gateway metrics API Version 2013-06-30 117 Volume Gateway User Guide AWS Storage Gateway Metric WriteTime Description The total number of milliseco nds spent to do write operations from your on- premises
storagegateway-vgw-ug-044
storagegateway-vgw-ug.pdf
44
period. Unit: Percent The total number of bytes being used in the gateway's upload buffer. The sample is taken at the end of the reporting period. Unit: Bytes The total number of bytes written to your on-premises applications in the reporting period for all volumes in the gateway. Use this metric with the Sum statistic to measure throughput and with the Samples statistic to measure IOPS. Unit: Bytes Understanding gateway metrics API Version 2013-06-30 117 Volume Gateway User Guide AWS Storage Gateway Metric WriteTime Description The total number of milliseco nds spent to do write operations from your on- premises applications in the reporting period for all volumes in the gateway. Use this metric with the Average statistic to measure latency. Unit: Milliseconds Dimensions for Storage Gateway metrics The CloudWatch namespace for the Storage Gateway service is AWS/StorageGateway. Data is available automatically in 5-minute periods at no charge. Dimension Description GatewayId , GatewayNa me VolumeId These dimensions filter the data that you request to gateway- specific metrics. You can identify a gateway to work by the value for GatewayId or GatewayName . If the name of your gateway was different for the time range that you are intereste d in viewing metrics, use the GatewayId . Throughput and latency data of a gateway is based on all the volumes for the gateway. For information about working with gateway metrics, see Measuring Performance Between Your Gateway and AWS. This dimension filters the data you request to volume-sp ecific metrics. Identify a storage volume to work with by its VolumeId value. For information about working with volume Dimensions for Storage Gateway metrics API Version 2013-06-30 118 AWS Storage Gateway Volume Gateway User Guide Dimension Description metrics, see Measuring Performance Between Your Application and Gateway. Monitoring the upload buffer You can find information following about how to monitor a gateway's upload buffer and how to create an alarm so that you get a notification when the buffer exceeds a specified threshold. By using this approach, you can add buffer storage to a gateway before it fills completely and your storage application stops backing up to AWS. You monitor the upload buffer in the same way in both the cached-volume and Tape Gateway architectures. For more information, see How Volume Gateway works. Note The WorkingStoragePercentUsed, WorkingStorageUsed, and WorkingStorageFree metrics represent the upload buffer for stored volumes only before the release of the cached-volume feature in Storage Gateway. Now, use the equivalent upload buffer metrics UploadBufferPercentUsed, UploadBufferUsed, and UploadBufferFree. These metrics apply to both gateway architectures. Item of Interest How to Measure Upload buffer usage Use the UploadBufferPercentUsed UploadBufferFree metrics with the Average statistic. For example, use the UploadBufferUsed with the Average statistic to analyze the storage usage over a time period. , UploadBufferUsed , and To measure the percent of the upload buffer that is used 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. Choose the StorageGateway: Gateway Metrics dimension, and find the gateway that you want to work with. Monitoring the upload buffer API Version 2013-06-30 119 AWS Storage Gateway Volume Gateway User Guide 3. Choose the UploadBufferPercentUsed metric. 4. For Time Range, choose a value. 5. Choose the Average statistic. 6. For Period, choose a value of 5 minutes to match the default reporting time. The resulting time-ordered set of data points contains the percent used of the upload buffer. Using the following procedure, you can create an alarm using the CloudWatch console. To learn more about alarms and thresholds, see Creating CloudWatch Alarms in the Amazon CloudWatch User Guide. To set an upper threshold alarm for a gateway's upload buffer 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. Choose Create Alarm to start the Create Alarm wizard. 3. Specify a metric for your alarm: a. On the Select Metric page of the Create Alarm wizard, choose the AWS/ StorageGateway:GatewayId,GatewayName dimension, and then find the gateway that you want to work with. b. Choose the UploadBufferPercentUsed metric. Use the Average statistic and a period of 5 minutes. c. Choose Continue. 4. Define the alarm name, description, and threshold: a. On the Define Alarm page of the Create Alarm wizard, identify your alarm by giving it a name and description in the Name and Description boxes. b. Define the alarm threshold. c. Choose Continue. 5. Configure an email action for the alarm: a. On the Configure Actions page of the Create Alarm wizard, choose Alarm for Alarm State. b. Choose Choose or create email topic for Topic. Monitoring the upload buffer API Version 2013-06-30 120 AWS Storage Gateway Volume Gateway User Guide To create an email topic means that you set up an Amazon SNS topic. For more information about Amazon SNS, see Set Up Amazon SNS in the Amazon CloudWatch User Guide. c. For Topic, enter a descriptive name for the topic.
storagegateway-vgw-ug-045
storagegateway-vgw-ug.pdf
45
and Description boxes. b. Define the alarm threshold. c. Choose Continue. 5. Configure an email action for the alarm: a. On the Configure Actions page of the Create Alarm wizard, choose Alarm for Alarm State. b. Choose Choose or create email topic for Topic. Monitoring the upload buffer API Version 2013-06-30 120 AWS Storage Gateway Volume Gateway User Guide To create an email topic means that you set up an Amazon SNS topic. For more information about Amazon SNS, see Set Up Amazon SNS in the Amazon CloudWatch User Guide. c. For Topic, enter a descriptive name for the topic. d. Choose Add Action. e. Choose Continue. 6. Review the alarm settings, and then create the alarm: a. On the Review page of the Create Alarm wizard, review the alarm definition, metric, and associated actions to take (for example, sending an email notification). b. After reviewing the alarm summary, choose Save Alarm. 7. Confirm your subscription to the alarm topic: a. Open the Amazon SNS email that was sent to the email address that you specified when creating the topic. b. Confirm your subscription by clicking the link in the email. A subscription confirmation appears. Monitoring cache storage You can find information following about how to monitor a gateway's cache storage and how to create an alarm so that you get a notification when parameters of the cache pass specified thresholds. Using this alarm, you know when to add cache storage to a gateway. You only monitor cache storage in the cached volumes architecture. For more information, see How Volume Gateway works. Item of Interest How to Measure Total usage of cache Use the CachePercentUsed and TotalCacheSize metrics with the Average statistic. For example, use the CachePercentUsed with the Average statistic to analyze the cache usage over a period of time. Monitoring cache storage API Version 2013-06-30 121 AWS Storage Gateway Volume Gateway User Guide Item of Interest How to Measure The TotalCacheSize metric changes only when you add cache to the gateway. Use the CacheHitPercent metric with the Average statistic. Typically, you want CacheHitPercent to remain high. Use the CachePercentDirty metrics with the Average statistic. Typically, you want CachePercentDirty to remain low. Percent of read requests that are served from the cache Percent of the cache that is dirty—that is, it contains content that has not been uploaded to AWS To measure the percent of a cache that is dirty for a gateway and all its volumes 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. Choose the StorageGateway: Gateway Metrics dimension, and find the gateway that you want to work with. 3. Choose the CachePercentDirty metric. 4. For Time Range, choose a value. 5. Choose the Average statistic. 6. For Period, choose a value of 5 minutes to match the default reporting time. The resulting time-ordered set of data points contains the percentage of the cache that is dirty over the 5 minutes. To measure the percent of the cache that is dirty for a volume 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. Choose the StorageGateway: Volume Metrics dimension, and find the volume that you want to work with. 3. Choose the CachePercentDirty metric. 4. For Time Range, choose a value. Monitoring cache storage API Version 2013-06-30 122 AWS Storage Gateway Volume Gateway User Guide 5. Choose the Average statistic. 6. For Period, choose a value of 5 minutes to match the default reporting time. The resulting time-ordered set of data points contains the percentage of the cache that is dirty over the 5 minutes. Understanding CloudWatch alarms CloudWatch alarms monitor information about your gateway based on metrics and expressions. You can add CloudWatch alarms for your gateway and view their statuses in the Storage Gateway console. For more information about the metrics that are used to monitor Volume Gateway, see Understanding gateway metrics and Understanding Volume Metrics. For each alarm, you specify conditions that will initiate its ALARM state. Alarm status indicators in the Storage Gateway console turn red when in the ALARM state, making it easier for you to monitor status proactively. You can configure alarms to invoke actions automatically based on sustained changes in state. For more information about CloudWatch alarms, see Using Amazon CloudWatch alarms in the Amazon CloudWatch User Guide. Note If you don't have permission to view CloudWatch, you can't view the alarms. For each activated gateway, we recommend that you create the following CloudWatch alarms: • High IO wait: IoWaitpercent >= 20 for 3 datapoints in 15 minutes • Cache percent dirty: CachePercentDirty > 80 for 4 datapoints within 20 minutes • Health notifications: HealthNotifications >= 1 for 1 datapoint within 5 minutes. When configuring this alarm, set Missing data treatment to notBreaching. Note You can set a health notification alarm only if the gateway had a previous health notification in
storagegateway-vgw-ug-046
storagegateway-vgw-ug.pdf
46
alarms in the Amazon CloudWatch User Guide. Note If you don't have permission to view CloudWatch, you can't view the alarms. For each activated gateway, we recommend that you create the following CloudWatch alarms: • High IO wait: IoWaitpercent >= 20 for 3 datapoints in 15 minutes • Cache percent dirty: CachePercentDirty > 80 for 4 datapoints within 20 minutes • Health notifications: HealthNotifications >= 1 for 1 datapoint within 5 minutes. When configuring this alarm, set Missing data treatment to notBreaching. Note You can set a health notification alarm only if the gateway had a previous health notification in CloudWatch. Understanding CloudWatch alarms API Version 2013-06-30 123 AWS Storage Gateway Volume Gateway User Guide For gateways on VMware host platforms with HA mode activated, we also recommend this additional CloudWatch alarm: • Availability notifications: AvailabilityNotifications >= 1 for 1 datapoint within 5 minutes. When configuring this alarm, set Missing data treatment to notBreaching. The following table describes the state of an alarm. State OK Alarm Insufficient data None Unavailable Description The metric or expression is within the defined threshold. The metric or expression is outside of the defined threshold. The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state. No alarms are created for the gateway. To create a new alarm, see Creating a custom CloudWatch alarm for your gateway. The state of the alarm is unknown. Choose Unavailable to view error information in the Monitoring tab. Creating recommended CloudWatch alarms for your gateway When you create a new gateway using the Storage Gateway console, you can choose to create all recommended CloudWatch alarms automatically as part of the initial setup process. For more information, see Configure your Volume Gateway. If you want to add or update recommended CloudWatch alarms for an existing gateway, use the following procedure. Creating recommended CloudWatch alarms API Version 2013-06-30 124 AWS Storage Gateway Volume Gateway User Guide To add or update recommended CloudWatch alarms for an existing gateway Note This feature requires CloudWatch policy permissions, which are not automatically granted as part of the preconfigured Storage Gateway full access policy. Make sure your security policy grants the following permissions before you attempt to create recommended CloudWatch alarms: • cloudwatch:PutMetricAlarm - create alarms • cloudwatch:DisableAlarmActions - turn alarm actions off • cloudwatch:EnableAlarmActions - turn alarm actions on • cloudwatch:DeleteAlarms - delete alarms 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home/. 2. In the navigation pane, choose Gateways, then choose the gateway for which you want to create recommended CloudWatch alarms. 3. On the gateway details page, choose the Monitoring tab. 4. Under Alarms, choose Create recommended alarms. The recommended alarms are created automatically. The Alarms section lists all CloudWatch alarms for a specific gateway. From here, you can select and delete one or more alarms, turn alarm actions on or off, and create new alarms. Creating a custom CloudWatch alarm for your gateway CloudWatch uses Amazon Simple Notification Service (Amazon SNS) to send alarm notifications when an alarm changes state. An alarm watches a single metric over a time period that you specify, and performs one or more actions based on the value of the metric relative to a given threshold over a number of time periods. The action is a notification that's sent to an Amazon SNS topic. You can create an Amazon SNS topic when you create a CloudWatch alarm. For more information about Amazon SNS, see What is Amazon SNS? in the Amazon Simple Notification Service Developer Guide. Creating a custom CloudWatch alarm API Version 2013-06-30 125 AWS Storage Gateway Volume Gateway User Guide To create a CloudWatch alarm in the Storage Gateway console 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home/. 2. In the navigation pane, choose Gateways, then choose the gateway for which you want to create an alarm. 3. On the gateway details page, choose the Monitoring tab. 4. Under Alarms, choose Create alarm to open the CloudWatch console. 5. Use the CloudWatch console to create the type of alarm that you want. You can create the following types of alarms: • Static threshold alarm: An alarm based on a set threshold for a chosen metric. The alarm enters the ALARM state when the metric breaches the threshold for a specified number of evaluation periods. To create a static threshold alarm, see Creating a CloudWatch alarm based on a static threshold in the Amazon CloudWatch User Guide. • Anomaly detection alarm: Anomaly detection mines past metric data and creates a model of expected values. You set a value for the anomaly detection threshold, and CloudWatch uses this threshold with the model to determine the "normal" range of values for the metric. A higher value for the threshold produces a thicker band of
storagegateway-vgw-ug-047
storagegateway-vgw-ug.pdf
47
for a chosen metric. The alarm enters the ALARM state when the metric breaches the threshold for a specified number of evaluation periods. To create a static threshold alarm, see Creating a CloudWatch alarm based on a static threshold in the Amazon CloudWatch User Guide. • Anomaly detection alarm: Anomaly detection mines past metric data and creates a model of expected values. You set a value for the anomaly detection threshold, and CloudWatch uses this threshold with the model to determine the "normal" range of values for the metric. A higher value for the threshold produces a thicker band of "normal" values. You can choose to activate the alarm only when the metric value is above the band of expected values, only when it's below the band, or when it's above or below the band. To create an anomaly detection alarm, see Creating a CloudWatch alarm based on anomaly detection in the Amazon CloudWatch User Guide. • Metric math expression alarm: An alarm based one or more metrics used in a math expression. You specify the expression, threshold, and evaluation periods. To create a metric math expression alarm, see Creating a CloudWatch alarm based on a metric math expression in the Amazon CloudWatch User Guide. • Composite alarm: An alarm that determines its alarm state by watching the alarm states of other alarms. A composite alarm can help you reduce alarm noise. To create a composite alarm, see Creating a composite alarm in the Amazon CloudWatch User Guide. Creating a custom CloudWatch alarm API Version 2013-06-30 126 AWS Storage Gateway Volume Gateway User Guide 6. After you create the alarm in the CloudWatch console, return to the Storage Gateway console. You can view the alarm by doing one of the following: • In the navigation pane, choose Gateways, then choose the gateway for which you want to view alarms. On the Details tab, under Alarms, choose CloudWatch Alarms. • In the navigation pane, choose Gateways, choose the gateway for which you want to view alarms, then choose the Monitoring tab. The Alarms section lists all of the CloudWatch alarms for a specific gateway. From here, you can select and delete one or more alarms, turn alarm actions on or off, and create new alarms. • In the navigation pane, choose Gateways, then choose the alarm state of the gateway for which you want to view alarms. For information about how to edit or delete an alarm, see Editing or deleting a CloudWatch alarm. Note When you delete a gateway using the Storage Gateway console, all CloudWatch alarms associated with the gateway are also automatically deleted. Monitoring your Volume Gateway The topics in this section describe how to monitor Volume Gateway in either cached volume or stored volume setup, including monitoring the volumes associated with the gateway and monitoring the upload buffer. You use the AWS Management Console to view metrics for your gateway. For example, you can view the number of bytes used in read and write operations, the time spent in read and write operations, and the time taken to retrieve data from the Amazon Web Services cloud. With metrics, you can track the health of your gateway and set up alarms to notify you when one or more metrics fall outside a defined threshold. Storage Gateway provides CloudWatch metrics at no additional charge. Storage Gateway metrics are recorded for a period of two weeks. By using these metrics, you can access historical information and get a better perspective on how your gateway and volumes are performing. For detailed information about CloudWatch, see the Amazon CloudWatch User Guide. Topics Monitoring your Volume Gateway API Version 2013-06-30 127 AWS Storage Gateway Volume Gateway User Guide • Getting Volume Gateway health logs with Amazon CloudWatch Logs - Learn how to use Amazon CloudWatch Logs to get information about the health of your Volume Gateway and related resources. • Using Amazon CloudWatch Metrics - Learn how to get monitoring data for your gateway using either the AWS Management Console or the CloudWatch API. • Measuring Performance Between Your Application and Gateway - Learn how to measure data throughput, data latency, and operations per second to understand performance between your applications and your gateway. • Measuring Performance Between Your Gateway and AWS - Learn how to measure data throughput, data latency, and operations per second to understand performance between your gateway and the AWS cloud. • Understanding volume metrics - Learn how to measure metrics that provide data about the volumes associated with a gateway. Getting Volume Gateway health logs with Amazon CloudWatch Logs You can use Amazon CloudWatch Logs to get information about the health of your Volume Gateway and related resources. You can use these logs to monitor your gateway for errors that it encounters. In addition, you can use Amazon
storagegateway-vgw-ug-048
storagegateway-vgw-ug.pdf
48
gateway. • Measuring Performance Between Your Gateway and AWS - Learn how to measure data throughput, data latency, and operations per second to understand performance between your gateway and the AWS cloud. • Understanding volume metrics - Learn how to measure metrics that provide data about the volumes associated with a gateway. Getting Volume Gateway health logs with Amazon CloudWatch Logs You can use Amazon CloudWatch Logs to get information about the health of your Volume Gateway and related resources. You can use these logs to monitor your gateway for errors that it encounters. In addition, you can use Amazon CloudWatch subscription filters to automate processing of the log information in real time. For more information, see Real-time Processing of Log Data with Subscriptions in the Amazon CloudWatch User Guide. For example, suppose that your gateway is deployed in a cluster activated with VMware High Availability (HA) and you need to know about any errors. You can configure a CloudWatch log group to monitor your gateway and get notified when your gateway encounters an error. You can either configure the group when you are activating the gateway or after your gateway is activated and up and running. For information about how to configure a CloudWatch log group when activating a gateway, see Configure your Volume Gateway. For general information about CloudWatch log groups, see Working with Log Groups and Log Streams in the Amazon CloudWatch User Guide. For information about how to troubleshoot and fix these types of errors, see Troubleshooting volume issues. The following procedure shows you how to configure a CloudWatch log group after your gateway is activated. Getting Volume Gateway health logs API Version 2013-06-30 128 AWS Storage Gateway Volume Gateway User Guide To configure a CloudWatch log group to work with your gateway 1. Sign in to the AWS Management Console and open the Storage Gateway console at https:// console.aws.amazon.com/storagegateway/home. 2. 3. In the left navigation pane, choose Gateways, and then choose the gateway that you want to configure the CloudWatch log group for. For Actions, choose Edit gateway information, or on the Details tab, under Health logs and Not Enabled, choose Configure log group to open the Edit CustomerGatewayName dialog box. 4. For Gateway health log group, choose one of the following: • Disable logging if you don't want to monitor your gateway using CloudWatch log groups. • Create a new log group to create a new CloudWatch log group. • Use an existing log group to use a CloudWatch log group that already exists. Choose a log group from the Existing log group list. 5. Choose Save changes. 6. To see the health logs for your gateway, do the following: 1. In the left navigation pane, choose Gateways, and then choose the gateway that you configured the CloudWatch log group for. 2. Choose the Details tab, and under Health logs, choose CloudWatch Logs. The Log group details page opens in the Amazon CloudWatch console. Using Amazon CloudWatch Metrics You can get monitoring data for your gateway using either the AWS Management Console or the CloudWatch API. The console displays a series of graphs based on the raw data from the CloudWatch API. You can also use the CloudWatch API through one of the AWS Software Development Kits (SDKs) or the Amazon CloudWatch API tools. Depending on your needs, you might prefer to use either the graphs displayed in the console or retrieved from the API. Regardless of which method you choose to use to work with metrics, you must specify the following information: • The metric dimension to work with. A dimension is a name-value pair that helps you to uniquely identify a metric. The dimensions for Storage Gateway are GatewayId, GatewayName, and Using Amazon CloudWatch Metrics API Version 2013-06-30 129 AWS Storage Gateway Volume Gateway User Guide VolumeId. In the CloudWatch console, you can use the Gateway Metrics and Volume Metrics views to easily select gateway-specific and volume-specific dimensions. For more information about dimensions, see Dimensions in the Amazon CloudWatch User Guide. • The metric name, such as ReadBytes. The following table summarizes the types of Storage Gateway metric data that you can use. CloudWatch Namespace Dimension Description AWS/Stora GatewayId , geGateway GatewayName These dimensions filter for metric data that describes aspects of the gateway. You can identify a gateway to work with by specifying both the GatewayId and the GatewayName dimensions. Throughput and latency data of a gateway are based on all the volumes in the gateway. Data is available automatically in 5-minute periods at no charge. VolumeId This dimension filters for metric data that is specific to a volume. Identify a volume to work with by its VolumeId dimension. Data is available automatically in 5-minute periods at no charge. Working with gateway and volume metrics is similar to working with other
storagegateway-vgw-ug-049
storagegateway-vgw-ug.pdf
49
These dimensions filter for metric data that describes aspects of the gateway. You can identify a gateway to work with by specifying both the GatewayId and the GatewayName dimensions. Throughput and latency data of a gateway are based on all the volumes in the gateway. Data is available automatically in 5-minute periods at no charge. VolumeId This dimension filters for metric data that is specific to a volume. Identify a volume to work with by its VolumeId dimension. Data is available automatically in 5-minute periods at no charge. Working with gateway and volume metrics is similar to working with other service metrics. You can find a discussion of some of the most common metrics tasks in the CloudWatch documentation listed following: • Viewing Available Metrics • Getting Statistics for a Metric • Creating CloudWatch Alarms Using Amazon CloudWatch Metrics API Version 2013-06-30 130 AWS Storage Gateway Volume Gateway User Guide Measuring Performance Between Your Application and Gateway Data throughput, data latency, and operations per second are three measures that you can use to understand how your application storage that is using your gateway is performing. When you use the correct aggregation statistic, you can use Storage Gateway metrics to measure these values. A statistic is an aggregation of a metric over a specified period of time. When you view the values of a metric in CloudWatch, use the Average statistic for data latency (milliseconds), use the Sum statistic for data throughput (bytes per second), and use the Samples statistic for input/output operations per second (IOPS). For more information, see Statistics in the Amazon CloudWatch User Guide. The following table summarizes the metrics and corresponding statistic you can use to measure the throughput, latency, and IOPS between your applications and gateways. Item of Interest How to Measure Throughput Latency IOPS Use the ReadBytes and WriteBytes metrics with the Sum CloudWatch statistic. For example, the Sum value of the ReadBytes metric over a sample period of 5 minutes divided by 300 seconds gives you the throughput as a rate in bytes per second. Use the ReadTime and WriteTime metrics with the Average CloudWatch statistic. For example, the Average value of the ReadTime metric gives you the latency per operation over the sample period of time. Use the ReadBytes and WriteBytes metrics with the Samples CloudWatch statistic. For example, the Samples value of the ReadBytes metric over a sample period of 5 minutes divided by 300 seconds gives you IOPS. For the average latency graphs and average size graphs, the average is calculated over the total number of operations (read or write, whichever is applicable to the graph) that completed during the period. Measuring Performance Between Your Application and Gateway API Version 2013-06-30 131 AWS Storage Gateway Volume Gateway User Guide To measure the data throughput from an application to a volume 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. Choose Metrics, then choose the All metrics tab and then choose Storage Gateway. 3. Choose the Volume metrics dimension, and find the volume that you want to work with. 4. Choose the ReadBytes and WriteBytes metrics. 5. For Time Range, choose a value. 6. Choose the Sum statistic. 7. 8. For Period, choose a value of 5 minutes or greater. In the resulting time-ordered sets of data points (one for ReadBytes and one for WriteBytes), divide each data point by the period (in seconds) to get the throughput at the sample point. The total throughput is the sum of the throughputs. For example, if the read throughput is 2,384,199,680 bytes over a period of 300 seconds, then the approximate throughput rate for that datapoint is 7.9 megabytes per second. To measure the data input/output operations per second from an application to a volume 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. Choose Metrics, then choose the All metrics tab and then choose Storage Gateway. 3. Choose the Volume metrics dimension, and find the volume that you want to work with. 4. Choose the ReadBytes and WriteBytes metrics. 5. For Time Range, choose a value. 6. Choose the Samples statistic. 7. 8. For Period, choose a value of 5 minutes or greater. In the resulting time-ordered sets of data points (one for ReadBytes and one for WriteBytes), divide each data point by the period (in seconds) to get IOPS. For example, if the number of write operations is 24,373 over a period of 300 seconds, then the IOPS for that data point is 81 write operations per second. Measuring Performance Between Your Gateway and AWS Data throughput, data latency, and operations per second are three measures that you can use to understand how your application storage using the Storage Gateway is performing. These Measuring Performance Between Your Gateway and AWS API Version 2013-06-30 132 AWS Storage Gateway Volume Gateway User Guide three values can
storagegateway-vgw-ug-050
storagegateway-vgw-ug.pdf
50
one for WriteBytes), divide each data point by the period (in seconds) to get IOPS. For example, if the number of write operations is 24,373 over a period of 300 seconds, then the IOPS for that data point is 81 write operations per second. Measuring Performance Between Your Gateway and AWS Data throughput, data latency, and operations per second are three measures that you can use to understand how your application storage using the Storage Gateway is performing. These Measuring Performance Between Your Gateway and AWS API Version 2013-06-30 132 AWS Storage Gateway Volume Gateway User Guide three values can be measured using the Storage Gateway metrics provided for you when you use the correct aggregation statistic. The following table summarizes the metrics and corresponding statistic to use to measure the throughput, latency, and input/output operations per second (IOPS) between your gateway and AWS. Item of Interest How to Measure Throughput Latency IOPS Use the ReadBytes and WriteBytes metrics with the Sum CloudWatch statistic. For example, the Sum value of the ReadBytes metric over a sample period of 5 minutes divided by 300 seconds gives you the throughput as a rate in bytes per second. Use the ReadTime and WriteTime metrics with the Average CloudWatch statistic. For example, the Average value of the ReadTime metric gives you the latency per operation over the sample period of time. Use the ReadBytes and WriteBytes metrics with the Samples CloudWatch statistic. For example, the Samples value of the ReadBytes metric over a sample period of 5 minutes divided by 300 seconds gives you IOPS. Throughput to AWS Use the CloudBytesDownloaded and CloudBytesUploaded metrics with the Sum CloudWatch statistic. For example, the Sum value of the CloudBytesDownloaded metric over a sample period of 5 minutes divided by 300 seconds gives you the throughput from AWS to the gateway as bytes per second. Latency of data to AWS Use the CloudDownloadLatency . For example, the Average statistic of the CloudDownloadLatency metric gives you the latency per operation. metric with the Average statistic To measure the upload data throughput from a gateway to AWS 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. Choose Metrics, then choose the All metrics tab and then choose Storage Gateway. 3. Choose the Gateway metrics dimension, and find the volume that you want to work with. Measuring Performance Between Your Gateway and AWS API Version 2013-06-30 133 AWS Storage Gateway Volume Gateway User Guide 4. Choose the CloudBytesUploaded metric. 5. For Time Range, choose a value. 6. Choose the Sum statistic. 7. 8. For Period, choose a value of 5 minutes or greater. In the resulting time-ordered set of data points, divide each data point by the period (in seconds) to get the throughput at that sample period. Moving the cursor over a data point displays information about the data point, including its value and bytes uploaded. Divide this value by the Period value (5 minutes) to get the throughput at that sample point. For example, if the throughput from the gateway to AWS is 555,544,576 bytes over a period of 300 seconds, then the approximate throughput per second is 1.85 megabytes per second. To measure the latency per operation of a gateway 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. Choose Metrics, then choose the All metrics tab and then choose Storage Gateway. 3. Choose the Gateway metrics dimension, and find the volume that you want to work with. 4. Choose the ReadTime and WriteTime metrics. 5. For Time Range, choose a value. 6. Choose the Average statistic. 7. For Period, choose a value of 5 minutes to match the default reporting time. Measuring Performance Between Your Gateway and AWS API Version 2013-06-30 134 AWS Storage Gateway Volume Gateway User Guide 8. In the resulting time-ordered set of points (one for ReadTime and one for WriteTime), add data points at the same time sample to get to the total latency in milliseconds. To measure the data latency from a gateway to AWS 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. Choose Metrics, then choose the All metrics tab and then choose Storage Gateway. 3. Choose the Gateway metrics dimension, and find the volume that you want to work with. 4. Choose the CloudDownloadLatency metric. 5. For Time Range, choose a value. 6. Choose the Average statistic. 7. For Period, choose a value of 5 minutes to match the default reporting time. The resulting time-ordered set of data points contains the latency in milliseconds. To set an upper threshold alarm for a gateway's throughput to AWS 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. Choose Alarms. 3. Choose Create Alarm to start the Create Alarm wizard. 4. Choose the Storage Gateway dimension, and find the gateway that you want to work with. 5. Choose the CloudBytesUploaded metric. 6. To define the
storagegateway-vgw-ug-051
storagegateway-vgw-ug.pdf
51
Choose the CloudDownloadLatency metric. 5. For Time Range, choose a value. 6. Choose the Average statistic. 7. For Period, choose a value of 5 minutes to match the default reporting time. The resulting time-ordered set of data points contains the latency in milliseconds. To set an upper threshold alarm for a gateway's throughput to AWS 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. Choose Alarms. 3. Choose Create Alarm to start the Create Alarm wizard. 4. Choose the Storage Gateway dimension, and find the gateway that you want to work with. 5. Choose the CloudBytesUploaded metric. 6. To define the alarm, define the alarm state when the CloudBytesUploaded metric is greater than or equal to a specified value for a specified time. For example, you can define an alarm state when the CloudBytesUploaded metric is greater than 10 MB for 60 minutes. 7. Configure the actions to take for the alarm state. For example, you can have an email notification sent to you. 8. Choose Create Alarm. To set an upper threshold alarm for reading data from AWS 1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/. 2. Choose Create Alarm to start the Create Alarm wizard. Measuring Performance Between Your Gateway and AWS API Version 2013-06-30 135 AWS Storage Gateway Volume Gateway User Guide 3. Choose the StorageGateway: Gateway Metrics dimension, and find the gateway that you want to work with. 4. Choose the CloudDownloadLatency metric. 5. Define the alarm by defining the alarm state when the CloudDownloadLatency metric is greater than or equal to a specified value for a specified time. For example, you can define an alarm state when the CloudDownloadLatency is greater than 60,000 milliseconds for greater than 2 hours. 6. Configure the actions to take for the alarm state. For example, you can have an email notification sent to you. 7. Choose Create Alarm. Understanding volume metrics You can find information following about the Storage Gateway metrics that cover a volume of a gateway. Each volume of a gateway has a set of metrics associated with it. Some volume-specific metrics have the same name as certain gateway-specific metrics. These metrics represent the same kinds of measurements but are scoped to the volume instead of the gateway. Before starting work, specify whether you want to work with a gateway metric or a volume metric. Specifically, when working with volume metrics, specify the volume ID for the storage volume that you want to view metrics for. For more information, see Using Amazon CloudWatch Metrics. Note Some metrics return data points only when new data has been generated during the most recent monitoring period. The following table describes the Storage Gateway metrics that you can use to get information about your storage volumes. Metric Description Cached Volumes Stored Volumes Availabil ityNotifi cation The number of availibility notificat Yes Yes Understanding volume metrics API Version 2013-06-30 136 AWS Storage Gateway Volume Gateway User Guide Metric Description Cached Volumes Stored Volumes Yes No CacheHitPercent ions sent by the volume. Units: count Percent of applicati on read operation s from the volume that are served from cache. The sample is taken at the end of the reporting period. When there are no application read operations from the volume, this metric reports 100 percent. Units: Percent Understanding volume metrics API Version 2013-06-30 137 AWS Storage Gateway Volume Gateway User Guide Metric Description Cached Volumes Stored Volumes Yes Yes CachePerc entDirty The volume's contribution to the overall percentage of the gateway's cache that isn't persisted to AWS. The sample is taken at the end of the reporting period. Use the CachePerc entDirty metric of the gateway to view the overall percentag e of the gateway's cache that isn't persisted to AWS. For more information, see Understanding gateway metrics. Units: Percent Understanding volume metrics API Version 2013-06-30 138 AWS Storage Gateway Volume Gateway User Guide Metric Description Cached Volumes Stored Volumes Yes No CachePerc entUsed The volume's contribution to the overall percent use of the gateway's cache storage. The sample is taken at the end of the reporting period. Use the CachePerc entUsed metric of the gateway to view overall percent use of the gateway's cache storage. For more information, see Understanding gateway metrics. Units: Percent CloudByte sDownloaded The number of bytes downloaded from the Yes cloud to the volume. Yes CloudByte sUploaded HealthNot ification Units: Bytes The number of bytes uploaded from the cloud to the volume. Units: Bytes Yes Yes The number of health notifications sent by the volume. Yes Units: count Yes Understanding volume metrics API Version 2013-06-30 139 AWS Storage Gateway Volume Gateway User Guide Metric Description Cached Volumes Stored Volumes IoWaitPercent MemTotalBytes MemoryUsage ReadBytes Yes Yes Yes No Yes No Yes Yes The percentage of IoWaitPercent units that are currently used by the volume. Units: Percent The percentage of total memory
storagegateway-vgw-ug-052
storagegateway-vgw-ug.pdf
52
CloudByte sDownloaded The number of bytes downloaded from the Yes cloud to the volume. Yes CloudByte sUploaded HealthNot ification Units: Bytes The number of bytes uploaded from the cloud to the volume. Units: Bytes Yes Yes The number of health notifications sent by the volume. Yes Units: count Yes Understanding volume metrics API Version 2013-06-30 139 AWS Storage Gateway Volume Gateway User Guide Metric Description Cached Volumes Stored Volumes IoWaitPercent MemTotalBytes MemoryUsage ReadBytes Yes Yes Yes No Yes No Yes Yes The percentage of IoWaitPercent units that are currently used by the volume. Units: Percent The percentage of total memory that is currently used by the volume. Units: Percent The percentage of memory that is currently used by the volume. Units: Percent The total number of bytes read from your on-premises applicati ons in the reporting period. Use this metric with the Sum statistic to measure throughpu t and with the Samplesstatistic to measure IOPS. Units: Bytes Understanding volume metrics API Version 2013-06-30 140 AWS Storage Gateway Volume Gateway User Guide Metric Description Cached Volumes Stored Volumes Yes Yes Yes Yes Yes Yes ReadTime UserCpuPercent WriteBytes The total number of milliseconds spent on read operations from your on-premis es applications in the reporting period. Use this metric with the Average statistic to measure latency. Units: Milliseconds The percentage of allocated CPU compute units that are currently used by the volume. Units: Percent The total number of bytes written to your on-premises applicati ons in the reporting period. Use this metric with the Sum statistic to measure throughpu t and with the Samples statistic to measure IOPS. Units: Bytes Understanding volume metrics API Version 2013-06-30 141 AWS Storage Gateway Volume Gateway User Guide Metric Description Cached Volumes Stored Volumes Yes Yes WriteTime The total number of milliseconds spent on write operations from your on-premis es applications in the reporting period. Use this metric with the Average statistic to measure latency. Units: Milliseconds QueuedWrites The number of bytes waiting to be written Yes Yes to AWS, sampled at the end of the reporting period. Units: Bytes Understanding volume metrics API Version 2013-06-30 142 AWS Storage Gateway Volume Gateway User Guide Maintaining Your Gateway Maintaining your Volume Gateway includes tasks such as sizing and configuring local disks for cache storage and upload buffer space, managing updates and setting an update schedule, managing bandwidth usage, and shutting down or deleting you gateway and associated resources if necessary. These tasks are common to all gateway types. If you haven't created a gateway, see Creating your gateway. Topics • Managing local disks for your Storage Gateway - Learn how to assess disk size requirements, add cache capacity, and manage the local disks that you allocate to your Volume Gateway for buffering and storage. • Managing Bandwidth for Your Volume Gateway - Learn how to limit the upload throughput from your gateway to AWS to control the amount of network bandwidth the gateway uses. • Managing gateway updates - Learn how to turn maintenance updates on or off, and modify the maintenance window schedule for your Volume Gateway. • Shutting Down Your Gateway VM - Learn about what to do if you need to shutdown or reboot your gateway virtual machine for maintenance, such as when applying a patch to your hypervisor. • Deleting your gateway and removing associated resources - Learn how to delete your gateway using the AWS Storage Gateway console and clean up associated resources to avoid being charged for their continued use. Managing local disks for your Storage Gateway The gateway virtual machine (VM) uses the local disks that you allocate on-premises for buffering and storage. Gateways created on Amazon EC2 instances use Amazon EBS volumes as local disks. Topics • Deciding the amount of local disk storage • Configuring additional upload buffer or cache storage Managing local disks API Version 2013-06-30 143 AWS Storage Gateway Volume Gateway User Guide Deciding the amount of local disk storage The number and size of disks that you want to allocate for your gateway is up to you. Depending on the storage solution you deploy, the gateway requires the following additional storage: • Volume Gateways: • Stored gateways require at least one disk to use as an upload buffer. • Cached gateways require at least two disks. One to use as a cache, and one to use as an upload buffer. The following table recommends sizes for local disk storage for your deployed gateway. You can add more local storage later after you set up the gateway, and as your workload demands increase. Local storage Upload buffer Cache storage Description The upload buffer provides a staging area for the data before the gateway uploads the data to Amazon S3. Your gateway uploads this buffer data over an encrypted Secure Sockets Layer (SSL) connection to AWS. The
storagegateway-vgw-ug-053
storagegateway-vgw-ug.pdf
53
an upload buffer. • Cached gateways require at least two disks. One to use as a cache, and one to use as an upload buffer. The following table recommends sizes for local disk storage for your deployed gateway. You can add more local storage later after you set up the gateway, and as your workload demands increase. Local storage Upload buffer Cache storage Description The upload buffer provides a staging area for the data before the gateway uploads the data to Amazon S3. Your gateway uploads this buffer data over an encrypted Secure Sockets Layer (SSL) connection to AWS. The cache storage acts as the on-premises durable store for data that is pending upload to Amazon S3 from the upload buffer. When your application performs I/O on a volume or tape, the gateway saves the data to the cache storage for low-laten cy access. When your application requests data from a volume or tape, the gateway first checks the cache storage for the data before downloading the data from AWS. Deciding the amount of local disk storage API Version 2013-06-30 144 AWS Storage Gateway Note Volume Gateway User Guide When you provision disks, we strongly recommend that you do not provision local disks for the upload buffer and cache storage if they use the same physical resource (the same disk). Underlying physical storage resources are represented as a data store in VMware. When you deploy the gateway VM, you choose a data store on which to store the VM files. When you provision a local disk (for example, to use as cache storage or upload buffer), you have the option to store the virtual disk in the same data store as the VM or a different data store. If you have more than one data store, we strongly recommend that you choose one data store for the cache storage and another for the upload buffer. A data store that is backed by only one underlying physical disk can lead to poor performance in some situations when it is used to back both the cache storage and upload buffer. This is also true if the backup is a less-performant RAID configuration such as RAID1. After the initial configuration and deployment of your gateway, you can adjust the local storage by adding or removing disks for an upload buffer. You can also add disks for cache storage. Determining the size of upload buffer to allocate You can determine the size of your upload buffer to allocate by using an upload buffer formula. We strongly recommend that you allocate at least 150 GiB of upload buffer. If the formula returns a value less than 150 GiB, use 150 GiB as the amount you allocate to the upload buffer. You can configure up to 2 TiB of upload buffer capacity for each gateway. Note For Volume Gateways, when the upload buffer reaches its capacity, your volume goes to PASS THROUGH status. In this status, new data that your application writes is persisted locally but not uploaded to AWS immediately. Thus, you cannot take new snapshots. When the upload buffer capacity frees up, the volume goes through BOOTSTRAPPING status. In this status, any new data that was persisted locally is uploaded to AWS. Finally, the volume returns to ACTIVE status. Storage Gateway then resumes normal synchronization of the data stored locally with the copy stored in AWS, and you can start taking new snapshots. For more information about volume status, see Understanding Volume Statuses and Transitions. Deciding the amount of local disk storage API Version 2013-06-30 145 AWS Storage Gateway Volume Gateway User Guide To estimate the amount of upload buffer to allocate, you can determine the expected incoming and outgoing data rates and plug them into the following formula. Rate of incoming data This rate refers to the application throughput, the rate at which your on-premises applications write data to your gateway over some period of time. Rate of outgoing data This rate refers to the network throughput, the rate at which your gateway is able to upload data to AWS. This rate depends on your network speed, utilization, and whether you've activated bandwidth throttling. This rate should be adjusted for compression. When uploading data to AWS, the gateway applies data compression where possible. For example, if your application data is text-only, you might get an effective compression ratio of about 2:1. However, if you are writing videos, the gateway might not be able to achieve any data compression and might require more upload buffer for the gateway. We strongly recommend that you allocate at least 150 GiB of upload buffer space if either of the following is true: • Your incoming rate is higher than the outgoing rate. • The formula returns a value less than 150 GiB. For example, assume that your
storagegateway-vgw-ug-054
storagegateway-vgw-ug.pdf
54
data to AWS, the gateway applies data compression where possible. For example, if your application data is text-only, you might get an effective compression ratio of about 2:1. However, if you are writing videos, the gateway might not be able to achieve any data compression and might require more upload buffer for the gateway. We strongly recommend that you allocate at least 150 GiB of upload buffer space if either of the following is true: • Your incoming rate is higher than the outgoing rate. • The formula returns a value less than 150 GiB. For example, assume that your business applications write text data to your gateway at a rate of 40 MB per second for 12 hours per day and your network throughput is 12 MB per second. Assuming a compression factor of 2:1 for the text data, you would allocate approximately 690 GiB of space for the upload buffer. Example ((40 MB/sec) - (12 MB/sec * 2)) * (12 hours * 3600 seconds/hour) = 691200 megabytes You can initially use this approximation to determine the disk size that you want to allocate to the gateway as upload buffer space. Add more upload buffer space as needed using the Storage Deciding the amount of local disk storage API Version 2013-06-30 146 AWS Storage Gateway Volume Gateway User Guide Gateway console. Also, you can use the Amazon CloudWatch operational metrics to monitor upload buffer usage and determine additional storage requirements. For information on metrics and setting the alarms, see Monitoring the upload buffer. Determining the size of cache storage to allocate Your gateway uses its cache storage to provide low-latency access to your recently accessed data. The cache storage acts as the on-premises durable store for data that is pending upload to Amazon S3 from the upload buffer. Generally speaking, you size the cache storage at 1.1 times the upload buffer size. For more information about how to estimate your cache storage size, see Determining the size of upload buffer to allocate. You can initially use this approximation to provision disks for the cache storage. You can then use Amazon CloudWatch operational metrics to monitor the cache storage usage and provision more storage as needed using the console. For information on using the metrics and setting up alarms, see Monitoring cache storage. Configuring additional upload buffer or cache storage As your application needs change, you can increase the gateway's upload buffer or cache storage capacity. You can add storage capacity to your gateway without interrupting functionality or causing downtime. When you add more storage, you do so with the gateway VM turned on. Important When adding cache or upload buffer to an existing gateway, you must create new disks on the gateway host hypervisor or Amazon EC2 instance. Do not remove or change the size of existing disks that have already been allocated as cache or upload buffer. To configure additional upload buffer or cache storage for your gateway 1. Provision one or more new disks on your gateway host hypervisor or Amazon EC2 instance. For information about how to provision a disk on a hypervisor, see your hypervisor's documentation. For information about provisioning Amazon EBS volumes for an Amazon EC2 instance, see Amazon EBS volumes in the Amazon Elastic Compute Cloud User Guide for Linux Instances. In the following steps, you will configure this disk as upload buffer or cache storage. 2. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. Add upload buffer or cache storage API Version 2013-06-30 147 AWS Storage Gateway Volume Gateway User Guide 3. 4. 5. 6. In the navigation pane, choose Gateways. Search for your gateway and select it from the list. From the Actions menu, choose Configure storage. In the Configure storage section, identify the disks you provisioned. If you don't see your disks, choose the refresh icon to refresh the list. For each disk, choose either UPLOAD BUFFER or CACHE STORAGE from the Allocated to drop-down menu. Note UPLOAD BUFFER is the only available option for allocating disks on Stored Volume Gateways. 7. Choose Save changes to save your configuration settings. Managing Bandwidth for Your Volume Gateway You can limit (or throttle) the upload throughput from the gateway to AWS or the download throughput from AWS to your gateway. Using bandwidth throttling helps you to control the amount of network bandwidth used by your gateway. By default, an activated gateway has no rate limits on upload or download. You can specify the rate limit by using the AWS Management Console, or programmatically by using either the Storage Gateway API (see UpdateBandwidthRateLimit) or an AWS Software Development Kit (SDK). By throttling bandwidth programmatically, you can change limits automatically throughout the day—for example, by scheduling tasks to change the bandwidth. You can also define schedule-based bandwidth throttling for your gateway. You schedule bandwidth
storagegateway-vgw-ug-055
storagegateway-vgw-ug.pdf
55
the download throughput from AWS to your gateway. Using bandwidth throttling helps you to control the amount of network bandwidth used by your gateway. By default, an activated gateway has no rate limits on upload or download. You can specify the rate limit by using the AWS Management Console, or programmatically by using either the Storage Gateway API (see UpdateBandwidthRateLimit) or an AWS Software Development Kit (SDK). By throttling bandwidth programmatically, you can change limits automatically throughout the day—for example, by scheduling tasks to change the bandwidth. You can also define schedule-based bandwidth throttling for your gateway. You schedule bandwidth throttling by defining one or more bandwidth-rate-limit intervals. For more information, see Schedule-Based Bandwidth Throttling Using the Storage Gateway Console. Configuring a single setting for bandwidth throttling is the functional equivalent of defining a schedule with a single bandwidth-rate-limit interval set for Everyday, with a Start time of 00:00 and an End time of 23:59. Note The information in this section is specific to Tape and Volume Gateways. To manage bandwidth for an Amazon S3 File Gateway, see Managing Bandwidth for Your Amazon Managing Bandwidth API Version 2013-06-30 148 AWS Storage Gateway Volume Gateway User Guide S3 File Gateway. Bandwidth-rate limits are currently not supported for Amazon FSx File Gateway. Topics • Changing Bandwidth Throttling Using the Storage Gateway Console • Schedule-Based Bandwidth Throttling Using the Storage Gateway Console • Updating Gateway Bandwidth-Rate Limits Using the AWS SDK for Java • Updating Gateway Bandwidth-Rate Limits Using the AWS SDK for .NET • Updating Gateway Bandwidth-Rate Limits Using the AWS Tools for Windows PowerShell Changing Bandwidth Throttling Using the Storage Gateway Console The following procedure shows how to change a gateway's bandwidth throttling from the Storage Gateway console. To change a gateway's bandwidth throttling using the console 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. 3. 4. In the left navigation pane, choose Gateways, and then choose the gateway that you want to manage. For Actions, choose Edit bandwidth limit. In the Edit rate limits dialog box, enter new limit values, and then choose Save. Your changes appear in the Details tab for your gateway. Schedule-Based Bandwidth Throttling Using the Storage Gateway Console The following procedure shows how to schedule changes to a gateway's bandwidth throttling using the Storage Gateway console. To add or modify a schedule for gateway bandwidth throttling 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. Changing Bandwidth Throttling Using the Storage Gateway Console API Version 2013-06-30 149 AWS Storage Gateway Volume Gateway User Guide 2. In the left navigation pane, choose Gateways, and then choose the gateway that you want to manage. 3. For Actions, choose Edit bandwidth rate limit schedule. The gateway's bandwidth-rate-limit schedule is displayed in the Edit bandwidth rate limit schedule dialog box. By default, a new gateway bandwidth-rate-limit schedule is empty. 4. In the Edit bandwidth rate limit schedule dialog box, choose Add new item to add a new bandwidth-rate-limit interval. Enter the following information for each bandwidth-rate-limit interval: • Days of week – You can create the bandwidth-rate-limit interval for weekdays (Monday through Friday), for weekends (Saturday and Sunday), for every day of the week, or for one or more specific days of the week. • Start time – Enter the start time for the bandwidth interval in the gateway's local timezone, using the HH:MM format. Note Your bandwidth-rate-limit interval begins at the start of the minute that you specify here. • End time – Enter the end time for the bandwidth-rate-limit interval in the gateway's local time zone, using the HH:MM format. Important The bandwidth-rate-limit interval ends at the end of the minute specified here. To schedule an interval that ends at the end of an hour, enter 59. To schedule consecutive continuous intervals, transitioning at the start of the hour, with no interruption between the intervals, enter 59 for the end minute of the first interval. Enter 00 for the start minute of the succeeding interval. • Download rate – Enter the download rate limit, in kilobits per second (Kbps), or select No limit to deactivate bandwidth throttling for downloading. The minimum value for the download rate is 100 Kbps. • Upload rate – Enter the upload rate limit, in Kbps, or select No limit to deactivate bandwidth throttling for uploading. The minimum value for the upload rate is 50 Kbps. Scheduling Bandwidth Throttling API Version 2013-06-30 150 AWS Storage Gateway Volume Gateway User Guide To modify your bandwidth-rate-limit intervals, you can enter revised values for the interval parameters. To remove your bandwidth-rate-limit intervals, you can choose Remove to the right of the interval to be deleted. When your changes are complete, choose Save. 5. Continue adding bandwidth-rate-limit intervals by choosing Add new item and entering the day, the start and end times, and the download and
storagegateway-vgw-ug-056
storagegateway-vgw-ug.pdf
56
rate limit, in Kbps, or select No limit to deactivate bandwidth throttling for uploading. The minimum value for the upload rate is 50 Kbps. Scheduling Bandwidth Throttling API Version 2013-06-30 150 AWS Storage Gateway Volume Gateway User Guide To modify your bandwidth-rate-limit intervals, you can enter revised values for the interval parameters. To remove your bandwidth-rate-limit intervals, you can choose Remove to the right of the interval to be deleted. When your changes are complete, choose Save. 5. Continue adding bandwidth-rate-limit intervals by choosing Add new item and entering the day, the start and end times, and the download and upload rate limits. Important Bandwidth-rate-limit intervals cannot overlap. The start time of an interval must occur after the end time of a preceding interval, and before the start time of a following interval. 6. After entering all bandwidth-rate-limit intervals, choose Save changes to save your bandwidth-rate-limit schedule. When the bandwidth-rate-limit schedule is successfully updated, you can see the current download and upload rate limits in the Details panel for the gateway. Updating Gateway Bandwidth-Rate Limits Using the AWS SDK for Java By updating bandwidth-rate limits programmatically, you can adjust your limits automatically over a period of time—for example, by using scheduled tasks. The following example demonstrates how to update a gateway's bandwidth-rate limits using the AWS SDK for Java. To use the example code, you should be familiar with running a Java console application. For more information, see Getting Started in the AWS SDK for Java Developer Guide. Example : Updating Gateway Bandwidth-Rate Limits Using the AWS SDK for Java The following Java code example updates a gateway's bandwidth-rate limits. To use this example code, you must provide the service endpoint, your gateway Amazon Resource Name (ARN), and the upload and download limits. For a list of AWS service endpoints that you can use with Storage Gateway, see AWS Storage Gateway Endpoints and Quotas in the AWS General Reference. import java.io.IOException; Using the AWS SDK for Java API Version 2013-06-30 151 AWS Storage Gateway Volume Gateway User Guide import com.amazonaws.AmazonClientException; import com.amazonaws.auth.PropertiesCredentials; import com.amazonaws.services.storagegateway.AWSStorageGatewayClient; import com.amazonaws.services.storagegateway.model.UpdateBandwidthRateLimitRequest; import com.amazonaws.services.storagegateway.model.UpdateBandwidthRateLimitResult; public class UpdateBandwidthExample { public static AWSStorageGatewayClient sgClient; // The gatewayARN public static String gatewayARN = "*** provide gateway ARN ***"; // The endpoint static String serviceURL = "https://storagegateway.us-east-1.amazonaws.com"; // Rates static long uploadRate = 51200; // Bits per second, minimum 51200 static long downloadRate = 102400; // Bits per second, minimum 102400 public static void main(String[] args) throws IOException { // Create a Storage Gateway client sgClient = new AWSStorageGatewayClient(new PropertiesCredentials( UpdateBandwidthExample.class.getResourceAsStream("AwsCredentials.properties"))); sgClient.setEndpoint(serviceURL); UpdateBandwidth(gatewayARN, uploadRate, downloadRate); } private static void UpdateBandwidth(String gatewayARN2, long uploadRate2, long downloadRate2) { try { UpdateBandwidthRateLimitRequest updateBandwidthRateLimitRequest = new UpdateBandwidthRateLimitRequest() .withGatewayARN(gatewayARN) .withAverageDownloadRateLimitInBitsPerSec(downloadRate) .withAverageUploadRateLimitInBitsPerSec(uploadRate); Using the AWS SDK for Java API Version 2013-06-30 152 AWS Storage Gateway Volume Gateway User Guide UpdateBandwidthRateLimitResult updateBandwidthRateLimitResult = sgClient.updateBandwidthRateLimit(updateBandwidthRateLimitRequest); String returnGatewayARN = updateBandwidthRateLimitResult.getGatewayARN(); System.out.println("Updated the bandwidth rate limits of " + returnGatewayARN); System.out.println("Upload bandwidth limit = " + uploadRate + " bits per second"); System.out.println("Download bandwidth limit = " + downloadRate + " bits per second"); } catch (AmazonClientException ex) { System.err.println("Error updating gateway bandwith.\n" + ex.toString()); } } } Updating Gateway Bandwidth-Rate Limits Using the AWS SDK for .NET By updating bandwidth-rate limits programmatically, you can adjust your limits automatically over a period of time—for example, by using scheduled tasks. The following example demonstrates how to update a gateway's bandwidth-rate limits by using the AWS SDK for .NET. To use the example code, you should be familiar with running a .NET console application. For more information, see Getting Started in the AWS SDK for .NET Developer Guide. Example : Updating Gateway Bandwidth-Rate Limits by Using the AWS SDK for .NET The following C# code example updates a gateway's bandwidth-rate limits. To use this example code, you must provide the service endpoint, your gateway Amazon Resource Name (ARN), and the upload and download limits. For a list of AWS service endpoints that you can use with Storage Gateway, see AWS Storage Gateway Endpoints and Quotas in the AWS General Reference. using System; using System.Collections.Generic; using System.Linq; using System.Text; using Amazon.StorageGateway; using Amazon.StorageGateway.Model; namespace AWSStorageGateway { class UpdateBandwidthExample Using the AWS SDK for .NET API Version 2013-06-30 153 AWS Storage Gateway { static AmazonStorageGatewayClient sgClient; static AmazonStorageGatewayConfig sgConfig; Volume Gateway User Guide // The gatewayARN public static String gatewayARN = "*** provide gateway ARN ***"; // The endpoint static String serviceURL = "https://storagegateway.us-east-1.amazonaws.com"; // Rates static long uploadRate = 51200; // Bits per second, minimum 51200 static long downloadRate = 102400; // Bits per second, minimum 102400 public static void Main(string[] args) { // Create a Storage Gateway client sgConfig = new AmazonStorageGatewayConfig(); sgConfig.ServiceURL = serviceURL; sgClient = new AmazonStorageGatewayClient(sgConfig); UpdateBandwidth(gatewayARN, uploadRate, downloadRate); Console.WriteLine("\nTo continue, press Enter."); Console.Read(); } public static void UpdateBandwidth(string gatewayARN, long uploadRate, long downloadRate) { try { UpdateBandwidthRateLimitRequest updateBandwidthRateLimitRequest
storagegateway-vgw-ug-057
storagegateway-vgw-ug.pdf
57
AmazonStorageGatewayClient sgClient; static AmazonStorageGatewayConfig sgConfig; Volume Gateway User Guide // The gatewayARN public static String gatewayARN = "*** provide gateway ARN ***"; // The endpoint static String serviceURL = "https://storagegateway.us-east-1.amazonaws.com"; // Rates static long uploadRate = 51200; // Bits per second, minimum 51200 static long downloadRate = 102400; // Bits per second, minimum 102400 public static void Main(string[] args) { // Create a Storage Gateway client sgConfig = new AmazonStorageGatewayConfig(); sgConfig.ServiceURL = serviceURL; sgClient = new AmazonStorageGatewayClient(sgConfig); UpdateBandwidth(gatewayARN, uploadRate, downloadRate); Console.WriteLine("\nTo continue, press Enter."); Console.Read(); } public static void UpdateBandwidth(string gatewayARN, long uploadRate, long downloadRate) { try { UpdateBandwidthRateLimitRequest updateBandwidthRateLimitRequest = new UpdateBandwidthRateLimitRequest() .WithGatewayARN(gatewayARN) .WithAverageDownloadRateLimitInBitsPerSec(downloadRate) .WithAverageUploadRateLimitInBitsPerSec(uploadRate); UpdateBandwidthRateLimitResponse updateBandwidthRateLimitResponse = sgClient.UpdateBandwidthRateLimit(updateBandwidthRateLimitRequest); String returnGatewayARN = updateBandwidthRateLimitResponse.UpdateBandwidthRateLimitResult.GatewayARN; Console.WriteLine("Updated the bandwidth rate limits of " + returnGatewayARN); Using the AWS SDK for .NET API Version 2013-06-30 154 AWS Storage Gateway Volume Gateway User Guide Console.WriteLine("Upload bandwidth limit = " + uploadRate + " bits per second"); Console.WriteLine("Download bandwidth limit = " + downloadRate + " bits per second"); } catch (AmazonStorageGatewayException ex) { Console.WriteLine("Error updating gateway bandwith.\n" + ex.ToString()); } } } } Updating Gateway Bandwidth-Rate Limits Using the AWS Tools for Windows PowerShell By updating bandwidth-rate limits programmatically, you can adjust limits automatically over a period of time—for example, by using scheduled tasks. The following example demonstrates how to update a gateway's bandwidth-rate limits using the AWS Tools for Windows PowerShell. To use the example code, you should be familiar with running a PowerShell script. For more information, see Getting Started in the AWS Tools for Windows PowerShell User Guide. Example : Updating Gateway Bandwidth-Rate Limits by Using the AWS Tools for Windows PowerShell The following PowerShell script example updates a gateway's bandwidth-rate limits. To use this example script, you must provide your gateway Amazon Resource Name (ARN), and the upload and download limits. <# .DESCRIPTION Update Gateway bandwidth limits. .NOTES PREREQUISITES: 1) AWS Tools for PowerShell from https://aws.amazon.com/powershell/ 2) Credentials and region stored in session using Initialize-AWSDefault. For more info, see https://docs.aws.amazon.com/powershell/latest/userguide/ specifying-your-aws-credentials.html Using the AWS Tools for Windows PowerShell API Version 2013-06-30 155 AWS Storage Gateway Volume Gateway User Guide .EXAMPLE powershell.exe .\SG_UpdateBandwidth.ps1 #> $UploadBandwidthRate = 51200 $DownloadBandwidthRate = 102400 $gatewayARN = "*** provide gateway ARN ***" #Update Bandwidth Rate Limits Update-SGBandwidthRateLimit -GatewayARN $gatewayARN ` -AverageUploadRateLimitInBitsPerSec $UploadBandwidthRate ` -AverageDownloadRateLimitInBitsPerSec $DownloadBandwidthRate $limits = Get-SGBandwidthRateLimit -GatewayARN $gatewayARN Write-Output("`nGateway: " + $gatewayARN); Write-Output("`nNew Upload Rate: " + $limits.AverageUploadRateLimitInBitsPerSec) Write-Output("`nNew Download Rate: " + $limits.AverageDownloadRateLimitInBitsPerSec) Managing gateway updates Storage Gateway consists of a managed cloud services component and a gateway appliance component that you deploy either on-premises, or on an Amazon EC2 instance in the AWS cloud. Both components receive regular updates. The topics in this section describe the cadence of these updates, how they are applied, and how to configure update-related settings on the gateways in your deployment. Important You should treat the Storage Gateway appliance as a managed virtual machine, and should not attempt to access or modify its installation in any way. Attempting to install or update any software packages using methods other than the normal AWS gateway update mechanism (for example, SSM or hypervisor tools) may cause the gateway to malfunction. Managing gateway updates API Version 2013-06-30 156 AWS Storage Gateway Volume Gateway User Guide Update frequency and expected behavior AWS updates the cloud services component as needed without causing disruption to deployed gateways. Your deployed gateway appliances receive monthly maintenance updates. Monthly maintenance updates can include operating system and software upgrades, fixes to address stability, performance, and security, and access to new features. All updates are cumulative, and upgrade gateways to the current version when applied. For information about the specific changes included in each update, see Release Notes for Volume Gateway Appliance Software. Monthly maintenance updates may cause a brief disruption of service. The gateway's VM host doesn't need to reboot during updates, but the gateway will be unavailable for a short period while the gateway appliance updates and restarts. You can minimize the chance of any disruption to your applications due to the gateway restart by increasing the timeouts of your iSCSI initiator. For more information about increasing iSCSI initiator timeouts for Windows and Linux, see Customizing Your Windows iSCSI Settings and Customizing Your Linux iSCSI Settings. When you deploy and activate your gateway, a default weekly maintenance window schedule is set. You can modify the maintenance window schedule at any time. You can also turn off monthly maintenance updates, but we recommend leaving them turned on. Note Urgent updates will sometimes be applied according to the maintenance window schedule, even if regular maintenance updates are turned off. Before any update is applied to your gateway, AWS notifies you with a message on the Storage Gateway console and your AWS Health Dashboard. For more information, see AWS Health Dashboard. To modify the email address where software update notifications
storagegateway-vgw-ug-058
storagegateway-vgw-ug.pdf
58
you deploy and activate your gateway, a default weekly maintenance window schedule is set. You can modify the maintenance window schedule at any time. You can also turn off monthly maintenance updates, but we recommend leaving them turned on. Note Urgent updates will sometimes be applied according to the maintenance window schedule, even if regular maintenance updates are turned off. Before any update is applied to your gateway, AWS notifies you with a message on the Storage Gateway console and your AWS Health Dashboard. For more information, see AWS Health Dashboard. To modify the email address where software update notifications are sent, see Update the alternate contacts for your AWS account in the AWS Account Management Reference Guide. When updates are available, the gateway Details tab displays a maintenance message. You can also see the date and time that the last successful update was applied on the Details tab. Turn maintenance updates on or off When maintenance updates are turned on, your gateway automatically applies these updates according to the configured maintenance window schedule. For more information, see . Update frequency and expected behavior API Version 2013-06-30 157 AWS Storage Gateway Volume Gateway User Guide If maintenance updates are turned off, the gateway will not apply these updates automatically, but you can always apply them manually using the Storage Gateway console, API, or CLI. Urgent updates will sometimes be applied during your configured maintenance window, regardless of this setting. Note The following procedure describes how to turn gateway updates on or off using the Storage Gateway console. To change this setting programmatically using the API, see UpdateMaintenanceStartTime in the Storage Gateway API Reference. To turn maintenance updates on or off using the Storage Gateway console: 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. On the navigation pane, choose Gateways, and then choose the gateway for which you want to configure maintenance updates. 3. Choose Actions, and then choose Edit maintenance settings. 4. For Maintenance updates, select On or Off. 5. Choose Save changes when finished. You can verify the updated setting on the Details tab for the selected gateway in the Storage Gateway console. Modify the gateway maintenance window schedule If maintenance updates are turned on, your gateway automatically applies these updates according the maintenance window schedule. Urgent updates will sometimes be applied during your configured maintenance window, regardless of the maintenance updates setting. Note The following procedure describes how to modify the maintenance window schedule using the Storage Gateway console. To change this setting programmatically using the API, see UpdateMaintenanceStartTime in the Storage Gateway API Reference. Modify the gateway maintenance window schedule API Version 2013-06-30 158 AWS Storage Gateway Volume Gateway User Guide To modify the maintenance window schedule using the Storage Gateway console: 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. On the navigation pane, choose Gateways, and then choose the gateway for which you want to configure maintenance updates. 3. Choose Actions, and then choose Edit maintenance settings. 4. Under Maintenance window start time, do the following: a. b. For Schedule, choose Weekly or Monthly to set the maintenance window cadence. If you choose Weekly, modify the values for Day of the week and Time to set the specific point during each week when the maintenance window will begin. If you choose Monthly, modify the values for Day of the month and Time to set the specific point during each month when the maintenance window will begin. Note The maximum value that can be set for day of the month is 28. It is not possible to set the maintenance schedule to start on days 29 through 31. If you receive an error while configuring this setting, it might mean that your gateway software is out of date. Considering updating your gateway manually first, and then attempt to configure the maintenance window schedule again. 5. Choose Save changes when finished. You can verify the updated settings on the Details tab for the selected gateway in the Storage Gateway console. Apply an update manually If a software update is available for your gateway, you can apply it manually by following the procedure below. This manual update process ignores the maintenance window schedule and applies the update immediately, even if maintenance updates are turned off. Apply an update manually API Version 2013-06-30 159 AWS Storage Gateway Note Volume Gateway User Guide The following procedure describes how to manually apply an update using the Storage Gateway console. To perform this action programmatically using the API, see UpdateGatewaySoftwareNow in the Storage Gateway API Reference. To apply a gateway software update manually using the Storage Gateway console: 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. On the navigation pane, choose Gateways, and then choose the gateway you want to update. If an update is available, the
storagegateway-vgw-ug-059
storagegateway-vgw-ug.pdf
59
the update immediately, even if maintenance updates are turned off. Apply an update manually API Version 2013-06-30 159 AWS Storage Gateway Note Volume Gateway User Guide The following procedure describes how to manually apply an update using the Storage Gateway console. To perform this action programmatically using the API, see UpdateGatewaySoftwareNow in the Storage Gateway API Reference. To apply a gateway software update manually using the Storage Gateway console: 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. On the navigation pane, choose Gateways, and then choose the gateway you want to update. If an update is available, the console displays a blue notification banner on the gateway Details tab, which includes an option to apply the update. 3. Choose Apply update now to immediately update the gateway. Note This operation causes a temporary disruption to gateway functionality while the update installs. During this time, the gateway status appears OFFLINE in the Storage Gateway console. After the update finishes installing, the gateway resumes normal operation and its status changes to RUNNING. You can verify that the gateway software was updated to the latest version by checking the Details tab for the selected gateway in the Storage Gateway console. Shutting Down Your Gateway VM You might need to shutdown or reboot your VM for maintenance, such as when applying a patch to your hypervisor. Before you shutdown the VM, you must first stop the gateway. Although this section focuses on starting and stopping your gateway using the Storage Gateway Management Console, you can also and stop your gateway by using your VM local console or Storage Gateway API. When you power on your VM, remember to restart your gateway. Shutting Down Your Gateway VM API Version 2013-06-30 160 AWS Storage Gateway Important Volume Gateway User Guide If you stop and start an Amazon EC2 gateway that uses ephemeral storage, the gateway will be permanently offline. This happens because the physical storage disk is replaced. There is no work-around for this issue. The only resolution is to delete the gateway and activate a new one on a new EC2 instance. Note If you stop your gateway while your backup software is writing or reading from a tape, the write or read task might not succeed. Before you stop your gateway, you should check your backup software and the backup schedule for any tasks in progress. • Gateway VM local console—see Logging in to the Volume Gateway local console. • Storage Gateway API-—see ShutdownGateway Starting and Stopping a Volume Gateway To stop a Volume Gateway 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. 3. In the navigation pane, choose Gateways, and then choose the gateway to stop. The status of the gateway is Running. For Actions, choose Stop gateway and verify the id of the gateway from the dialog box, and then choose Stop gateway. While the gateway is stopping, you might see a message that indicates the status of the gateway. When the gateway shuts down, a message and a Start gateway button appears in the Details tab. When you stop your gateway, the storage resources will not be accessible until you start your storage. If the gateway was uploading data when it was stopped, the upload will resume when you start the gateway. Starting and Stopping a Volume Gateway API Version 2013-06-30 161 AWS Storage Gateway To start a Volume Gateway Volume Gateway User Guide 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. In the navigation pane, choose Gateways and then choose the gateway to start. The status of the gateway is Shutdown. 3. Choose Details. and then choose Start gateway. Deleting your gateway and removing associated resources If you don't plan to continue using your gateway, consider deleting the gateway and its associated resources. Removing resources avoids incurring charges for resources you don't plan to continue using and helps reduce your monthly bill. When you delete a gateway, it no longer appears on the AWS Storage Gateway Management Console and its iSCSI connection to the initiator is closed. The procedure for deleting a gateway is the same for all gateway types; however, depending on the type of gateway you want to delete and the host it is deployed on, you follow specific instructions to remove associated resources. You can delete a gateway using the Storage Gateway console or programmatically. You can find information following about how to delete a gateway using the Storage Gateway console. If you want to programmatically delete your gateway, see AWS Storage Gateway API Reference. Topics • Deleting Your Gateway by Using the Storage Gateway Console • Removing Resources from a Gateway Deployed On-Premises • Removing Resources from a Gateway Deployed on an Amazon EC2 Instance Deleting Your Gateway by Using the Storage Gateway Console The procedure for deleting a gateway
storagegateway-vgw-ug-060
storagegateway-vgw-ug.pdf
60
it is deployed on, you follow specific instructions to remove associated resources. You can delete a gateway using the Storage Gateway console or programmatically. You can find information following about how to delete a gateway using the Storage Gateway console. If you want to programmatically delete your gateway, see AWS Storage Gateway API Reference. Topics • Deleting Your Gateway by Using the Storage Gateway Console • Removing Resources from a Gateway Deployed On-Premises • Removing Resources from a Gateway Deployed on an Amazon EC2 Instance Deleting Your Gateway by Using the Storage Gateway Console The procedure for deleting a gateway is the same for all gateway types. However, depending on the type of gateway you want to delete and the host the gateway is deployed on, you might have to perform additional tasks to remove resources associated with the gateway. Removing these resources helps you avoid paying for resources you don't plan to use. Deleting your gateway and removing resources API Version 2013-06-30 162 AWS Storage Gateway Note Volume Gateway User Guide For gateways deployed on an Amazon EC2 instance, the instance continues to exist until you delete it. For gateways deployed on a virtual machine (VM), after you delete your gateway the gateway VM still exists in your virtualization environment. To remove the VM, use the VMware vSphere client, Microsoft Hyper-V Manager, or Linux Kernel-based Virtual Machine (KVM) client to connect to the host and remove the VM. Note that you can't reuse the deleted gateway's VM to activate a new gateway. To delete a gateway 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose Gateways, then select one or more gateways to delete. 3. For Actions, choose Delete gateway. The confirmation dialog box appears. Warning Before you do this step, make sure that there are no applications currently writing to the gateway's volumes. If you delete the gateway while it is in use, data loss can occur. When a gateway is deleted, there is no way to get it back. 4. Verify that you want to delete the specified gateways, then type the word delete in the confirmation box, and choose Delete. 5. (Optional) If you want to provide feedback about your deleted gateway, complete the feedback dialog box, then choose Submit. Otherwise, choose Skip. Important You no longer pay software charges after you delete a gateway, but resources such as virtual tapes, Amazon Elastic Block Store (Amazon EBS) snapshots, and Amazon EC2 instances persist. You will continue to be billed for these resources. You can choose to remove Amazon EC2 instances and Amazon EBS snapshots by canceling your Amazon Deleting Your Gateway by Using the Storage Gateway Console API Version 2013-06-30 163 AWS Storage Gateway Volume Gateway User Guide EC2 subscription. If you want to keep your Amazon EC2 subscription, you can delete your Amazon EBS snapshots using the Amazon EC2 console. Removing Resources from a Gateway Deployed On-Premises You can use the instructions following to remove resources from a gateway that is deployed on- premises. Removing Resources from a Volume Gateway Deployed on a VM If the gateway you want to delete are deployed on a virtual machine (VM), we suggest that you take the following actions to clean up resources: • Delete the gateway. For instructions, see Deleting Your Gateway by Using the Storage Gateway Console. • Delete all Amazon EBS snapshots you don't need. For instructions, see Deleting an Amazon EBS Snapshot in the Amazon EC2 User Guide. Removing Resources from a Gateway Deployed on an Amazon EC2 Instance If you want to delete a gateway that you deployed on an Amazon EC2 instance, we recommend that you clean up the AWS resources that were used with the gateway, specifically the Amazon EC2 instance, any Amazon EBS volumes, and also tapes if you deployed a Tape Gateway. Doing so helps avoid unintended usage charges. Removing Resources from Your Cached Volumes Deployed on Amazon EC2 If you deployed a gateway with cached volumes on EC2, we suggest that you take the following actions to delete your gateway and clean up its resources: 1. In the Storage Gateway console, delete the gateway as shown in Deleting Your Gateway by Using the Storage Gateway Console. 2. In the Amazon EC2 console, stop your EC2 instance if you plan on using the instance again. Otherwise, terminate the instance. If you plan on deleting volumes, make note of the block devices that are attached to the instance and the devices' identifiers before terminating the instance. You will need these to identify the volumes you want to delete. Removing Resources from a Gateway Deployed On-Premises API Version 2013-06-30 164 AWS Storage Gateway Volume Gateway User Guide 3. In the Amazon EC2 console, remove all Amazon EBS volumes that are attached to the instance if you don't plan on
storagegateway-vgw-ug-061
storagegateway-vgw-ug.pdf
61
2. In the Amazon EC2 console, stop your EC2 instance if you plan on using the instance again. Otherwise, terminate the instance. If you plan on deleting volumes, make note of the block devices that are attached to the instance and the devices' identifiers before terminating the instance. You will need these to identify the volumes you want to delete. Removing Resources from a Gateway Deployed On-Premises API Version 2013-06-30 164 AWS Storage Gateway Volume Gateway User Guide 3. In the Amazon EC2 console, remove all Amazon EBS volumes that are attached to the instance if you don't plan on using them again. For more information, see Clean Up Your Instance and Volume in the Amazon EC2 User Guide. Removing Resources from a Gateway Deployed on an Amazon EC2 Instance API Version 2013-06-30 165 AWS Storage Gateway Volume Gateway User Guide Performing maintenance tasks using the local console This section contains the following topics, which provide information about how to perform maintenance tasks using the gateway appliance local console. The local console runs directly on the virtualization host platform that hosts your gateway appliance. For on-premises gateways, you access the local console through your VMware, Hyper-v, or Linux KVM virtualization host. For Amazon EC2 gateways, you access the console by connecting to the Amazon EC2 instance using SSH. Most of the tasks are common across the different host platforms, but there are also some differences. Topics • Accessing the Gateway Local Console - Learn how to log into the local console for an on- premises gateway hosted on a Linux Kernel-based Virtual Machine (KVM), VMware ESXi, or Microsoft Hyper-V Manager platform. • Performing Tasks on the VM Local Console - Learn how to use the local console to perform basic setup and advanced configuration tasks for an on-premises gateway, such as configuring an HTTP proxy, viewing system resource status, or running terminal commands. • Performing Tasks on the Amazon EC2 Local Console - Learn how to log into the local console to perform basic setup and advanced configuration tasks for an Amazon EC2 gateway, such as configuring an HTTP proxy, viewing system resource status, or running terminal commands. Accessing the Gateway Local Console How you access your VM's local console depends on the type of the Hypervisor you deployed your gateway VM on. In this section, you can find information on how to access the VM local console using Linux Kernel-based Virtual Machine (KVM), VMware ESXi, and Microsoft Hyper-V Manager. Topics • Accessing the Gateway Local Console with Linux KVM • Accessing the Gateway Local Console with VMware ESXi • Access the Gateway Local Console with Microsoft Hyper-V Accessing the Gateway Local Console API Version 2013-06-30 166 AWS Storage Gateway Volume Gateway User Guide Accessing the Gateway Local Console with Linux KVM There are different ways to configure virtual machines running on KVM, depending on the Linux distribution being used. Instructions for accessing KVM configuration options from the command line follow. Instructions might differ depending on your KVM implementation. To access your gateway's local console with KVM 1. Use the following command to list the VMs that are currently available in KVM. # virsh list The command returns a list of VMs with Id, Name, and State information for each. Note the Id of the VM for which you want to launch the gateway local console. 2. Use the following command to access the local console. # virsh console Id Replace Id with the Id of the VM you noted in the previous step. The AWS Appliance gateway local console prompts you to login to change your network configuration and other settings. 3. Enter your username and password to log into the gateway local console. For more information, see Logging in to the Volume Gateway local console. After you log in, the AWS Appliance Activation - Configuration menu appears. You can select from the menu options to perform gateway configuration tasks. For more information, see Performing tasks on the virtual machine local console. Accessing the Gateway Local Console with VMware ESXi To access your gateway's local console with VMware ESXi 1. In the VMware vSphere client, select your gateway VM. 2. Make sure that the gateway VM is turned on. Accessing the Gateway Local Console with Linux KVM API Version 2013-06-30 167 AWS Storage Gateway Note Volume Gateway User Guide If your gateway VM is turned on, a green arrow icon appears with the VM icon in the VM browser panel on the left side of the application window. If your gateway VM is not turned on, you can turn it on by choosing the green Power On icon on the Toolbar at the top of the application window. 3. Choose the Console tab in the main information panel on the right side of the application window. After a few
storagegateway-vgw-ug-062
storagegateway-vgw-ug.pdf
62
Accessing the Gateway Local Console with Linux KVM API Version 2013-06-30 167 AWS Storage Gateway Note Volume Gateway User Guide If your gateway VM is turned on, a green arrow icon appears with the VM icon in the VM browser panel on the left side of the application window. If your gateway VM is not turned on, you can turn it on by choosing the green Power On icon on the Toolbar at the top of the application window. 3. Choose the Console tab in the main information panel on the right side of the application window. After a few moments, the AWS Appliance gateway local console prompts you to login to change your network configuration and other settings. Note To release the cursor from the console window, press Ctrl+Alt. 4. Enter your username and password to log into the gateway local console. For more information, see Logging in to the Volume Gateway local console. After you log in, the AWS Appliance Activation - Configuration menu appears. You can select from the menu options to perform gateway configuration tasks. For more information, see Performing tasks on the virtual machine local console. Access the Gateway Local Console with Microsoft Hyper-V To access your gateway's local console (Microsoft Hyper-V) 1. Select your gateway appliance VM from the Virtual Machines panel on the left side of the Microsoft Hyper-V Manager application window. 2. Make sure that the gateway is turned on. Note If your gateway VM is turned on, Running is displayed in the State column for the VM in the Virtual Machines panel on the left side of the application window. If your Access the Gateway Local Console with Microsoft Hyper-V API Version 2013-06-30 168 AWS Storage Gateway Volume Gateway User Guide gateway VM is not turned on, you can turn it on by choosing Start in the Actions panel on the right side of the application window. 3. Choose Connect from the Actions panel. The Virtual Machine Connection window appears. If an authentication window appears, type the sign-in credentials provided to you by the hypervisor administrator. After a few moments, the AWS Appliance gateway local console prompts you to login to change your network configuration and other settings. 4. Enter your username and password to log into the gateway local console. For more information, see Logging in to the Volume Gateway local console. After you log in, the AWS Appliance Activation - Configuration menu appears. You can select from the menu options to perform gateway configuration tasks. For more information, see Performing tasks on the virtual machine local console. Performing Tasks on the VM Local Console For a Volume Gateway that you deploy on-premises, you can perform the following maintenance tasks using the gateway local console that you access from your virtual machine host platform. These tasks are common to VMware, Microsoft Hyper-V, and Linux Kernel-based Virtual Machine (KVM) hypervisors. Topics • Logging in to the Volume Gateway local console - Learn about how to log in to the gateway local console where you can configure gateway network settings and change the default password. • Configuring a SOCKS5 proxy for your on-premises gateway - Learn about how you can configure Storage Gateway to route all AWS endpoint traffic through a Socket Secure version 5 (SOCKS5) proxy server. • Configuring Your Gateway Network - Learn about how you can configure your gateway to use DHCP or assign a static IP address. • Testing your gateway connection to the internet - Learn about how you can use the gateway local console to test the connection between the gateway and the internet. Performing Tasks on the VM Local Console API Version 2013-06-30 169 AWS Storage Gateway Volume Gateway User Guide • Running storage gateway commands in the local console for an on-premises gateway - Learn about how to run local console commands that allow you to perform additional tasks such as saving routing tables, connecting to Support, and more. • Viewing your gateway system resource status - Learn about how to check the virtual CPU cores, root volume size, and RAM that are available to your gateway appliance. Logging in to the Volume Gateway local console When the VM is ready for you to log in, the login screen is displayed. If this is your first time logging in to the local console, you use the default sign-in credentials to log in. These default login credentials give you access to menus where you can configure gateway network settings and change the password from the local console. Storage Gateway allows you to set your own password from the AWS Storage Gateway console instead of changing the password from the local console. You don't need to know the default password to set a new password. For more information, see Setting the Local Console Password from the
storagegateway-vgw-ug-063
storagegateway-vgw-ug.pdf
63
log in, the login screen is displayed. If this is your first time logging in to the local console, you use the default sign-in credentials to log in. These default login credentials give you access to menus where you can configure gateway network settings and change the password from the local console. Storage Gateway allows you to set your own password from the AWS Storage Gateway console instead of changing the password from the local console. You don't need to know the default password to set a new password. For more information, see Setting the Local Console Password from the Storage Gateway Console. To log in to the gateway's local console • If this is your first time logging in to the local console, log in to the VM with the default credentials. The default user name is admin and the password is password. Otherwise, use your credentials to log in. Note We recommend changing the default password by entering the corresponding numeral for Gateway Console from the AWS Appliance Activation - Configuration main menu, then running the passwd command. For information about how to run the command, see Running storage gateway commands in the local console for an on-premises gateway. You can also set your own password from the AWS Storage Gateway console. For more information, see Setting the Local Console Password from the Storage Gateway Console. Logging in to the Volume Gateway local console API Version 2013-06-30 170 AWS Storage Gateway Volume Gateway User Guide Important For older versions of the volume or Tape Gateway, the user name is sguser and the password is sgpassword. If you reset your password and your gateway is updated to a newer version, your the user name will change to admin but the password will be maintained. Setting the Local Console Password from the Storage Gateway Console When you log in to the local console for the first time, you log in to the VM with the default credentials— The user name is admin and the password is password. We recommend that you always set a new password immediately after you create your new gateway. You can set this password from the AWS Storage Gateway console rather than the local console if you want. You don't need to know the default password to set a new password. To set the local console password on the Storage Gateway console 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. On the navigation pane, choose Gateways then choose the gateway for which you want to set 3. 4. a new password. For Actions, choose Set Local Console Password. In the Set Local Console Password dialog box, type a new password, confirm the password and then choose Save. Your new password replaces the default password. Storage Gateway does not save the password but rather safely transmits it to the VM. Note The password can consist of any character on the keyboard and can be 1 to 512 characters long. Logging in to the Volume Gateway local console API Version 2013-06-30 171 AWS Storage Gateway Volume Gateway User Guide Configuring a SOCKS5 proxy for your on-premises gateway Volume Gateways and Tape Gateways support configuration of a Socket Secure version 5 (SOCKS5) proxy between your on-premises gateway and AWS. Note The only supported proxy configuration is SOCKS5. If your gateway must use a proxy server to communicate to the internet, then you need to configure the SOCKS proxy settings for your gateway. You do this by specifying an IP address and port number for the host running your proxy. After you do so, Storage Gateway routes all traffic through your proxy server. For information about network requirements for your gateway, see Network and firewall requirements. The following procedure shows you how to configure SOCKS proxy for Volume Gateway and Tape Gateway. To configure a SOCKS5 proxy for volume and Tape Gateways 1. Log in to your gateway's local console. • VMware ESXi – for more information, see Accessing the Gateway Local Console with VMware ESXi. • Microsoft Hyper-V – for more information, see Access the Gateway Local Console with Microsoft Hyper-V. 2. 3. • KVM – for more information, see Accessing the Gateway Local Console with Linux KVM. From the AWS Storage Gateway - Configuration main menu, enter the corresponding numeral to select SOCKS Proxy Configuration. From the AWS Storage Gateway SOCKS Proxy Configuration menu, enter the corresponding numeral to perform one of the following tasks: To Perform This Task Do This Configure a SOCKS proxy Enter the corresponding numeral to select Configure SOCKS Proxy. Configuring a SOCKS5 proxy for your on-premises gateway API Version 2013-06-30 172 AWS Storage Gateway Volume Gateway User Guide To Perform This Task Do This View the current SOCKS proxy configura tion Remove a SOCKS proxy configuration You will need to supply
storagegateway-vgw-ug-064
storagegateway-vgw-ug.pdf
64
KVM. From the AWS Storage Gateway - Configuration main menu, enter the corresponding numeral to select SOCKS Proxy Configuration. From the AWS Storage Gateway SOCKS Proxy Configuration menu, enter the corresponding numeral to perform one of the following tasks: To Perform This Task Do This Configure a SOCKS proxy Enter the corresponding numeral to select Configure SOCKS Proxy. Configuring a SOCKS5 proxy for your on-premises gateway API Version 2013-06-30 172 AWS Storage Gateway Volume Gateway User Guide To Perform This Task Do This View the current SOCKS proxy configura tion Remove a SOCKS proxy configuration You will need to supply a host name and port to complete configuration. Enter the corresponding numeral to select View Current SOCKS Proxy Configuration. If a SOCKS proxy is not configured, the message SOCKS Proxy not configure d is displayed. If a SOCKS proxy is configure d, the host name and port of the proxy are displayed. Enter the corresponding numeral to select Remove SOCKS Proxy Configuration. The message SOCKS Proxy Configura tion Removed is displayed. 4. Restart your VM to apply your HTTP configuration. Configuring Your Gateway Network The default network configuration for the gateway is Dynamic Host Configuration Protocol (DHCP). With DHCP, your gateway is automatically assigned an IP address. In some cases, you might need to manually assign your gateway's IP as a static IP address, as described following. To configure your gateway to use static IP addresses 1. Log in to your gateway's local console. • VMware ESXi – for more information, see Accessing the Gateway Local Console with VMware ESXi. • Microsoft Hyper-V – for more information, see Access the Gateway Local Console with Microsoft Hyper-V. • KVM – for more information, see Accessing the Gateway Local Console with Linux KVM. Configuring Your Gateway Network API Version 2013-06-30 173 AWS Storage Gateway Volume Gateway User Guide 2. 3. From the AWS Storage Gateway - Configuration main menu, enter the corresponding numeral to select Network Configuration. From the AWS Storage Gateway Network Configuration menu, perform one of the following tasks: To Perform This Task Do This Describe network adapter Enter the corresponding numeral to select Describe Adapter. A list of adapter names appears, and you are prompted to type an adapter name—for example, eth0. If the adapter you specify is in use, the following information about the adapter is displayed: • • • • • Media access control (MAC) address IP address Netmask Gateway IP address DHCP activated status You use the adapter names listed here when you configure a static IP address or set your gateway's default adapter. Enter the corresponding numeral to select Configure DHCP. You are prompted to configure network interface to use DHCP. Configure DHCP Configuring Your Gateway Network API Version 2013-06-30 174 AWS Storage Gateway Volume Gateway User Guide To Perform This Task Do This Configure a static IP address for your gateway Enter the corresponding numeral to select Configure Static IP. You are prompted to type the following information to configure a static IP: • • • • • • Network adapter name IP address Netmask Default gateway address Primary Domain Name Service (DNS) address Secondary DNS address Important If your gateway has already been activated, you must shut it down and restart it from the Storage Gateway console for the settings to take effect. For more information, see Shutting Down Your Gateway VM. If your gateway uses more than one network interface, you must set all activated interfaces to use DHCP or static IP addresses. Configuring Your Gateway Network API Version 2013-06-30 175 AWS Storage Gateway Volume Gateway User Guide To Perform This Task Do This Configure a hostname for your gateway For example, suppose your gateway VM uses two interfaces configured as DHCP. If you later set one interface to a static IP, the other interface is deactivated. To activate the interface in this case, you must set it to a static IP. If both interfaces are initially set to use static IP addresses and you then set the gateway to use DHCP, both interfaces will use DHCP. Enter the corresponding numeral to select Configure Hostname. You are prompted to choose whether the gateway will use a static hostname that you specify, or aquire one automatically through DCHP or rDNS. If you select Static, you are prompted to provide a static hostname, such as testgateway.example.com . Enter y to apply the configuration. Note If you configure a static hostname for your gateway, ensure that the provided hostname is in the domain that gateway is joined to. You must also create an A record in your DNS system that points the gateway's IP address to its static hostname. Configuring Your Gateway Network API Version 2013-06-30 176 AWS Storage Gateway Volume Gateway User Guide To Perform This Task Do This Reset all your gateway's network
storagegateway-vgw-ug-065
storagegateway-vgw-ug.pdf
65
aquire one automatically through DCHP or rDNS. If you select Static, you are prompted to provide a static hostname, such as testgateway.example.com . Enter y to apply the configuration. Note If you configure a static hostname for your gateway, ensure that the provided hostname is in the domain that gateway is joined to. You must also create an A record in your DNS system that points the gateway's IP address to its static hostname. Configuring Your Gateway Network API Version 2013-06-30 176 AWS Storage Gateway Volume Gateway User Guide To Perform This Task Do This Reset all your gateway's network configuration to DHCP Set your gateway's default route adapter View your gateway's DNS configuration View routing tables Enter the corresponding numeral to select Reset all to DHCP. All network interfaces are set to use DHCP. Important If your gateway has already been activated, you must shut down and restart your gateway from the Storage Gateway console for the settings to take effect. For more information, see Shutting Down Your Gateway VM. Enter the corresponding numeral to select Set Default Adapter. The available adapters for your gateway are shown, and you are prompted to select one of the adapters—for example, eth0. Enter the corresponding numeral to select View DNS Configuration. The IP addresses of the primary and secondary DNS name servers are displayed. Enter the corresponding numeral to select View Routes. The default route of your gateway is displayed. Configuring Your Gateway Network API Version 2013-06-30 177 AWS Storage Gateway Volume Gateway User Guide Testing your gateway connection to the internet You can use your gateway's local console to test your internet connection. This test can be useful when you are troubleshooting network issues with your gateway. To test your gateway's connection to the internet 1. Log in to your gateway's local console. • VMware ESXi – for more information, see Accessing the Gateway Local Console with VMware ESXi. • Microsoft Hyper-V – for more information, see Access the Gateway Local Console with Microsoft Hyper-V. • KVM – for more information, see Accessing the Gateway Local Console with Linux KVM. 2. From the AWS Storage Gateway - Configuration main menu, enter the corresponding numeral to select Test Network Connectivity. If your gateway has already been activated, the connectivity test begins immediately. For gateways that have not yet been activated, you must specify the endpoint type and AWS Region as described in the following steps. 3. If your gateway is not yet activated, enter the corresponding numeral to select the endpoint type for your gateway. 4. If you selected the public endpoint type, enter the corresponding numeral to select the AWS Region that you want to test. For supported AWS Regions and a list of AWS service endpoints you can use with Storage Gateway, see AWS Storage Gateway endpoints and quotas in the AWS General Reference. As the test progresses, each endpoint displays either [PASSED] or [FAILED], indicating the status of the connection as follows: Message [PASSED] [FAILED] Description Storage Gateway has network connectivity. Storage Gateway does not have network connectivity. Testing your gateway connectivity to the internet API Version 2013-06-30 178 AWS Storage Gateway Volume Gateway User Guide Running storage gateway commands in the local console for an on- premises gateway The VM local console in Storage Gateway helps provide a secure environment for configuring and diagnosing issues with your gateway. Using the local console commands, you can perform maintenance tasks such as saving routing tables, connecting to Support, and so on. To run a configuration or diagnostic command 1. Log in to your gateway's local console: • For more information on logging in to the VMware ESXi local console, see Accessing the Gateway Local Console with VMware ESXi. • For more information on logging in to the Microsoft Hyper-V local console, see Access the Gateway Local Console with Microsoft Hyper-V. • For more information on logging in to the KVM local console, see Accessing the Gateway Local Console with Linux KVM. 2. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select Gateway Console. 3. From the gateway console command prompt, enter h. The console displays the AVAILABLE COMMANDS menu, which lists the available commands: Command Function dig exit h Collect output from dig for DNS troublesh ooting. Return to Configuration menu. Display available command list. ifconfig View or configure network interfaces. Running storage gateway commands in the local console for an on-premises gateway API Version 2013-06-30 179 Note We recommend configuring network or IP settings using the Storage AWS Storage Gateway Command Volume Gateway User Guide Function Gateway console or the dedicated local console menu option. For instructions, see Configuring Your Gateway Network. ip Show / manipulate routing, devices, and tunnels. Note We recommend configuring network or IP settings using the Storage Gateway console
storagegateway-vgw-ug-066
storagegateway-vgw-ug.pdf
66
Command Function dig exit h Collect output from dig for DNS troublesh ooting. Return to Configuration menu. Display available command list. ifconfig View or configure network interfaces. Running storage gateway commands in the local console for an on-premises gateway API Version 2013-06-30 179 Note We recommend configuring network or IP settings using the Storage AWS Storage Gateway Command Volume Gateway User Guide Function Gateway console or the dedicated local console menu option. For instructions, see Configuring Your Gateway Network. ip Show / manipulate routing, devices, and tunnels. Note We recommend configuring network or IP settings using the Storage Gateway console or the dedicated local console menu option. For instructions, see Configuring Your Gateway Network. Administration tool for IPv4 packet filtering and NAT. Test connectivity to a specific TCP port on a network. Collect output from nping for network t roubleshooting. iptables ncport nping open-support-channel Connect to AWS Support. passwd save-iptables Update authentication tokens. Persist IP tables. save-routing-table Save newly added routing table entry. Running storage gateway commands in the local console for an on-premises gateway API Version 2013-06-30 180 AWS Storage Gateway Volume Gateway User Guide Command sslcheck Function Returns output with certificate issuer Note Storage Gateway uses certifica te issuer verification and does not support ssl inspection. If this command returns an issuer other than [email protected], then it is likely that an application performing an ssl inspection. In that case, we recommend bypassing ssl inspection for the Storage Gateway appliance. tcptraceroute Collect traceroute output on TCP traffic to a destination. 4. From the gateway console command prompt, enter the corresponding command for the function you want to use, and follow the instructions. To learn about a command, enter man + command name at the command prompt. Viewing your gateway system resource status When your gateway starts, it checks its virtual CPU cores, root volume size, and RAM. It then determines whether these system resources are sufficient for your gateway to function properly. You can view the results of this check on the gateway's local console. To view the status of a system resource check 1. Log in to your gateway's local console: • For more information on logging in to the VMware ESXi console, see Accessing the Gateway Local Console with VMware ESXi. Viewing your gateway system resource status API Version 2013-06-30 181 AWS Storage Gateway Volume Gateway User Guide • For more information on logging in to the Microsoft Hyper-V local console, see Access the Gateway Local Console with Microsoft Hyper-V. • For more information on logging in to the KVM local console, see Accessing the Gateway Local Console with Linux KVM. 2. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select View System Resource Check. Each resource displays [OK], [WARNING], or [FAIL], indicating the status of the resource as follows: Message [OK] [WARNING] [FAIL] Description The resource has passed the system resource check. The resource doesn't meet the recommended requirements, but your gateway can continue to function. Storage Gateway displays a message that describes the results of the resource check. The resource doesn't meet the minimum requirements. Your gateway might not function properly. Storage Gateway displays a message that describes the results of the resource check. The console also displays the number of errors and warnings next to the resource check menu option. Performing Tasks on the Amazon EC2 Local Console Some Storage Gateway maintenance tasks require that you log in to the gateway local console for a gateway that you have deployed on an Amazon EC2 instance. You can access the gateway local console on your Amazon EC2 instance by using a Secure Shell (SSH) client. The topics in this section describes how to log in to the gateway local console and perform maintenance tasks. Performing Tasks on the EC2 Local Console API Version 2013-06-30 182 AWS Storage Gateway Topics Volume Gateway User Guide • Logging In to Your Amazon EC2 Gateway Local Console - Learn about how you can connect and log in to the gateway local console your Amazon EC2 instance by using a Secure Shell (SSH) client. • Routing your gateway deployed on EC2 through an HTTP proxy - Learn about how you can configure Storage Gateway to route all AWS enpoint traffic through a Socket Secure version 5 (SOCKS5) proxy server to your Amazon EC2 gateway instance. • Testing gateway network connectivity - Learn about how you can use the gateway local console to test network connectivity between your gateway and various network resources. • Viewing your gateway system resource status - Learn about how you can use the gateway local console to check the virtual CPU cores, root volume size, and RAM that are available to your gateway appliance. • Running Storage Gateway commands on the local console - Learn about how you can run
storagegateway-vgw-ug-067
storagegateway-vgw-ug.pdf
67
to route all AWS enpoint traffic through a Socket Secure version 5 (SOCKS5) proxy server to your Amazon EC2 gateway instance. • Testing gateway network connectivity - Learn about how you can use the gateway local console to test network connectivity between your gateway and various network resources. • Viewing your gateway system resource status - Learn about how you can use the gateway local console to check the virtual CPU cores, root volume size, and RAM that are available to your gateway appliance. • Running Storage Gateway commands on the local console - Learn about how you can run local console commands that allow you to perform additional tasks such as saving routing tables, connecting to Support, and more. Logging In to Your Amazon EC2 Gateway Local Console You can connect to your Amazon EC2 instance by using a Secure Shell (SSH) client. For detailed information, see Connect to Your Instance in the Amazon EC2 User Guide. To connect this way, you will need the SSH key pair you specified when you launched the instance. For information about Amazon EC2 key pairs, see Amazon EC2 Key Pairs in the Amazon EC2 User Guide. To log in to the gateway local console 1. Log in to your local console. If you are connecting to your EC2 instance from a Windows computer, log in as admin. 2. After you log in, you see the AWS Storage Gateway - Configuration main menu, from which you can perform various tasks. To Learn About This Task See This Topic Configure a SOCKS proxy for your gateway Routing your gateway deployed on EC2 through an HTTP proxy Logging In to Your EC2 Gateway Local Console API Version 2013-06-30 183 AWS Storage Gateway Volume Gateway User Guide To Learn About This Task See This Topic Test network connectivity Testing gateway network connectivity Run Storage Gateway console commands View a system resource check Running Storage Gateway commands on the local console Viewing your gateway system resource statu s. To shut down the gateway, enter 0. To exit the configuration session, enter X. Routing your gateway deployed on EC2 through an HTTP proxy Storage Gateway supports the configuration of a Socket Secure version 5 (SOCKS5) proxy between your gateway deployed on Amazon EC2 and AWS. If your gateway must use a proxy server to communicate to the internet, then you need to configure the HTTP proxy settings for your gateway. You do this by specifying an IP address and port number for the host running your proxy. After you do so, Storage Gateway routes all AWS endpoint traffic through your proxy server. Communications between the gateway and endpoints is encrypted, even when using the HTTP proxy. To route your gateway internet traffic through a local proxy server 1. Log in to your gateway's local console. For instructions, see Logging In to Your Amazon EC2 Gateway Local Console. 2. 3. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select Configure HTTP Proxy. From the AWS Appliance Activation HTTP Proxy Configuration menu, enter the corresponding numeral for the task you want to perform: • Configure HTTP proxy - You will need to supply a host name and port to complete configuration. Configuring an HTTP proxy API Version 2013-06-30 184 AWS Storage Gateway Volume Gateway User Guide • View current HTTP proxy configuration - If an HTTP proxy is not configured, the message HTTP Proxy not configured is displayed. If an HTTP proxy is configured, the host name and port of the proxy are displayed. • Remove an HTTP proxy configuration - The message HTTP Proxy Configuration Removed is displayed. Testing gateway network connectivity You can use your gateway's local console to test your network connectivity. This test can be useful when you are troubleshooting network issues with your gateway. To test your gateway's connectivity 1. Log in to your gateway's local console. For instructions, see Logging In to Your Amazon EC2 Gateway Local Console. 2. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select Test Network Connectivity. If your gateway has already been activated, the connectivity test begins immediately. For gateways that have not yet been activated, you must specify the endpoint type and AWS Region as described in the following steps. 3. If your gateway is not yet activated, enter the corresponding numeral to select the endpoint type for your gateway. 4. If you selected the public endpoint type, enter the corresponding numeral to select the AWS Region that you want to test. For supported AWS Regions and a list of AWS service endpoints you can use with Storage Gateway, see AWS Storage Gateway endpoints and quotas in the AWS General Reference. As the test progresses, each endpoint displays either [PASSED] or [FAILED], indicating the status of
storagegateway-vgw-ug-068
storagegateway-vgw-ug.pdf
68
must specify the endpoint type and AWS Region as described in the following steps. 3. If your gateway is not yet activated, enter the corresponding numeral to select the endpoint type for your gateway. 4. If you selected the public endpoint type, enter the corresponding numeral to select the AWS Region that you want to test. For supported AWS Regions and a list of AWS service endpoints you can use with Storage Gateway, see AWS Storage Gateway endpoints and quotas in the AWS General Reference. As the test progresses, each endpoint displays either [PASSED] or [FAILED], indicating the status of the connection as follows: Message [PASSED] Description Storage Gateway has network connectivity. Testing gateway network connectivity API Version 2013-06-30 185 AWS Storage Gateway Volume Gateway User Guide Message [FAILED] Description Storage Gateway does not have network connectivity. Viewing your gateway system resource status When your gateway starts, it checks its virtual CPU cores, root volume size, and RAM. It then determines whether these system resources are sufficient for your gateway to function properly. You can view the results of this check on the gateway's local console. To view the status of a system resource check 1. Log in to your gateway's local console. For instructions, see Logging In to Your Amazon EC2 Gateway Local Console. 2. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select View System Resource Check. Each resource displays [OK], [WARNING], or [FAIL], indicating the status of the resource as follows: Message [OK] [WARNING] [FAIL] Description The resource has passed the system resource check. The resource doesn't meet the recommended requirements, but your gateway can continue to function. Storage Gateway displays a message that describes the results of the resource check. The resource doesn't meet the minimum requirements. Your gateway might not function properly. Storage Gateway displays a message that describes the results of the resource check. Viewing your gateway system resource status API Version 2013-06-30 186 AWS Storage Gateway Volume Gateway User Guide The console also displays the number of errors and warnings next to the resource check menu option. Running Storage Gateway commands on the local console The AWS Storage Gateway console helps provide a secure environment for configuring and diagnosing issues with your gateway. Using the console commands, you can perform maintenance tasks such as saving routing tables or connecting to Support. To run a configuration or diagnostic command 1. Log in to your gateway's local console. For instructions, see Logging In to Your Amazon EC2 Gateway Local Console. 2. From the AWS Appliance Activation - Configuration main menu, enter the corresponding numeral to select Gateway Console. 3. From the gateway console command prompt, enter h. The console displays the AVAILABLE COMMANDS menu, which lists the available commands: Command Function dig exit h Collect output from dig for DNS troublesh ooting. Return to Configuration menu. Display available command list. ifconfig View or configure network interfaces. Note We recommend configuring network or IP settings using the Storage Gateway console or the dedicated local console menu option. Running Storage Gateway commands on the local console API Version 2013-06-30 187 AWS Storage Gateway Volume Gateway User Guide Command ip iptables ncport nping Function Show / manipulate routing, devices, and tunnels. Note We recommend configuring network or IP settings using the Storage Gateway console or the dedicated local console menu option. Administration tool for IPv4 packet filtering and NAT. Test connectivity to a specific TCP port on a network. Collect output from nping for network t roubleshooting. open-support-channel Connect to AWS Support. save-iptables Persist IP tables. save-routing-table Save newly added routing table entry. sslcheck tcptraceroute Check SSL validity for network troublesh ooting. Collect traceroute output on TCP traffic to a destination. 4. From the gateway console command prompt, enter the corresponding command for the function you want to use, and follow the instructions. To learn about a command, enter the command name followed by the -h option, for example: sslcheck -h. Running Storage Gateway commands on the local console API Version 2013-06-30 188 AWS Storage Gateway Volume Gateway User Guide Performance and optimization for Volume Gateway This section describes Storage Gateway performance. Topics • Optimizing gateway performance Optimizing gateway performance Recommended Gateway Server Configuration To obtain the best performance out of your gateway, Storage Gateway recommends the following gateway configuration for your gateway's host server: • At least 24 dedicated physical CPU cores • For Volume Gateway, your hardware should dedicate the following amounts of RAM: • At least 16 GiB of reserved RAM for gateways with cache size up to 16 TiB • At least 32 GiB of reserved RAM for gateways with cache size 16 TiB to 32 TiB • At least 48 GiB of reserved RAM for gateways with cache size 32 TiB to 64 TiB • Disk 1,
storagegateway-vgw-ug-069
storagegateway-vgw-ug.pdf
69
Server Configuration To obtain the best performance out of your gateway, Storage Gateway recommends the following gateway configuration for your gateway's host server: • At least 24 dedicated physical CPU cores • For Volume Gateway, your hardware should dedicate the following amounts of RAM: • At least 16 GiB of reserved RAM for gateways with cache size up to 16 TiB • At least 32 GiB of reserved RAM for gateways with cache size 16 TiB to 32 TiB • At least 48 GiB of reserved RAM for gateways with cache size 32 TiB to 64 TiB • Disk 1, to be used as the gateway cache as follows: • SSD using an NVMe controller. • Disk 2, to be used as the gateway upload buffer as follows: • SSD using an NVMe controller. • Disk 3, to be used as the gateway upload buffer as follows: • SSD using an NVMe controller. • Network adapter 1 configured on VM network 1: • Use VM network 1 and add VMXnet3 (10 Gbps) to be used for ingestion. • Network adapter 2 configured on VM network 2: • Use VM network 2 and add a VMXnet3 (10 Gbps) to be used to connect to AWS. Optimizing gateway performance API Version 2013-06-30 189 AWS Storage Gateway Volume Gateway User Guide Add Resources to Your Gateway The following bottlenecks can reduce the performance of your Volume Gateway below the theoretical maximum sustained throughput (your bandwidth to AWS cloud): • CPU core count • Cache/Upload buffer disk throughput • Total RAM amount • Network bandwidth to AWS • Network bandwidth from initiator to gateway This section contains steps you can take in order to optimize the performance of your gateway. This guidance is based on adding resources to your gateway or your application server. You can optimize gateway performance by adding resources to your gateway in one or more of the following ways. Use higher-performance disks Cache and upload buffer disk throughput can limit your gateway's upload and download performance. If your gateway is exhibiting performance significantly below what is expected, consider improving the cache and upload buffer disk throughput by: • Using a striped RAID such as RAID 10 to improve disk throughput, ideally with a hardware RAID controller. Note RAID (redundant array of independent disks) or specifically disk striped RAID configurations like RAID 10, is the process of dividing a body of data into blocks and spreading the data blocks across multiple storage devices. The RAID level you use affects the exact speed and fault tolerance you can achieve. By striping IO workloads out across multiple disks, the overall throughput of the RAID device is much higher than that of any single member disk. • Using directly attached, high performance disks To optimize gateway performance, you can add high-performance disks such as solid-state drives (SSDs) and a NVMe controller. You can also attach virtual disks to your VM directly Add Resources to Your Gateway API Version 2013-06-30 190 AWS Storage Gateway Volume Gateway User Guide from a storage area network (SAN) instead of the Microsoft Hyper-V NTFS. Improved disk performance generally results in better throughput and more input/output operations per second (IOPS). To measure throughput, use the ReadBytes and WriteBytes metrics with the Samples Amazon CloudWatch statistic. For example, the Samples statistic of the ReadBytes metric over a sample period of 5 minutes divided by 300 seconds gives you the IOPS. As a general rule, when you review these metrics for a gateway, look for low throughput and low IOPS trends to indicate disk-related bottlenecks. . Note CloudWatch metrics are not available for all gateways. For information about gateway metrics, see Monitoring Storage Gateway. Add more upload buffer disks To achieve higher write throughput, add at least two upload buffer disks. When data is written to the gateway, it is written and stored locally on the upload buffer disks. Afterwards, the stored local data is asynchronously read from the disks to be processed and uploaded to AWS. Adding more upload buffer disks may reduce the amount of concurrent I/O operations performed to each individual disk. This can result in increased write throughput to the gateway. Back gateway virtual disks with separate physical disks When you provision gateway disks, we strongly recommend that you don't provision local disks for the upload buffer and cache storage that use the same underlying physical storage disk. For example, for VMware ESXi, the underlying physical storage resources are represented as a data store. When you deploy the gateway VM, you choose a data store on which to store the VM files. When you provision a virtual disk (for example, as an upload buffer), you can store the virtual disk in the same data store as the VM or a different data store. If you have more than
storagegateway-vgw-ug-070
storagegateway-vgw-ug.pdf
70
disks When you provision gateway disks, we strongly recommend that you don't provision local disks for the upload buffer and cache storage that use the same underlying physical storage disk. For example, for VMware ESXi, the underlying physical storage resources are represented as a data store. When you deploy the gateway VM, you choose a data store on which to store the VM files. When you provision a virtual disk (for example, as an upload buffer), you can store the virtual disk in the same data store as the VM or a different data store. If you have more than one data store, then we strongly recommend that you choose one data store for each type of local storage you are creating. A data store that is backed by only one underlying physical disk can lead to poor performance. An example is when you use such a disk to back both the cache storage and upload buffer in a gateway setup. Similarly, a data store that is backed by a less high-performing RAID configuration such as RAID 1 or RAID 6 can lead to poor performance. Add Resources to Your Gateway API Version 2013-06-30 191 AWS Storage Gateway Volume Gateway User Guide Add CPU resources to your gateway host The minimum requirement for a gateway host server is four virtual processors. To optimize gateway performance, confirm that each virtual processor that is assigned to the gateway VM is backed by a dedicated CPU core. In addition, confirm that you are not oversubscribing the CPUs of the host server. When you add additional CPUs to your gateway host server, you increase the processing capability of the gateway. Doing this allows your gateway to deal with, in parallel, both storing data from your application to your local storage and uploading this data to Amazon S3. Additional CPUs also help ensure that your gateway gets enough CPU resources when the host is shared with other VMs. Providing enough CPU resources has the general effect of improving throughput. Increase bandwidth between your gateway and AWS cloud Increasing your bandwidth to and from AWS will increase the maximum rate of data ingress to your gateway and egress to AWS cloud. This can improve your gateway performance if network speed is the limiting factor in your gateway configuration, rather than other factors like slow disks or poor gateway-initiator connection bandwidth. Note Your observed gateway performance will likely be lower than your network bandwidth due to other limiting factors listed here, such as cache/upload buffer disk throughput, CPU core count, total RAM amount, or the bandwidth between your initiator and gateway. Furthermore, your gateway's normal operation involves many actions taken to protect your data, which might cause the observed performance to be less than your network bandwidth. Change the volumes configuration For Volume Gateways, if you find that adding more volumes to a gateway reduces the throughput to the gateway, consider adding the volumes to a separate gateway. In particular, if a volume is used for a high-throughput application, consider creating a separate gateway for the high-throughput application. However, as a general rule, you should not use one gateway for all of your high-throughput applications and another gateway for all of your low-throughput applications. To measure your volume throughput, use the ReadBytes and WriteBytes metrics. Add Resources to Your Gateway API Version 2013-06-30 192 AWS Storage Gateway Volume Gateway User Guide For more information about these metrics, see Measuring Performance Between Your Application and Gateway. Optimize iSCSI Settings You can optimize iSCSI settings on your iSCSI initiator to achieve higher I/O performance. We recommend choosing 256 KiB for MaxReceiveDataSegmentLength and FirstBurstLength, and 1 MiB for MaxBurstLength. For more information about configuring iSCSI settings, see Customizing iSCSI Settings. Note These recommended settings can facilitate overall better performance. However, the specific iSCSI settings that are needed to optimize performance vary depending on which backup software you use. For details, see your backup software documentation. Add Resources to Your Application Environment Increase the bandwidth between your application server and your gateway The connection between your iSCSI initiator and gateway can limit your upload and download performance. If your gateway is exhibiting performance significantly worse than expected and you have already improved your CPU core count and disk throughput, consider: • Upgrading your network cables to have higher bandwidth between your initiator and gateway. To optimize gateway performance, ensure that the network bandwidth between your application and the gateway can sustain your application needs. You can use the ReadBytes and WriteBytes metrics of the gateway to measure the total data throughput. For your application, compare the measured throughput with the desired throughput. If the measured throughput is less than the desired throughput, then increasing the bandwidth between your application and gateway can improve performance if the network is the bottleneck. Similarly,
storagegateway-vgw-ug-071
storagegateway-vgw-ug.pdf
71
improved your CPU core count and disk throughput, consider: • Upgrading your network cables to have higher bandwidth between your initiator and gateway. To optimize gateway performance, ensure that the network bandwidth between your application and the gateway can sustain your application needs. You can use the ReadBytes and WriteBytes metrics of the gateway to measure the total data throughput. For your application, compare the measured throughput with the desired throughput. If the measured throughput is less than the desired throughput, then increasing the bandwidth between your application and gateway can improve performance if the network is the bottleneck. Similarly, you can increase the bandwidth between your VM and your local disks, if they're not direct-attached. Optimize iSCSI Settings API Version 2013-06-30 193 AWS Storage Gateway Volume Gateway User Guide Add CPU resources to your application environment If your application can use additional CPU resources, then adding more CPUs can help your application to scale its I/O load. Add Resources to Your Application Environment API Version 2013-06-30 194 AWS Storage Gateway Volume Gateway User Guide Security in AWS Storage Gateway Cloud security at AWS is the highest priority. As an AWS customer, you benefit from a data center and network architecture that is built to meet the requirements of the most security-sensitive organizations. Security is a shared responsibility between AWS and you. The shared responsibility model describes this as security of the cloud and security in the cloud: • Security of the cloud – AWS is responsible for protecting the infrastructure that runs AWS services in the Amazon Web Services Cloud. AWS also provides you with services that you can use securely. Third-party auditors regularly test and verify the effectiveness of our security as part of the AWS Compliance Programs. To learn about the compliance programs that apply to AWS Storage Gateway, see AWS Services in Scope by Compliance Program. • Security in the cloud – Your responsibility is determined by the AWS service that you use. You are also responsible for other factors including the sensitivity of your data, your company’s requirements, and applicable laws and regulations. This documentation helps you understand how to apply the shared responsibility model when using Storage Gateway. The following topics show you how to configure Storage Gateway to meet your security and compliance objectives. You also learn how to use other AWS services that help you to monitor and secure your Storage Gateway resources. Topics • Data protection in AWS Storage Gateway • Identity and Access Management for AWS Storage Gateway • Compliance validation for AWS Storage Gateway • Resilience in AWS Storage Gateway • Infrastructure Security in AWS Storage Gateway • AWS Security Best Practices • Logging and Monitoring in AWS Storage Gateway API Version 2013-06-30 195 AWS Storage Gateway Volume Gateway User Guide Data protection in AWS Storage Gateway The AWS shared responsibility model applies to data protection in AWS Storage Gateway. As described in this model, AWS is responsible for protecting the global infrastructure that runs all of the AWS Cloud. You are responsible for maintaining control over your content that is hosted on this infrastructure. You are also responsible for the security configuration and management tasks for the AWS services that you use. For more information about data privacy, see the Data Privacy FAQ. For information about data protection in Europe, see the AWS Shared Responsibility Model and GDPR blog post on the AWS Security Blog. For data protection purposes, we recommend that you protect AWS account credentials and set up individual users with AWS IAM Identity Center or AWS Identity and Access Management (IAM). That way, each user is given only the permissions necessary to fulfill their job duties. We also recommend that you secure your data in the following ways: • Use multi-factor authentication (MFA) with each account. • Use SSL/TLS to communicate with AWS resources. We require TLS 1.2 and recommend TLS 1.3. • Set up API and user activity logging with AWS CloudTrail. For information about using CloudTrail trails to capture AWS activities, see Working with CloudTrail trails in the AWS CloudTrail User Guide. • Use AWS encryption solutions, along with all default security controls within AWS services. • Use advanced managed security services such as Amazon Macie, which assists in discovering and securing sensitive data that is stored in Amazon S3. • If you require FIPS 140-3 validated cryptographic modules when accessing AWS through a command line interface or an API, use a FIPS endpoint. For more information about the available FIPS endpoints, see Federal Information Processing Standard (FIPS) 140-3. We strongly recommend that you never put confidential or sensitive information, such as your customers' email addresses, into tags or free-form text fields such as a Name field. This includes when you work with Storage Gateway or other AWS services using the console, API,
storagegateway-vgw-ug-072
storagegateway-vgw-ug.pdf
72
as Amazon Macie, which assists in discovering and securing sensitive data that is stored in Amazon S3. • If you require FIPS 140-3 validated cryptographic modules when accessing AWS through a command line interface or an API, use a FIPS endpoint. For more information about the available FIPS endpoints, see Federal Information Processing Standard (FIPS) 140-3. We strongly recommend that you never put confidential or sensitive information, such as your customers' email addresses, into tags or free-form text fields such as a Name field. This includes when you work with Storage Gateway or other AWS services using the console, API, AWS CLI, or AWS SDKs. Any data that you enter into tags or free-form text fields used for names may be used for billing or diagnostic logs. If you provide a URL to an external server, we strongly recommend that you do not include credentials information in the URL to validate your request to that server. Data protection API Version 2013-06-30 196 AWS Storage Gateway Volume Gateway User Guide Data encryption using AWS KMS Storage Gateway uses SSL/TLS (Secure Socket Layers/Transport Layer Security) to encrypt data that is transferred between your gateway appliance and AWS storage. By default, Storage Gateway uses Amazon S3-Managed Encryption Keys (SSE-S3) to server-side encrypt all data it stores in Amazon S3. You have an option to use the Storage Gateway API to configure your gateway to encrypt data stored in the cloud using server-side encryption with AWS Key Management Service (SSE-KMS) keys. Important When you use an AWS KMS key for server-side encryption, you must choose a symmetric key. Storage Gateway does not support asymmetric keys. For more information, see Using symmetric and asymmetric keys in the AWS Key Management Service Developer Guide. Encrypting a file share For a file share, you can configure your gateway to encrypt your objects with AWS KMS–managed keys by using SSE-KMS. For information on using the Storage Gateway API to encrypt data written to a file share, see CreateNFSFileShare in the AWS Storage Gateway API Reference. Encrypting a volume For cached and stored volumes, you can configure your gateway to encrypt volume data stored in the cloud with AWS KMS–managed keys by using the Storage Gateway API. You can specify one of the managed keys as the KMS key. The key that you use to encrypt your volume can't be changed after the volume is created. For information on using the Storage Gateway API to encrypt data written to a cached or stored volume, see CreateCachediSCSIVolume or CreateStorediSCSIVolume in the AWS Storage Gateway API Reference. Encrypting a tape For a virtual tape, you can configure your gateway to encrypt tape data stored in the cloud with AWS KMS–managed keys by using the Storage Gateway API. You can specify one of the managed keys as the KMS key. The key that you use to encrypt your tape data can't be changed after the tape is created. For information on using the Storage Gateway API to encrypt data written to a virtual tape, see CreateTapes in the AWS Storage Gateway API Reference. When using AWS KMS to encrypt your data, keep the following in mind: Data encryption API Version 2013-06-30 197 AWS Storage Gateway Volume Gateway User Guide • Your data is encrypted at rest in the cloud. That is, the data is encrypted in Amazon S3. • IAM users must have the required permissions to call the AWS KMS API operations. For more information, see Using IAM policies with AWS KMS in the AWS Key Management Service Developer Guide. • If you delete or deactivate your AWS AWS KMS key or revoke the grant token, you can't access the data on the volume or tape. For more information, see Deleting KMS keys in the AWS Key Management Service Developer Guide. • If you create a snapshot from a volume that is KMS-encrypted, the snapshot is encrypted. The snapshot inherits the volume's KMS key. • If you create a new volume from a snapshot that is KMS-encrypted, the volume is encrypted. You can specify a different KMS key for the new volume. Note Storage Gateway doesn't support creating an unencrypted volume from a recovery point of a KMS-encrypted volume or a KMS-encrypted snapshot. For more information about AWS KMS, see What is AWS Key Management Service? Configuring CHAP authentication for your volumes In Storage Gateway, your iSCSI initiators connect to your volumes as iSCSI targets. Storage Gateway uses Challenge-Handshake Authentication Protocol (CHAP) to authenticate iSCSI and initiator connections. CHAP provides protection against playback attacks by requiring authentication to access storage volume targets. For each volume target, you can define one or more CHAP credentials. You can view and edit these credentials for the different initiators in the Configure CHAP credentials dialog box. To configure CHAP credentials 1. 2. 3. In the
storagegateway-vgw-ug-073
storagegateway-vgw-ug.pdf
73
KMS-encrypted snapshot. For more information about AWS KMS, see What is AWS Key Management Service? Configuring CHAP authentication for your volumes In Storage Gateway, your iSCSI initiators connect to your volumes as iSCSI targets. Storage Gateway uses Challenge-Handshake Authentication Protocol (CHAP) to authenticate iSCSI and initiator connections. CHAP provides protection against playback attacks by requiring authentication to access storage volume targets. For each volume target, you can define one or more CHAP credentials. You can view and edit these credentials for the different initiators in the Configure CHAP credentials dialog box. To configure CHAP credentials 1. 2. 3. In the Storage Gateway Console, choose Volumes and select the volume for which you want to configure CHAP credentials. For Actions, choose Configure CHAP authentication. For Initiator name, type the name of your initiator. The name must be at least 1 character and at most 255 characters long. Configuring CHAP authentication API Version 2013-06-30 198 AWS Storage Gateway Volume Gateway User Guide 4. 5. For Initiator secret, provide the secret phrase you want to use to authenticate your iSCSI initiator. The initiator secret phrase must be at least 12 characters and at most 16 characters long. For Target secret, provide the secret phrase you want used to authenticate your target for mutual CHAP. The target secret phrase must be at least 12 characters and at most 16 characters long. 6. Choose Save to save your entries. To view or update CHAP credentials, you must have the necessary IAM role permissions that allow you to perform that operation. Viewing and editing CHAP credentials You can add, remove or update CHAP credentials for each user. You must have the necessary IAM role permissions to view or edit CHAP credentials, and initiator target must be attached to a functioning gateway. To add CHAP credentials 1. 2. 3. In the Storage Gateway Console, choose Volumes and select the volume for which you want to add CHAP credentials. For Actions, choose Configure CHAP authentication. In the Configure CHAPS page, provide the Initiator name, Initiator secret, and Target secret in the respective boxes and choose Save. To remove CHAP credentials 1. In the Storage Gateway Console, choose Volumes and select the volume for which you want to remove CHAP credentials. 2. For Actions, choose Configure CHAP authentication. 3. Click the X next to the credentials you want to remove and choose Save. To update CHAP credentials 1. In the Storage Gateway Console, choose Volumes and select the volume for which you want to update CHAP. Configuring CHAP authentication API Version 2013-06-30 199 AWS Storage Gateway Volume Gateway User Guide 2. 3. For Actions, choose Configure CHAP authentication. In Configure CHAP credentials page, change the entries for the credentials you to update. 4. Choose Save. Identity and Access Management for AWS Storage Gateway AWS Identity and Access Management (IAM) is an AWS service that helps an administrator securely control access to AWS resources. IAM administrators control who can be authenticated (signed in) and authorized (have permissions) to use AWS SGW resources. IAM is an AWS service that you can use with no additional charge. Topics • Audience • Authenticating with identities • Managing access using policies • How AWS Storage Gateway works with IAM • Identity-based policy examples for Storage Gateway • Troubleshooting AWS Storage Gateway identity and access Audience How you use AWS Identity and Access Management (IAM) differs, depending on the work that you do in AWS SGW. Service user – If you use the AWS SGW service to do your job, then your administrator provides you with the credentials and permissions that you need. As you use more AWS SGW features to do your work, you might need additional permissions. Understanding how access is managed can help you request the right permissions from your administrator. If you cannot access a feature in AWS SGW, see Troubleshooting AWS Storage Gateway identity and access. Service administrator – If you're in charge of AWS SGW resources at your company, you probably have full access to AWS SGW. It's your job to determine which AWS SGW features and resources your service users should access. You must then submit requests to your IAM administrator to change the permissions of your service users. Review the information on this page to understand Identity and Access Management API Version 2013-06-30 200 AWS Storage Gateway Volume Gateway User Guide the basic concepts of IAM. To learn more about how your company can use IAM with AWS SGW, see How AWS Storage Gateway works with IAM. IAM administrator – If you're an IAM administrator, you might want to learn details about how you can write policies to manage access to AWS SGW. To view example AWS SGW identity-based policies that you can use in IAM, see Identity-based policy examples for Storage Gateway. Authenticating with identities Authentication
storagegateway-vgw-ug-074
storagegateway-vgw-ug.pdf
74
users. Review the information on this page to understand Identity and Access Management API Version 2013-06-30 200 AWS Storage Gateway Volume Gateway User Guide the basic concepts of IAM. To learn more about how your company can use IAM with AWS SGW, see How AWS Storage Gateway works with IAM. IAM administrator – If you're an IAM administrator, you might want to learn details about how you can write policies to manage access to AWS SGW. To view example AWS SGW identity-based policies that you can use in IAM, see Identity-based policy examples for Storage Gateway. Authenticating with identities Authentication is how you sign in to AWS using your identity credentials. You must be authenticated (signed in to AWS) as the AWS account root user, as an IAM user, or by assuming an IAM role. You can sign in to AWS as a federated identity by using credentials provided through an identity source. AWS IAM Identity Center (IAM Identity Center) users, your company's single sign-on authentication, and your Google or Facebook credentials are examples of federated identities. When you sign in as a federated identity, your administrator previously set up identity federation using IAM roles. When you access AWS by using federation, you are indirectly assuming a role. Depending on the type of user you are, you can sign in to the AWS Management Console or the AWS access portal. For more information about signing in to AWS, see How to sign in to your AWS account in the AWS Sign-In User Guide. If you access AWS programmatically, AWS provides a software development kit (SDK) and a command line interface (CLI) to cryptographically sign your requests by using your credentials. If you don't use AWS tools, you must sign requests yourself. For more information about using the recommended method to sign requests yourself, see AWS Signature Version 4 for API requests in the IAM User Guide. Regardless of the authentication method that you use, you might be required to provide additional security information. For example, AWS recommends that you use multi-factor authentication (MFA) to increase the security of your account. To learn more, see Multi-factor authentication in the AWS IAM Identity Center User Guide and AWS Multi-factor authentication in IAM in the IAM User Guide. AWS account root user When you create an AWS account, you begin with one sign-in identity that has complete access to all AWS services and resources in the account. This identity is called the AWS account root user and is accessed by signing in with the email address and password that you used to create the account. Authenticating with identities API Version 2013-06-30 201 AWS Storage Gateway Volume Gateway User Guide We strongly recommend that you don't use the root user for your everyday tasks. Safeguard your root user credentials and use them to perform the tasks that only the root user can perform. For the complete list of tasks that require you to sign in as the root user, see Tasks that require root user credentials in the IAM User Guide. Federated identity As a best practice, require human users, including users that require administrator access, to use federation with an identity provider to access AWS services by using temporary credentials. A federated identity is a user from your enterprise user directory, a web identity provider, the AWS Directory Service, the Identity Center directory, or any user that accesses AWS services by using credentials provided through an identity source. When federated identities access AWS accounts, they assume roles, and the roles provide temporary credentials. For centralized access management, we recommend that you use AWS IAM Identity Center. You can create users and groups in IAM Identity Center, or you can connect and synchronize to a set of users and groups in your own identity source for use across all your AWS accounts and applications. For information about IAM Identity Center, see What is IAM Identity Center? in the AWS IAM Identity Center User Guide. IAM users and groups An IAM user is an identity within your AWS account that has specific permissions for a single person or application. Where possible, we recommend relying on temporary credentials instead of creating IAM users who have long-term credentials such as passwords and access keys. However, if you have specific use cases that require long-term credentials with IAM users, we recommend that you rotate access keys. For more information, see Rotate access keys regularly for use cases that require long- term credentials in the IAM User Guide. An IAM group is an identity that specifies a collection of IAM users. You can't sign in as a group. You can use groups to specify permissions for multiple users at a time. Groups make permissions easier to manage for large sets of users. For example, you could have a group
storagegateway-vgw-ug-075
storagegateway-vgw-ug.pdf
75
credentials such as passwords and access keys. However, if you have specific use cases that require long-term credentials with IAM users, we recommend that you rotate access keys. For more information, see Rotate access keys regularly for use cases that require long- term credentials in the IAM User Guide. An IAM group is an identity that specifies a collection of IAM users. You can't sign in as a group. You can use groups to specify permissions for multiple users at a time. Groups make permissions easier to manage for large sets of users. For example, you could have a group named IAMAdmins and give that group permissions to administer IAM resources. Users are different from roles. A user is uniquely associated with one person or application, but a role is intended to be assumable by anyone who needs it. Users have permanent long-term credentials, but roles provide temporary credentials. To learn more, see Use cases for IAM users in the IAM User Guide. Authenticating with identities API Version 2013-06-30 202 AWS Storage Gateway IAM roles Volume Gateway User Guide An IAM role is an identity within your AWS account that has specific permissions. It is similar to an IAM user, but is not associated with a specific person. To temporarily assume an IAM role in the AWS Management Console, you can switch from a user to an IAM role (console). You can assume a role by calling an AWS CLI or AWS API operation or by using a custom URL. For more information about methods for using roles, see Methods to assume a role in the IAM User Guide. IAM roles with temporary credentials are useful in the following situations: • Federated user access – To assign permissions to a federated identity, you create a role and define permissions for the role. When a federated identity authenticates, the identity is associated with the role and is granted the permissions that are defined by the role. For information about roles for federation, see Create a role for a third-party identity provider (federation) in the IAM User Guide. If you use IAM Identity Center, you configure a permission set. To control what your identities can access after they authenticate, IAM Identity Center correlates the permission set to a role in IAM. For information about permissions sets, see Permission sets in the AWS IAM Identity Center User Guide. • Temporary IAM user permissions – An IAM user or role can assume an IAM role to temporarily take on different permissions for a specific task. • Cross-account access – You can use an IAM role to allow someone (a trusted principal) in a different account to access resources in your account. Roles are the primary way to grant cross- account access. However, with some AWS services, you can attach a policy directly to a resource (instead of using a role as a proxy). To learn the difference between roles and resource-based policies for cross-account access, see Cross account resource access in IAM in the IAM User Guide. • Cross-service access – Some AWS services use features in other AWS services. For example, when you make a call in a service, it's common for that service to run applications in Amazon EC2 or store objects in Amazon S3. A service might do this using the calling principal's permissions, using a service role, or using a service-linked role. • Forward access sessions (FAS) – When you use an IAM user or role to perform actions in AWS, you are considered a principal. When you use some services, you might perform an action that then initiates another action in a different service. FAS uses the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. FAS requests are only made when a service receives a request that requires interactions with other AWS services or resources to complete. In this case, you must have permissions to perform both actions. For policy details when making FAS requests, see Forward access sessions. Authenticating with identities API Version 2013-06-30 203 AWS Storage Gateway Volume Gateway User Guide • Service role – A service role is an IAM role that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see Create a role to delegate permissions to an AWS service in the IAM User Guide. • Service-linked role – A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. •
storagegateway-vgw-ug-076
storagegateway-vgw-ug.pdf
76
assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see Create a role to delegate permissions to an AWS service in the IAM User Guide. • Service-linked role – A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. • Applications running on Amazon EC2 – You can use an IAM role to manage temporary credentials for applications that are running on an EC2 instance and making AWS CLI or AWS API requests. This is preferable to storing access keys within the EC2 instance. To assign an AWS role to an EC2 instance and make it available to all of its applications, you create an instance profile that is attached to the instance. An instance profile contains the role and enables programs that are running on the EC2 instance to get temporary credentials. For more information, see Use an IAM role to grant permissions to applications running on Amazon EC2 instances in the IAM User Guide. Managing access using policies You control access in AWS by creating policies and attaching them to AWS identities or resources. A policy is an object in AWS that, when associated with an identity or resource, defines their permissions. AWS evaluates these policies when a principal (user, root user, or role session) makes a request. Permissions in the policies determine whether the request is allowed or denied. Most policies are stored in AWS as JSON documents. For more information about the structure and contents of JSON policy documents, see Overview of JSON policies in the IAM User Guide. Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. By default, users and roles have no permissions. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies. The administrator can then add the IAM policies to roles, and users can assume the roles. IAM policies define permissions for an action regardless of the method that you use to perform the operation. For example, suppose that you have a policy that allows the iam:GetRole action. A user with that policy can get role information from the AWS Management Console, the AWS CLI, or the AWS API. Managing access using policies API Version 2013-06-30 204 AWS Storage Gateway Identity-based policies Volume Gateway User Guide Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see Define custom IAM permissions with customer managed policies in the IAM User Guide. Identity-based policies can be further categorized as inline policies or managed policies. Inline policies are embedded directly into a single user, group, or role. Managed policies are standalone policies that you can attach to multiple users, groups, and roles in your AWS account. Managed policies include AWS managed policies and customer managed policies. To learn how to choose between a managed policy or an inline policy, see Choose between managed policies and inline policies in the IAM User Guide. Resource-based policies Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-based policies are IAM role trust policies and Amazon S3 bucket policies. In services that support resource-based policies, service administrators can use them to control access to a specific resource. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that resource and under what conditions. You must specify a principal in a resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services. Resource-based policies are inline policies that are located in that service. You can't use AWS managed policies from IAM in a resource-based policy. Access control lists (ACLs) Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format. Amazon S3, AWS WAF, and Amazon VPC are examples of services that support ACLs. To learn more about ACLs, see Access control list (ACL) overview in the Amazon Simple Storage Service Developer Guide. Managing access using policies API Version 2013-06-30 205 AWS Storage Gateway Other policy types Volume Gateway User Guide AWS supports
storagegateway-vgw-ug-077
storagegateway-vgw-ug.pdf
77
AWS managed policies from IAM in a resource-based policy. Access control lists (ACLs) Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format. Amazon S3, AWS WAF, and Amazon VPC are examples of services that support ACLs. To learn more about ACLs, see Access control list (ACL) overview in the Amazon Simple Storage Service Developer Guide. Managing access using policies API Version 2013-06-30 205 AWS Storage Gateway Other policy types Volume Gateway User Guide AWS supports additional, less-common policy types. These policy types can set the maximum permissions granted to you by the more common policy types. • Permissions boundaries – A permissions boundary is an advanced feature in which you set the maximum permissions that an identity-based policy can grant to an IAM entity (IAM user or role). You can set a permissions boundary for an entity. The resulting permissions are the intersection of an entity's identity-based policies and its permissions boundaries. Resource-based policies that specify the user or role in the Principal field are not limited by the permissions boundary. An explicit deny in any of these policies overrides the allow. For more information about permissions boundaries, see Permissions boundaries for IAM entities in the IAM User Guide. • Service control policies (SCPs) – SCPs are JSON policies that specify the maximum permissions for an organization or organizational unit (OU) in AWS Organizations. AWS Organizations is a service for grouping and centrally managing multiple AWS accounts that your business owns. If you enable all features in an organization, then you can apply service control policies (SCPs) to any or all of your accounts. The SCP limits permissions for entities in member accounts, including each AWS account root user. For more information about Organizations and SCPs, see Service control policies in the AWS Organizations User Guide. • Resource control policies (RCPs) – RCPs are JSON policies that you can use to set the maximum available permissions for resources in your accounts without updating the IAM policies attached to each resource that you own. The RCP limits permissions for resources in member accounts and can impact the effective permissions for identities, including the AWS account root user, regardless of whether they belong to your organization. For more information about Organizations and RCPs, including a list of AWS services that support RCPs, see Resource control policies (RCPs) in the AWS Organizations User Guide. • Session policies – Session policies are advanced policies that you pass as a parameter when you programmatically create a temporary session for a role or federated user. The resulting session's permissions are the intersection of the user or role's identity-based policies and the session policies. Permissions can also come from a resource-based policy. An explicit deny in any of these policies overrides the allow. For more information, see Session policies in the IAM User Guide. Managing access using policies API Version 2013-06-30 206 AWS Storage Gateway Multiple policy types Volume Gateway User Guide When multiple types of policies apply to a request, the resulting permissions are more complicated to understand. To learn how AWS determines whether to allow a request when multiple policy types are involved, see Policy evaluation logic in the IAM User Guide. How AWS Storage Gateway works with IAM Before you use IAM to manage access to AWS SGW, learn what IAM features are available to use with AWS SGW. IAM features you can use with AWS Storage Gateway IAM feature AWS SGW support Identity-based policies Resource-based policies Policy actions Policy resources Policy condition keys (service-specific) ACLs Yes No Yes Yes Yes No ABAC (tags in policies) Partial Temporary credentials Forward access sessions (FAS) Service roles Service-linked roles Yes Yes Yes Yes To get a high-level view of how AWS SGW and other AWS services work with most IAM features, see AWS services that work with IAM in the IAM User Guide. How AWS Storage Gateway works with IAM API Version 2013-06-30 207 AWS Storage Gateway Volume Gateway User Guide Identity-based policies for AWS SGW Supports identity-based policies: Yes Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see Define custom IAM permissions with customer managed policies in the IAM User Guide. With IAM identity-based policies, you can specify allowed or denied actions and resources as well as the conditions under which actions are allowed or denied. You can't specify the principal in an identity-based policy because it applies to the user or role to which it is attached. To
storagegateway-vgw-ug-078
storagegateway-vgw-ug.pdf
78
to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see Define custom IAM permissions with customer managed policies in the IAM User Guide. With IAM identity-based policies, you can specify allowed or denied actions and resources as well as the conditions under which actions are allowed or denied. You can't specify the principal in an identity-based policy because it applies to the user or role to which it is attached. To learn about all of the elements that you can use in a JSON policy, see IAM JSON policy elements reference in the IAM User Guide. Identity-based policy examples for AWS SGW To view examples of AWS SGW identity-based policies, see Identity-based policy examples for Storage Gateway. Resource-based policies within AWS SGW Supports resource-based policies: No Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-based policies are IAM role trust policies and Amazon S3 bucket policies. In services that support resource-based policies, service administrators can use them to control access to a specific resource. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that resource and under what conditions. You must specify a principal in a resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services. To enable cross-account access, you can specify an entire account or IAM entities in another account as the principal in a resource-based policy. Adding a cross-account principal to a resource- based policy is only half of establishing the trust relationship. When the principal and the resource are in different AWS accounts, an IAM administrator in the trusted account must also grant the principal entity (user or role) permission to access the resource. They grant permission by attaching an identity-based policy to the entity. However, if a resource-based policy grants access to a principal in the same account, no additional identity-based policy is required. For more information, see Cross account resource access in IAM in the IAM User Guide. How AWS Storage Gateway works with IAM API Version 2013-06-30 208 AWS Storage Gateway Volume Gateway User Guide Policy actions for AWS SGW Supports policy actions: Yes Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Action element of a JSON policy describes the actions that you can use to allow or deny access in a policy. Policy actions usually have the same name as the associated AWS API operation. There are some exceptions, such as permission-only actions that don't have a matching API operation. There are also some operations that require multiple actions in a policy. These additional actions are called dependent actions. Include actions in a policy to grant permissions to perform the associated operation. To see a list of AWS SGW actions, see Actions Defined by AWS Storage Gateway in the Service Authorization Reference. Policy actions in AWS SGW use the following prefix before the action: sgw To specify multiple actions in a single statement, separate them with commas. "Action": [ "sgw:action1", "sgw:action2" ] To view examples of AWS SGW identity-based policies, see Identity-based policy examples for Storage Gateway. Policy resources for AWS SGW Supports policy resources: Yes Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. How AWS Storage Gateway works with IAM API Version 2013-06-30 209 AWS Storage Gateway Volume Gateway User Guide The Resource JSON policy element specifies the object or objects to which the action applies. Statements must include either a Resource or a NotResource element. As a best practice, specify a resource using its Amazon Resource Name (ARN). You can do this for actions that support a specific resource type, known as resource-level permissions. For actions that don't support resource-level permissions, such as listing operations, use a wildcard (*) to indicate that the statement applies to all resources. "Resource": "*" To see a list of AWS SGW resource types and their ARNs, see Resources Defined by AWS Storage Gateway in the Service Authorization Reference. To learn with which actions you can specify the ARN of each resource, see Actions Defined by AWS Storage Gateway . To view examples of AWS SGW identity-based policies, see Identity-based policy examples for Storage Gateway. Policy condition keys for AWS SGW Supports service-specific policy condition keys: Yes Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Condition element (or
storagegateway-vgw-ug-079
storagegateway-vgw-ug.pdf
79
list of AWS SGW resource types and their ARNs, see Resources Defined by AWS Storage Gateway in the Service Authorization Reference. To learn with which actions you can specify the ARN of each resource, see Actions Defined by AWS Storage Gateway . To view examples of AWS SGW identity-based policies, see Identity-based policy examples for Storage Gateway. Policy condition keys for AWS SGW Supports service-specific policy condition keys: Yes Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Condition element (or Condition block) lets you specify conditions in which a statement is in effect. The Condition element is optional. You can create conditional expressions that use condition operators, such as equals or less than, to match the condition in the policy with values in the request. If you specify multiple Condition elements in a statement, or multiple keys in a single Condition element, AWS evaluates them using a logical AND operation. If you specify multiple values for a single condition key, AWS evaluates the condition using a logical OR operation. All of the conditions must be met before the statement's permissions are granted. You can also use placeholder variables when you specify conditions. For example, you can grant an IAM user permission to access a resource only if it is tagged with their IAM user name. For more information, see IAM policy elements: variables and tags in the IAM User Guide. How AWS Storage Gateway works with IAM API Version 2013-06-30 210 AWS Storage Gateway Volume Gateway User Guide AWS supports global condition keys and service-specific condition keys. To see all AWS global condition keys, see AWS global condition context keys in the IAM User Guide. To see a list of AWS SGW condition keys, see Condition Keys for AWS Storage Gateway in the Service Authorization Reference. To learn with which actions and resources you can use a condition key, see Actions Defined by AWS Storage Gateway . To view examples of AWS SGW identity-based policies, see Identity-based policy examples for Storage Gateway. ACLs in AWS SGW Supports ACLs: No Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format. ABAC with AWS SGW Supports ABAC (tags in policies): Partial Attribute-based access control (ABAC) is an authorization strategy that defines permissions based on attributes. In AWS, these attributes are called tags. You can attach tags to IAM entities (users or roles) and to many AWS resources. Tagging entities and resources is the first step of ABAC. Then you design ABAC policies to allow operations when the principal's tag matches the tag on the resource that they are trying to access. ABAC is helpful in environments that are growing rapidly and helps with situations where policy management becomes cumbersome. To control access based on tags, you provide tag information in the condition element of a policy using the aws:ResourceTag/key-name, aws:RequestTag/key-name, or aws:TagKeys condition keys. If a service supports all three condition keys for every resource type, then the value is Yes for the service. If a service supports all three condition keys for only some resource types, then the value is Partial. For more information about ABAC, see Define permissions with ABAC authorization in the IAM User Guide. To view a tutorial with steps for setting up ABAC, see Use attribute-based access control (ABAC) in the IAM User Guide. How AWS Storage Gateway works with IAM API Version 2013-06-30 211 AWS Storage Gateway Volume Gateway User Guide Using temporary credentials with AWS SGW Supports temporary credentials: Yes Some AWS services don't work when you sign in using temporary credentials. For additional information, including which AWS services work with temporary credentials, see AWS services that work with IAM in the IAM User Guide. You are using temporary credentials if you sign in to the AWS Management Console using any method except a user name and password. For example, when you access AWS using your company's single sign-on (SSO) link, that process automatically creates temporary credentials. You also automatically create temporary credentials when you sign in to the console as a user and then switch roles. For more information about switching roles, see Switch from a user to an IAM role (console) in the IAM User Guide. You can manually create temporary credentials using the AWS CLI or AWS API. You can then use those temporary credentials to access AWS. AWS recommends that you dynamically generate temporary credentials instead of using long-term access keys. For more information, see Temporary security credentials in IAM. Forward access sessions for AWS SGW Supports forward access sessions (FAS): Yes When you use an IAM
storagegateway-vgw-ug-080
storagegateway-vgw-ug.pdf
80
temporary credentials when you sign in to the console as a user and then switch roles. For more information about switching roles, see Switch from a user to an IAM role (console) in the IAM User Guide. You can manually create temporary credentials using the AWS CLI or AWS API. You can then use those temporary credentials to access AWS. AWS recommends that you dynamically generate temporary credentials instead of using long-term access keys. For more information, see Temporary security credentials in IAM. Forward access sessions for AWS SGW Supports forward access sessions (FAS): Yes When you use an IAM user or role to perform actions in AWS, you are considered a principal. When you use some services, you might perform an action that then initiates another action in a different service. FAS uses the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. FAS requests are only made when a service receives a request that requires interactions with other AWS services or resources to complete. In this case, you must have permissions to perform both actions. For policy details when making FAS requests, see Forward access sessions. Service roles for AWS SGW Supports service roles: Yes A service role is an IAM role that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see Create a role to delegate permissions to an AWS service in the IAM User Guide. How AWS Storage Gateway works with IAM API Version 2013-06-30 212 AWS Storage Gateway Warning Volume Gateway User Guide Changing the permissions for a service role might break AWS SGW functionality. Edit service roles only when AWS SGW provides guidance to do so. Service-linked roles for AWS SGW Supports service-linked roles: Yes A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. For details about creating or managing service-linked roles, see AWS services that work with IAM. Find a service in the table that includes a Yes in the Service-linked role column. Choose the Yes link to view the service-linked role documentation for that service. Identity-based policy examples for Storage Gateway By default, users and roles don't have permission to create or modify AWS SGW resources. They also can't perform tasks by using the AWS Management Console, AWS Command Line Interface (AWS CLI), or AWS API. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies. The administrator can then add the IAM policies to roles, and users can assume the roles. To learn how to create an IAM identity-based policy by using these example JSON policy documents, see Create IAM policies (console) in the IAM User Guide. For details about actions and resource types defined by AWS SGW, including the format of the ARNs for each of the resource types, see Actions, Resources, and Condition Keys for AWS Storage Gateway in the Service Authorization Reference. Topics • Policy best practices • Using the AWS SGW console • Allow users to view their own permissions Identity-based policy examples API Version 2013-06-30 213 AWS Storage Gateway Policy best practices Volume Gateway User Guide Identity-based policies determine whether someone can create, access, or delete AWS SGW resources in your account. These actions can incur costs for your AWS account. When you create or edit identity-based policies, follow these guidelines and recommendations: • Get started with AWS managed policies and move toward least-privilege permissions – To get started granting permissions to your users and workloads, use the AWS managed policies that grant permissions for many common use cases. They are available in your AWS account. We recommend that you reduce permissions further by defining AWS customer managed policies that are specific to your use cases. For more information, see AWS managed policies or AWS managed policies for job functions in the IAM User Guide. • Apply least-privilege permissions – When you set permissions with IAM policies, grant only the permissions required to perform a task. You do this by defining the actions that can be taken on specific resources under specific conditions, also known as least-privilege permissions. For more information about using IAM to apply permissions, see Policies and permissions in IAM in the IAM User Guide. • Use conditions in IAM policies to further restrict access – You can add a condition to your policies to limit access to actions and resources. For example, you can write a policy
storagegateway-vgw-ug-081
storagegateway-vgw-ug.pdf
81
the IAM User Guide. • Apply least-privilege permissions – When you set permissions with IAM policies, grant only the permissions required to perform a task. You do this by defining the actions that can be taken on specific resources under specific conditions, also known as least-privilege permissions. For more information about using IAM to apply permissions, see Policies and permissions in IAM in the IAM User Guide. • Use conditions in IAM policies to further restrict access – You can add a condition to your policies to limit access to actions and resources. For example, you can write a policy condition to specify that all requests must be sent using SSL. You can also use conditions to grant access to service actions if they are used through a specific AWS service, such as AWS CloudFormation. For more information, see IAM JSON policy elements: Condition in the IAM User Guide. • Use IAM Access Analyzer to validate your IAM policies to ensure secure and functional permissions – IAM Access Analyzer validates new and existing policies so that the policies adhere to the IAM policy language (JSON) and IAM best practices. IAM Access Analyzer provides more than 100 policy checks and actionable recommendations to help you author secure and functional policies. For more information, see Validate policies with IAM Access Analyzer in the IAM User Guide. • Require multi-factor authentication (MFA) – If you have a scenario that requires IAM users or a root user in your AWS account, turn on MFA for additional security. To require MFA when API operations are called, add MFA conditions to your policies. For more information, see Secure API access with MFA in the IAM User Guide. For more information about best practices in IAM, see Security best practices in IAM in the IAM User Guide. Identity-based policy examples API Version 2013-06-30 214 AWS Storage Gateway Volume Gateway User Guide Using the AWS SGW console To access the AWS Storage Gateway console, you must have a minimum set of permissions. These permissions must allow you to list and view details about the AWS SGW resources in your AWS account. If you create an identity-based policy that is more restrictive than the minimum required permissions, the console won't function as intended for entities (users or roles) with that policy. You don't need to allow minimum console permissions for users that are making calls only to the AWS CLI or the AWS API. Instead, allow access to only the actions that match the API operation that they're trying to perform. To ensure that users and roles can still use the AWS SGW console, also attach the AWS SGW ConsoleAccess or ReadOnly AWS managed policy to the entities. For more information, see Adding permissions to a user in the IAM User Guide. Allow users to view their own permissions This example shows how you might create a policy that allows IAM users to view the inline and managed policies that are attached to their user identity. This policy includes permissions to complete this action on the console or programmatically using the AWS CLI or AWS API. { "Version": "2012-10-17", "Statement": [ { "Sid": "ViewOwnUserInfo", "Effect": "Allow", "Action": [ "iam:GetUserPolicy", "iam:ListGroupsForUser", "iam:ListAttachedUserPolicies", "iam:ListUserPolicies", "iam:GetUser" ], "Resource": ["arn:aws:iam::*:user/${aws:username}"] }, { "Sid": "NavigateInConsole", "Effect": "Allow", "Action": [ "iam:GetGroupPolicy", "iam:GetPolicyVersion", Identity-based policy examples API Version 2013-06-30 215 AWS Storage Gateway Volume Gateway User Guide "iam:GetPolicy", "iam:ListAttachedGroupPolicies", "iam:ListGroupPolicies", "iam:ListPolicyVersions", "iam:ListPolicies", "iam:ListUsers" ], "Resource": "*" } ] } Troubleshooting AWS Storage Gateway identity and access Use the following information to help you diagnose and fix common issues that you might encounter when working with AWS SGW and IAM. Topics • I am not authorized to perform an action in AWS SGW • I am not authorized to perform iam:PassRole • I want to allow people outside of my AWS account to access my AWS SGW resources I am not authorized to perform an action in AWS SGW If you receive an error that you're not authorized to perform an action, your policies must be updated to allow you to perform the action. The following example error occurs when the mateojackson IAM user tries to use the console to view details about a fictional my-example-widget resource but doesn't have the fictional sgw:GetWidget permissions. User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: sgw:GetWidget on resource: my-example-widget In this case, the policy for the mateojackson user must be updated to allow access to the my- example-widget resource by using the sgw:GetWidget action. Troubleshooting API Version 2013-06-30 216 AWS Storage Gateway Volume Gateway User Guide If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials. I am not authorized to perform iam:PassRole If you receive an error that you're not authorized to perform the iam:PassRole action, your policies must be
storagegateway-vgw-ug-082
storagegateway-vgw-ug.pdf
82
but doesn't have the fictional sgw:GetWidget permissions. User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: sgw:GetWidget on resource: my-example-widget In this case, the policy for the mateojackson user must be updated to allow access to the my- example-widget resource by using the sgw:GetWidget action. Troubleshooting API Version 2013-06-30 216 AWS Storage Gateway Volume Gateway User Guide If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials. I am not authorized to perform iam:PassRole If you receive an error that you're not authorized to perform the iam:PassRole action, your policies must be updated to allow you to pass a role to AWS SGW. Some AWS services allow you to pass an existing role to that service instead of creating a new service role or service-linked role. To do this, you must have permissions to pass the role to the service. The following example error occurs when an IAM user named marymajor tries to use the console to perform an action in AWS SGW. However, the action requires the service to have permissions that are granted by a service role. Mary does not have permissions to pass the role to the service. User: arn:aws:iam::123456789012:user/marymajor is not authorized to perform: iam:PassRole In this case, Mary's policies must be updated to allow her to perform the iam:PassRole action. If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials. I want to allow people outside of my AWS account to access my AWS SGW resources You can create a role that users in other accounts or people outside of your organization can use to access your resources. You can specify who is trusted to assume the role. For services that support resource-based policies or access control lists (ACLs), you can use those policies to grant people access to your resources. To learn more, consult the following: • To learn whether AWS SGW supports these features, see How AWS Storage Gateway works with IAM. • To learn how to provide access to your resources across AWS accounts that you own, see Providing access to an IAM user in another AWS account that you own in the IAM User Guide. Troubleshooting API Version 2013-06-30 217 AWS Storage Gateway Volume Gateway User Guide • To learn how to provide access to your resources to third-party AWS accounts, see Providing access to AWS accounts owned by third parties in the IAM User Guide. • To learn how to provide access through identity federation, see Providing access to externally authenticated users (identity federation) in the IAM User Guide. • To learn the difference between using roles and resource-based policies for cross-account access, see Cross account resource access in IAM in the IAM User Guide. Compliance validation for AWS Storage Gateway Third-party auditors assess the security and compliance of AWS Storage Gateway as part of multiple AWS compliance programs. These include SOC, PCI, ISO, FedRAMP, HIPAA, MTSC, C5, K- ISMS, ENS High, OSPAR, and HITRUST CSF. For a list of AWS services in scope of specific compliance programs, see AWS Services in Scope by Compliance Program. For general information, see AWS Compliance Programs. You can download third-party audit reports using AWS Artifact. For more information, see Downloading Reports in AWS Artifact. Your compliance responsibility when using Storage Gateway is determined by the sensitivity of your data, your company's compliance objectives, and applicable laws and regulations. AWS provides the following resources to help with compliance: • Security and Compliance Quick Start Guides – These deployment guides discuss architectural considerations and provide steps for deploying security- and compliance-focused baseline environments on AWS. • Architecting for HIPAA Security and Compliance Whitepaper – This whitepaper describes how companies can use AWS to create HIPAA-compliant applications. • AWS Compliance Resources – This collection of workbooks and guides might apply to your industry and location. • Evaluating resources with rules in the AWS Config Developer Guide – The AWS Config service assesses how well your resource configurations comply with internal practices, industry guidelines, and regulations. • AWS Security Hub – This AWS service provides a comprehensive view of your security state within AWS that helps you check your compliance with security industry standards and best practices. Compliance validation API Version 2013-06-30 218 AWS Storage Gateway Volume Gateway User Guide Resilience in AWS Storage Gateway The AWS global infrastructure is built around AWS Regions and Availability Zones. An AWS Region is a physical location around the world where data centers are clustered. Each group of logical data centers is called an Availability Zone (AZ). Each AWS Region consists of a minimum of three isolated and physically separate AZs within a geographic area. Unlike other cloud providers, who often define a region as a single data center, the multiple AZ
storagegateway-vgw-ug-083
storagegateway-vgw-ug.pdf
83
compliance with security industry standards and best practices. Compliance validation API Version 2013-06-30 218 AWS Storage Gateway Volume Gateway User Guide Resilience in AWS Storage Gateway The AWS global infrastructure is built around AWS Regions and Availability Zones. An AWS Region is a physical location around the world where data centers are clustered. Each group of logical data centers is called an Availability Zone (AZ). Each AWS Region consists of a minimum of three isolated and physically separate AZs within a geographic area. Unlike other cloud providers, who often define a region as a single data center, the multiple AZ design of every AWS Region offers distinct advantages. Each AZ has independent power, cooling, and physical security and is connected via redundant, ultra-low-latency networks. If your deployment requires a focus on high availability, you can configure services and resources to in multiple AZs to achieve greater fault-tolerance. AWS Regions meet the highest levels of infrastructure security, compliance, and data protection. All traffic between AZs is encrypted. The network performance is sufficient to accomplish synchronous replication between AZs. AZs make partitioning services and resources for high availability easy. If your deployment is partitioned across AZs, your resources are better isolated and protected from issues such as power outages, lightning strikes, tornadoes, earthquakes, and more. AZs are physically separated by a meaningful distance from any other AZ, although all are within 100 km (60 miles) of each other. For more information about AWS Regions and Availability Zones, see AWS Global Infrastructure. In addition to the AWS global infrastructure, Storage Gateway offers several features to help support your data resiliency and backup needs: • Use VMware vSphere High Availability (VMware HA) to help protect storage workloads against hardware, hypervisor, or network failures. For more information, see Using VMware vSphere High Availability with Storage Gateway. • Use AWS Backup to back up your volumes. For more information, see Backing up your volumes. • Clone your volume from a recovery point. For more information, see Cloning a cached volume from a recovery point. Infrastructure Security in AWS Storage Gateway As a managed service, AWS Storage Gateway is protected by the AWS global network security procedures that are described in the Amazon Web Services: Overview of Security Processes whitepaper. Resilience API Version 2013-06-30 219 AWS Storage Gateway Volume Gateway User Guide You use AWS published API calls to access Storage Gateway through the network. Clients must support Transport Layer Security (TLS) 1.2. Clients must also support cipher suites with perfect forward secrecy (PFS) such as Ephemeral Diffie-Hellman (DHE) or Elliptic Curve Ephemeral Diffie- Hellman (ECDHE). Most modern systems such as Java 7 and later support these modes. Additionally, requests must be signed by using an access key ID and a secret access key that is associated with an IAM principal. Or you can use the AWS Security Token Service (AWS STS) to generate temporary security credentials to sign requests. Note You should treat the AWS Storage Gateway appliance as a managed virtual machine, and should not attempt to access or modify its installation in any way. Attempting to install scanning software or update any software packages using methods other than the normal gateway update mechanism, may cause the gateway to malfunction and could impact our ability to support or fix the gateway. AWS reviews, analyzes, and remediates CVEs on a regular basis. We incorporate fixes for these issues into Storage Gateway as part of our normal software release cycle. These fixes are typically applied as part of the normal gateway update process during scheduled maintenance windows. For more information about gateway updates, see . AWS Security Best Practices AWS provides a number of security features to consider as you develop and implement your own security policies. These best practices are general guidelines and don’t represent a complete security solution. Because these practices might not be appropriate or sufficient for your environment, treat them as helpful considerations rather than prescriptions. For more information, see AWS Security Best Practices. Logging and Monitoring in AWS Storage Gateway Storage Gateway is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in Storage Gateway. CloudTrail captures all API calls for Storage Gateway as events. The calls captured include calls from the Storage Gateway console and code calls to the Storage Gateway API operations. If you create a trail, you can activate continuous delivery of CloudTrail events to an Amazon S3 bucket, including events for Storage Gateway. If AWS Security Best Practices API Version 2013-06-30 220 AWS Storage Gateway Volume Gateway User Guide you don't configure a trail, you can still view the most recent events in the CloudTrail console in Event history. Using the information collected by CloudTrail, you can determine the request that was made to Storage Gateway,
storagegateway-vgw-ug-084
storagegateway-vgw-ug.pdf
84
for Storage Gateway as events. The calls captured include calls from the Storage Gateway console and code calls to the Storage Gateway API operations. If you create a trail, you can activate continuous delivery of CloudTrail events to an Amazon S3 bucket, including events for Storage Gateway. If AWS Security Best Practices API Version 2013-06-30 220 AWS Storage Gateway Volume Gateway User Guide you don't configure a trail, you can still view the most recent events in the CloudTrail console in Event history. Using the information collected by CloudTrail, you can determine the request that was made to Storage Gateway, the IP address from which the request was made, who made the request, when it was made, and additional details. To learn more about CloudTrail, see the AWS CloudTrail User Guide. Storage Gateway Information in CloudTrail CloudTrail is activated on your Amazon Web Services account when you create the account. When activity occurs in Storage Gateway, that activity is recorded in a CloudTrail event along with other AWS service events in Event history. You can view, search, and download recent events in your Amazon Web Services account. For more information, see Viewing Events with CloudTrail Event History. For an ongoing record of events in your Amazon Web Services account, including events for Storage Gateway, create a trail. A trail allows CloudTrail to deliver log files to an Amazon S3 bucket. By default, when you create a trail in the console, the trail applies to all AWS Regions. The trail logs events from all Regions in the AWS partition and delivers the log files to the Amazon S3 bucket that you specify. Additionally, you can configure other AWS services to further analyze and act upon the event data collected in CloudTrail logs. For more information, see the following: • Overview for Creating a Trail • CloudTrail Supported Services and Integrations • Configuring Amazon SNS Notifications for CloudTrail • Receiving CloudTrail Log Files from Multiple Regions and Receiving CloudTrail Log Files from Multiple Accounts All of the Storage Gateway actions are logged and are documented in the Actions topic. For example, calls to the ActivateGateway, ListGateways, and ShutdownGateway actions generate entries in the CloudTrail log files. Every event or log entry contains information about who generated the request. The identity information helps you determine the following: • Whether the request was made with root or AWS Identity and Access Management (IAM) user credentials. • Whether the request was made with temporary security credentials for a role or federated user. Storage Gateway Information in CloudTrail API Version 2013-06-30 221 AWS Storage Gateway Volume Gateway User Guide • Whether the request was made by another AWS service. For more information, see the CloudTrail userIdentity Element. Understanding Storage Gateway Log File Entries A trail is a configuration that allows delivery of events as log files to an Amazon S3 bucket that you specify. CloudTrail log files contain one or more log entries. An event represents a single request from any source and includes information about the requested action, the date and time of the action, request parameters, and so on. CloudTrail log files aren't an ordered stack trace of the public API calls, so they don't appear in any specific order. The following example shows a CloudTrail log entry that demonstrates the action. { "Records": [{ "eventVersion": "1.02", "userIdentity": { "type": "IAMUser", "principalId": "AIDAII5AUEPBH2M7JTNVC", "arn": "arn:aws:iam::111122223333:user/StorageGateway-team/JohnDoe", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "userName": "JohnDoe" }, "eventTime": "2014-12-04T16:19:00Z", "eventSource": "storagegateway.amazonaws.com", "eventName": "ActivateGateway", "awsRegion": "us-east-2", "sourceIPAddress": "192.0.2.0", "userAgent": "aws-cli/1.6.2 Python/2.7.6 Linux/2.6.18-164.el5", "requestParameters": { "gatewayTimezone": "GMT-5:00", "gatewayName": "cloudtrailgatewayvtl", "gatewayRegion": "us-east-2", "activationKey": "EHFBX-1NDD0-P0IVU-PI259- DHK88", "gatewayType": "VTL" }, "responseElements": { "gatewayARN": "arn:aws:storagegateway:us-east-2:111122223333:gateway/cloudtrailgatewayvtl" }, Understanding Storage Gateway Log File Entries API Version 2013-06-30 222 AWS Storage Gateway Volume Gateway User Guide "requestID": "54BTFGNQI71987UJD2IHTCT8NF1Q8GLLE1QEU3KPGG6F0KSTAUU0", "eventID": "635f2ea2-7e42-45f0- bed1-8b17d7b74265", "eventType": "AwsApiCall", "apiVersion": "20130630", "recipientAccountId": "444455556666" }] } The following example shows a CloudTrail log entry that demonstrates the ListGateways action. { "Records": [{ "eventVersion": "1.02", "userIdentity": { "type": "IAMUser", "principalId": "AIDAII5AUEPBH2M7JTNVC", "arn": "arn:aws:iam::111122223333:user/StorageGateway- team/JohnDoe", "accountId:" 111122223333", " accessKeyId ":" AKIAIOSFODNN7EXAMPLE", " userName ":" JohnDoe " }, " eventTime ":" 2014 - 12 - 03T19: 41: 53Z ", " eventSource ":" storagegateway.amazonaws.com ", " eventName ":" ListGateways ", " awsRegion ":" us-east-2 ", " sourceIPAddress ":" 192.0.2.0 ", " userAgent ":" aws - cli / 1.6.2 Python / 2.7.6 Linux / 2.6.18 - 164.el5 ", " requestParameters ":null, " responseElements ":null, "requestID ":" 6U2N42CU37KAO8BG6V1I23FRSJ1Q8GLLE1QEU3KPGG6F0KSTAUU0 ", " eventID ":" f76e5919 - 9362 - 48ff - a7c4 - d203a189ec8d ", " eventType ":" AwsApiCall ", " apiVersion ":" 20130630 ", " recipientAccountId ":" 444455556666" }] } Understanding Storage Gateway Log File Entries API Version 2013-06-30 223 AWS Storage Gateway Volume Gateway User Guide Troubleshooting your gateway Following, you can find information about best practices and troubleshooting issues related to gateways, host platforms, volumes, high availability, data recovery, and snapshots.
storagegateway-vgw-ug-085
storagegateway-vgw-ug.pdf
85
", " userAgent ":" aws - cli / 1.6.2 Python / 2.7.6 Linux / 2.6.18 - 164.el5 ", " requestParameters ":null, " responseElements ":null, "requestID ":" 6U2N42CU37KAO8BG6V1I23FRSJ1Q8GLLE1QEU3KPGG6F0KSTAUU0 ", " eventID ":" f76e5919 - 9362 - 48ff - a7c4 - d203a189ec8d ", " eventType ":" AwsApiCall ", " apiVersion ":" 20130630 ", " recipientAccountId ":" 444455556666" }] } Understanding Storage Gateway Log File Entries API Version 2013-06-30 223 AWS Storage Gateway Volume Gateway User Guide Troubleshooting your gateway Following, you can find information about best practices and troubleshooting issues related to gateways, host platforms, volumes, high availability, data recovery, and snapshots. The on-premises gateway troubleshooting information covers gateways deployed on supported virtualization platforms. The troubleshooting information for high availability issues covers gateways running on VMware vSphere High Availability (HA) platform. Topics • Troubleshooting: gateway offline issues - Learn how to diagnose problems that can cause your gateway to appear offline in the Storage Gateway console. • Troubleshooting: internal error during gateway activation - Learn what to do if you receive an internal error message when attempting to activate your Storage Gateway. • Troubleshooting on-premises gateway issues - Learn about typical issues that you might encounter working with your on-premises gateways, and how to allow Support to connect to your gateway to assist with troubleshooting. • Troubleshooting Microsoft Hyper-V setup - Learn about typical issues that you might encounter when deploying Storage Gateway on the Microsoft Hyper-V platform. • Troubleshooting Amazon EC2 gateway issues - Find information about typical issues that you might encounter when working with gateways deployed on Amazon EC2. • Troubleshooting hardware appliance issues - Learn how to resolve issues that you might encounter with the Storage Gateway Hardware Appliance. • Troubleshooting volume issues - Find information about most typical issues you might encounter when working with volumes, and the actions we suggest that you take to fix them. • Troubleshooting high availability issues - Learn what to do if you experience issues with gateways that are deployed in a VMware HA environment. Troubleshooting: gateway offline issues Use the following troubleshooting information to determine what to do if the AWS Storage Gateway console shows that your gateway is offline. Your gateway might be showing as offline for one or more of the following reasons: Troubleshooting: gateway offline issues API Version 2013-06-30 224 AWS Storage Gateway Volume Gateway User Guide • The gateway can't reach the Storage Gateway service endpoints. • The gateway shut down unexpectedly. • A cache disk associated with the gateway has been disconnected or modified, or has failed. To bring your gateway back online, identify and resolve the issue that caused your gateway to go offline. Check the associated firewall or proxy If you configured your gateway to use a proxy, or you placed your gateway behind a firewall, then review the access rules of the proxy or firewall. The proxy or firewall must allow traffic to and from the network ports and service endpoints required by Storage Gateway. For more information, see Network and firewall requirements. Check for an ongoing SSL or deep-packet inspection of your gateway's traffic If an SSL or deep-packet inspection is currently being performed on the network traffic between your gateway and AWS, then your gateway might not be able to communicate with the required service endpoints. To bring your gateway back online, you must disable the inspection. Check for a power outage or hardware failure on the hypervisor host A power outage or hardware failure on the hypervisor host of your gateway can cause your gateway to shut down unexpectedly and become unreachable. After you restore the power and network connectivity, your gateway will become reachable again. After your gateway is back online, be sure to take steps to recover your data. For more information, see Best practices for recovering your data. Check for issues with an associated cache disk Your gateway can go offline if at least one of the cache disks associated with your gateway was removed, changed, or resized, or if it is corrupted. If a working cache disk was removed from the hypervisor host: 1. Shut down the gateway. Check the associated firewall or proxy API Version 2013-06-30 225 Volume Gateway User Guide AWS Storage Gateway 2. Re-add the disk. Note Make sure you add the disk to the same disk node. 3. Restart the gateway. If a cache disk is corrupted, was replaced, or was resized: 1. Shut down the gateway. 2. Reset the cache disk. 3. Reconfigure the disk for cache storage. 4. Restart the gateway. Troubleshooting: internal error during gateway activation Storage Gateway activation requests traverse two network paths. Incoming activation requests sent by a client connect to the gateway's virtual machine (VM) or Amazon Elastic Compute Cloud (Amazon EC2) instance over port 80. If the gateway successfully receives the activation request, then
storagegateway-vgw-ug-086
storagegateway-vgw-ug.pdf
86
2. Re-add the disk. Note Make sure you add the disk to the same disk node. 3. Restart the gateway. If a cache disk is corrupted, was replaced, or was resized: 1. Shut down the gateway. 2. Reset the cache disk. 3. Reconfigure the disk for cache storage. 4. Restart the gateway. Troubleshooting: internal error during gateway activation Storage Gateway activation requests traverse two network paths. Incoming activation requests sent by a client connect to the gateway's virtual machine (VM) or Amazon Elastic Compute Cloud (Amazon EC2) instance over port 80. If the gateway successfully receives the activation request, then the gateway communicates with the Storage Gateway endpoints to receive an activation key. If the gateway can't reach the Storage Gateway endpoints, then the gateway responds to the client with an internal error message. Use the following troubleshooting information to determine what to do if you receive an internal error message when attempting to activate your AWS Storage Gateway. Note • Make sure you deploy new gateways using the latest virtual machine image file or Amazon Machine Image (AMI) version. You will receive an internal error if you attempt to activate a gateway that uses an outdated AMI. • Make sure that you select the correct gateway type that you intend to deploy before you download the AMI. The .ova files and AMIs for each gateway type are different, and they are not interchangeable. Troubleshooting: gateway activation issues API Version 2013-06-30 226 AWS Storage Gateway Volume Gateway User Guide Resolve errors when activating your gateway using a public endpoint To resolve activation errors when activating your gateway using a public endpoint, perform the following checks and configurations. Check the required ports For gateways deployed on-premises, check that the ports are open on your local firewall. For gateways deployed on an Amazon EC2 instance, check that the ports are open on the instance's security group. To confirm that the ports are open, run a telnet command on the public endpoint from a server. This server must be in the same subnet as the gateway. For example, the following telnet commands test the connection to port 443: telnet d4kdq0yaxexbo.cloudfront.net 443 telnet storagegateway.region.amazonaws.com 443 telnet dp-1.storagegateway.region.amazonaws.com 443 telnet proxy-app.storagegateway.region.amazonaws.com 443 telnet client-cp.storagegateway.region.amazonaws.com 443 telnet anon-cp.storagegateway.region.amazonaws.com 443 To confirm that the gateway itself can reach the endpoint, access the gateway's local VM console (for gateways deployed on-premises). Or, you can SSH to the gateway's instance (for gateways deployed on Amazon EC2). Then, run a network connectivity test. Confirm that the test returns [PASSED]. For more information, see Testing Your Gateway Connection to the Internet. Note The default login user name for the gateway console is admin, and the default password is password. Make sure firewall security does not modify packets sent from the gateway to the public endpoints SSL inspections, deep packet inspections, or other forms of firewall security can interfere with packets sent from the gateway. The SSL handshake fails if the SSL certificate is modified from what the activation endpoint expects. To confirm that there's no SSL inspection in progress, run an OpenSSL command on the main activation endpoint ( anon- Resolve errors when activating your gateway using a public endpoint API Version 2013-06-30 227 AWS Storage Gateway Volume Gateway User Guide cp.storagegateway.region.amazonaws.com) on port 443. You must run this command from a machine that's in the same subnet as the gateway: $ openssl s_client -connect anon-cp.storagegateway.region.amazonaws.com:443 - servername anon-cp.storagegateway.region.amazonaws.com Note Replace region with your AWS Region. If there's no SSL inspection in progress, then the command returns a response similar to the following: $ openssl s_client -connect anon-cp.storagegateway.us-east-2.amazonaws.com:443 - servername anon-cp.storagegateway.us-east-2.amazonaws.com CONNECTED(00000003) depth=2 C = US, O = Amazon, CN = Amazon Root CA 1 verify return:1 depth=1 C = US, O = Amazon, OU = Server CA 1B, CN = Amazon verify return:1 depth=0 CN = anon-cp.storagegateway.us-east-2.amazonaws.com verify return:1 --- Certificate chain 0 s:/CN=anon-cp.storagegateway.us-east-2.amazonaws.com i:/C=US/O=Amazon/OU=Server CA 1B/CN=Amazon 1 s:/C=US/O=Amazon/OU=Server CA 1B/CN=Amazon i:/C=US/O=Amazon/CN=Amazon Root CA 1 2 s:/C=US/O=Amazon/CN=Amazon Root CA 1 i:/C=US/ST=Arizona/L=Scottsdale/O=Starfield Technologies, Inc./CN=Starfield Services Root Certificate Authority - G2 3 s:/C=US/ST=Arizona/L=Scottsdale/O=Starfield Technologies, Inc./CN=Starfield Services Root Certificate Authority - G2 i:/C=US/O=Starfield Technologies, Inc./OU=Starfield Class 2 Certification Authority --- If there is an ongoing SSL inspection, then the response shows an altered certificate chain, similar to the following: Resolve errors when activating your gateway using a public endpoint API Version 2013-06-30 228 AWS Storage Gateway Volume Gateway User Guide $ openssl s_client -connect anon-cp.storagegateway.ap-southeast-1.amazonaws.com:443 - servername anon-cp.storagegateway.ap-southeast-1.amazonaws.com CONNECTED(00000003) depth=0 DC = com, DC = amazonaws, OU = AWS, CN = anon-cp.storagegateway.ap- southeast-1.amazonaws.com verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 DC = com, DC = amazonaws, OU = AWS, CN = anon-cp.storagegateway.ap- southeast-1.amazonaws.com verify error:num=21:unable to verify the first certificate verify return:1 --- Certificate chain 0 s:/DC=com/DC=amazonaws/OU=AWS/CN=anon-cp.storagegateway.ap-southeast-1.amazonaws.com i:/C=IN/O=Company/CN=Admin/ST=KA/L=New town/OU=SGW/[email protected] --- The activation endpoint accepts SSL handshakes only if it recognizes
storagegateway-vgw-ug-087
storagegateway-vgw-ug.pdf
87
certificate chain, similar to the following: Resolve errors when activating your gateway using a public endpoint API Version 2013-06-30 228 AWS Storage Gateway Volume Gateway User Guide $ openssl s_client -connect anon-cp.storagegateway.ap-southeast-1.amazonaws.com:443 - servername anon-cp.storagegateway.ap-southeast-1.amazonaws.com CONNECTED(00000003) depth=0 DC = com, DC = amazonaws, OU = AWS, CN = anon-cp.storagegateway.ap- southeast-1.amazonaws.com verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 DC = com, DC = amazonaws, OU = AWS, CN = anon-cp.storagegateway.ap- southeast-1.amazonaws.com verify error:num=21:unable to verify the first certificate verify return:1 --- Certificate chain 0 s:/DC=com/DC=amazonaws/OU=AWS/CN=anon-cp.storagegateway.ap-southeast-1.amazonaws.com i:/C=IN/O=Company/CN=Admin/ST=KA/L=New town/OU=SGW/[email protected] --- The activation endpoint accepts SSL handshakes only if it recognizes the SSL certificate. This means that the gateway's outbound traffic to the endpoints must be exempt from inspections performed by firewalls in your network. These inspections might be an SSL inspection or a deep packet inspection. Check gateway time synchronization Excessive time skews can cause SSL handshake errors. For on-premises gateways, you can use the gateway's local VM console to check your gateway's time synchronization. The time skew should be no larger than 60 seconds. For more information, see Synchronizing Your Gateway VM Time. The System Time Management option isn't available on gateways that are hosted on Amazon EC2 instances. To make sure Amazon EC2 gateways can properly synchronize time, confirm that the Amazon EC2 instance can connect to the following NTP server pool list over ports UDP and TCP 123: • 0.amazon.pool.ntp.org • 1.amazon.pool.ntp.org • 2.amazon.pool.ntp.org • 3.amazon.pool.ntp.org Resolve errors when activating your gateway using a public endpoint API Version 2013-06-30 229 AWS Storage Gateway Volume Gateway User Guide Resolve errors when activating your gateway using an Amazon VPC endpoint To resolve activation errors when activating your gateway using an Amazon Virtual Private Cloud (Amazon VPC) endpoint, perform the following checks and configurations. Check the required ports Make sure the required ports within your local firewall (for gateways deployed on-premises) or security group (for gateways deployed in Amazon EC2) are open. The ports required for connecting a gateway to a Storage Gateway VPC endpoint differ from those required when connecting a gateway to public endpoints. The following ports are required for connecting to a Storage Gateway VPC endpoint: • TCP 443 • TCP 1026 • TCP 1027 • TCP 1028 • TCP 1031 • TCP 2222 For more information, see Creating a VPC endpoint for Storage Gateway. Additionally, check the security group that's attached to your Storage Gateway VPC endpoint. The default security group attached to the endpoint might not allow the required ports. Create a new security group that allows traffic from your gateway's IP address range over the required ports. Then, attach that security group to the VPC endpoint. Note Use the Amazon VPC console to verify the security group that's attached to the VPC endpoint. View your Storage Gateway VPC endpoint from the console, and then choose the Security Groups tab. To confirm that the required ports are open, you can run telnet commands on the Storage Gateway VPC Endpoint. You must run these commands from a server that's in the same subnet as the Resolve errors when activating your gateway using an Amazon VPC endpoint API Version 2013-06-30 230 AWS Storage Gateway Volume Gateway User Guide gateway. You can run the tests on the first DNS name that doesn't specify an Availability Zone. For example, the following telnet commands test the required port connections using the DNS name vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com: telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 443 telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 1026 telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 1027 telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 1028 telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 1031 telnet vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com 2222 Make sure firewall security does not modify packets sent from the gateway to your Storage Gateway Amazon VPC endpoint SSL inspections, deep packet inspections, or other forms of firewall security can interfere with packets sent from the gateway. The SSL handshake fails if the SSL certificate is modified from what the activation endpoint expects. To confirm that there's no SSL inspection in progress, run an OpenSSL command on your Storage Gateway VPC endpoint. You must run this command from a machine that's in the same subnet as the gateway. Run the command for each required port: $ openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:443 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com $ openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:1026 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com $ openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:1027 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com $ openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:1028 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com $ openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:1031 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com Resolve errors when activating your gateway using an Amazon VPC endpoint API Version 2013-06-30 231 AWS Storage Gateway Volume Gateway User Guide $ openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:2222 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com If there's no SSL inspection in progress, then the command returns a response similar to the following: openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:1027 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com CONNECTED(00000005) depth=2 C = US, O = Amazon, CN = Amazon Root CA 1 verify return:1 depth=1 C = US, O = Amazon, OU = Server CA 1B,
storagegateway-vgw-ug-088
storagegateway-vgw-ug.pdf
88
-servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com $ openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:1028 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com $ openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:1031 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com Resolve errors when activating your gateway using an Amazon VPC endpoint API Version 2013-06-30 231 AWS Storage Gateway Volume Gateway User Guide $ openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:2222 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com If there's no SSL inspection in progress, then the command returns a response similar to the following: openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:1027 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com CONNECTED(00000005) depth=2 C = US, O = Amazon, CN = Amazon Root CA 1 verify return:1 depth=1 C = US, O = Amazon, OU = Server CA 1B, CN = Amazon verify return:1 depth=0 CN = anon-cp.storagegateway.us-east-1.amazonaws.com verify return:1 --- Certificate chain 0 s:CN = anon-cp.storagegateway.us-east-1.amazonaws.com i:C = US, O = Amazon, OU = Server CA 1B, CN = Amazon 1 s:C = US, O = Amazon, OU = Server CA 1B, CN = Amazon i:C = US, O = Amazon, CN = Amazon Root CA 1 2 s:C = US, O = Amazon, CN = Amazon Root CA 1 i:C = US, ST = Arizona, L = Scottsdale, O = "Starfield Technologies, Inc.", CN = Starfield Services Root Certificate Authority - G2 3 s:C = US, ST = Arizona, L = Scottsdale, O = "Starfield Technologies, Inc.", CN = Starfield Services Root Certificate Authority - G2 i:C = US, O = "Starfield Technologies, Inc.", OU = Starfield Class 2 Certification Authority --- If there is an ongoing SSL inspection, then the response shows an altered certificate chain, similar to the following: openssl s_client -connect vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us- east-1.vpce.amazonaws.com:1027 -servername vpce-1234567e1c24a1fe9-62qntt8k.storagegateway.us-east-1.vpce.amazonaws.com CONNECTED(00000005) depth=2 C = US, O = Amazon, CN = Amazon Root CA 1 verify return:1 depth=1 C = US, O = Amazon, OU = Server CA 1B, CN = Amazon Resolve errors when activating your gateway using an Amazon VPC endpoint API Version 2013-06-30 232 AWS Storage Gateway verify return:1 Volume Gateway User Guide depth=0 DC = com, DC = amazonaws, OU = AWS, CN = anon-cp.storagegateway.us- east-1.amazonaws.com verify error:num=21:unable to verify the first certificate verify return:1 --- Certificate chain 0 s:/DC=com/DC=amazonaws/OU=AWS/CN=anon-cp.storagegateway.us-east-1.amazonaws.com i:/C=IN/O=Company/CN=Admin/ST=KA/L=New town/OU=SGW/[email protected] --- The activation endpoint accepts SSL handshakes only if it recognizes the SSL certificate. This means that the gateway's outbound traffic to your VPC endpoint over required ports is exempt from inspections performed by your network firewalls. These inspections might be SSL inspections or deep packet inspections. Check gateway time synchronization Excessive time skews can cause SSL handshake errors. For on-premises gateways, you can use the gateway's local VM console to check your gateway's time synchronization. The time skew should be no larger than 60 seconds. For more information, see Synchronizing Your Gateway VM Time. The System Time Management option isn't available on gateways that are hosted on Amazon EC2 instances. To make sure Amazon EC2 gateways can properly synchronize time, confirm that the Amazon EC2 instance can connect to the following NTP server pool list over ports UDP and TCP 123: • 0.amazon.pool.ntp.org • 1.amazon.pool.ntp.org • 2.amazon.pool.ntp.org • 3.amazon.pool.ntp.org Check for an HTTP proxy and confirm associated security group settings Before activation, check if you have an HTTP proxy on Amazon EC2 configured on the on-premises gateway VM as a Squid proxy on port 3128. In this case, confirm the following: • The security group attached to the HTTP proxy on Amazon EC2 must have an inbound rule. This inbound rule must allow Squid proxy traffic on port 3128 from the gateway VM's IP address. Resolve errors when activating your gateway using an Amazon VPC endpoint API Version 2013-06-30 233 AWS Storage Gateway Volume Gateway User Guide • The security group attached to the Amazon EC2 VPC endpoint must have inbound rules. These inbound rules must allow traffic on ports 1026-1028, 1031, 2222, and 443 from the IP address of the HTTP proxy on Amazon EC2. Resolve errors when activating your gateway using a public endpoint and there is a Storage Gateway VPC endpoint in the same VPC To resolve errors when activating your gateway using a public endpoint when there is a Amazon Virtual Private Cloud (Amazon VPC) enpoint in the same VPC, perform the following checks and configurations. Confirm that the Enable Private DNS Name setting isn't enabled on your Storage Gateway VPC endpoint If Enable Private DNS Name is enabled, you can't activate any gateways from that VPC to the public endpoint. To disable the private DNS name option: 1. Open the Amazon VPC console. 2. In the navigation pane, choose Endpoints. 3. Choose your Storage Gateway VPC endpoint. 4. Choose Actions. 5. Choose Manage Private DNS Names. 6. For Enable Private DNS Name, clear Enable for this Endpoint. 7. Choose Modify Private DNS Names to save the setting. Troubleshooting on-premises gateway issues You can find information following about typical issues that you might encounter working with your on-premises gateways,
storagegateway-vgw-ug-089
storagegateway-vgw-ug.pdf
89
Gateway VPC endpoint If Enable Private DNS Name is enabled, you can't activate any gateways from that VPC to the public endpoint. To disable the private DNS name option: 1. Open the Amazon VPC console. 2. In the navigation pane, choose Endpoints. 3. Choose your Storage Gateway VPC endpoint. 4. Choose Actions. 5. Choose Manage Private DNS Names. 6. For Enable Private DNS Name, clear Enable for this Endpoint. 7. Choose Modify Private DNS Names to save the setting. Troubleshooting on-premises gateway issues You can find information following about typical issues that you might encounter working with your on-premises gateways, and how to activate Support to help troubleshoot your gateway. The following table lists typical issues that you might encounter working with your on-premises gateways. Resolve errors when activating your gateway using a public endpoint and there is a Storage Gateway VPC endpoint in the same VPC API Version 2013-06-30 234 AWS Storage Gateway Volume Gateway User Guide Issue Action to Take You cannot find the IP address of your gateway. Use the hypervisor client to connect to your host to find the gateway IP address. • For VMware ESXi, the VM's IP address can be found in the vSphere client on the Summary tab. • For Microsoft Hyper-V, the VM's IP address can be found by logging into the local console. If you are still having trouble finding the gateway IP address: • Check that the VM is turned on. Only when the VM is turned on does an IP address get assigned to your gateway. • Wait for the VM to finish startup. If you just turned on your VM, then it might take several minutes for the gateway to finish its boot sequence. • Allow the appropriate ports for your gateway. • SSL cert validation/inspection should not be activated. Storage Gateway utilizes mutual TLS authentication which would fail if any 3rd party application tries to intercept/sign either certifica te. • If you use a firewall or router to filter or limit network traffic, you must configure your firewall and router to allow these service endpoints for outbound communication to AWS. For more information about network and firewall requirements, see Network and firewall requirements. You're having network or firewall problems. Your gateway's activatio n fails when you click the Proceed to Activation button in the Storage Gateway Management Console. • Check that the gateway VM can be accessed by pinging the VM from your client. • Check that your VM has network connectivity to the internet. Otherwise, you'll need to configure a SOCKS proxy. For more information on doing so, see Configuring a SOCKS5 proxy for your on-premises gateway. Troubleshooting on-premises gateway issues API Version 2013-06-30 235 AWS Storage Gateway Volume Gateway User Guide Issue Action to Take • Check that the host has the correct time, that the host is configured to synchronize its time automatically to a Network Time Protocol (NTP) server, and that the gateway VM has the correct time. For information about synchronizing the time of hypervisor hosts and VMs, see Synchronize VM time with Hyper- V or Linux KVM host time. • After performing these steps, you can retry the gateway deployment using the Storage Gateway console and the Setup and Activate Gateway wizard. • SSL cert validation/inspection should not be activated. Storage Gateway utilizes mutual TLS authentication which would fail if any 3rd party application tries to intercept/sign either certifica te. • Check that your VM has at least 7.5 GB of RAM. Gateway allocation fails if there is less than 7.5 GB of RAM. For more information, see Requirements for setting up Volume Gateway. You need to remove a disk allocated as upload buffer For instructions about removing a disk allocated as upload buffer space, see Removing Disks from Your Gateway. space. For example, you might want to reduce the amount of upload buffer space for a gateway, or you might need to replace a disk used as an upload buffer that has failed. Troubleshooting on-premises gateway issues API Version 2013-06-30 236 AWS Storage Gateway Volume Gateway User Guide Issue Action to Take You need to improve bandwidth between your You can improve the bandwidth from your gateway to AWS by setting up your internet connection to AWS on a network adapter gateway and AWS. (NIC) separate from that connecting your applications and the gateway VM. Taking this approach is useful if you have a high- bandwidth connection to AWS and you want to avoid bandwidth contention, especially during a snapshot restore. For high-thro ughput workload needs, you can use AWS Direct Connect to establish a dedicated network connection between your on-premis es gateway and AWS. To measure the bandwidth of the connectio n from your gateway to AWS, use the CloudBytesDownload metrics of the gateway. For ed and CloudBytesUploaded more
storagegateway-vgw-ug-090
storagegateway-vgw-ug.pdf
90
setting up your internet connection to AWS on a network adapter gateway and AWS. (NIC) separate from that connecting your applications and the gateway VM. Taking this approach is useful if you have a high- bandwidth connection to AWS and you want to avoid bandwidth contention, especially during a snapshot restore. For high-thro ughput workload needs, you can use AWS Direct Connect to establish a dedicated network connection between your on-premis es gateway and AWS. To measure the bandwidth of the connectio n from your gateway to AWS, use the CloudBytesDownload metrics of the gateway. For ed and CloudBytesUploaded more on this subject, see Measuring Performance Between Your Gateway and AWS. Improving your internet connectivity helps to ensure that your upload buffer does not fill up. Troubleshooting on-premises gateway issues API Version 2013-06-30 237 AWS Storage Gateway Volume Gateway User Guide Issue Action to Take Throughput to or from your gateway drops to • On the Gateway tab of the Storage Gateway console, verify that the IP addresses for your gateway VM are the same that you zero. see using your hypervisor client software (that is, the VMware vSphere client or Microsoft Hyper-V Manager). If you find a mismatch, restart your gateway from the Storage Gateway console, as shown in Shutting Down Your Gateway VM. After the restart, the addresses in the IP Addresses list in the Storage Gateway console's Gateway tab should match the IP addresses for your gateway, which you determine from the hypervisor client. • For VMware ESXi, the VM's IP address can be found in the vSphere client on the Summary tab. • For Microsoft Hyper-V, the VM's IP address can be found by logging into the local console. • Check your gateway's connectivity to AWS as described in Testing your gateway connection to the internet. • Check your gateway's network adapter configuration, and ensure that all the interfaces you intended to be activated for the gateway are activated. To view the network adapter configuration for your gateway, follow the instructions in Configuring Your Gateway Network and select the option for viewing your gateway's network configuration. You can view the throughput to and from your gateway from the Amazon CloudWatch console. For more information about measuring throughput to and from your gateway and AWS, see Measuring Performance Between Your Gateway and AWS. See Troubleshooting Microsoft Hyper-V setup, which discusses some of the common issues of deploying a gateway on Microsoft Hyper-V. You are having trouble importing (deploying) Storage Gateway on Microsoft Hyper-V. Troubleshooting on-premises gateway issues API Version 2013-06-30 238 AWS Storage Gateway Volume Gateway User Guide Issue Action to Take You receive a message that says: "The data that You receive this message if your gateway VM was created from a clone or snapshot of another gateway VM. If this isn’t the case, has been written to the contact Support. volume in your gateway isn't securely stored at AWS". Allowing Support to help troubleshoot your gateway hosted on- premises Storage Gateway provides a local console you can use to perform several maintenance tasks, including activating Support to access your gateway to assist you with troubleshooting gateway issues. By default, Support access to your gateway is deactivated. You provide this access through the host's local console. To give Support access to your gateway, you first log in to the local console for the host, navigate to the Storage Gateway's console, and then connect to the support server. To allow Support access to your gateway 1. Log in to your host's local console. • VMware ESXi – for more information, see Accessing the Gateway Local Console with VMware ESXi. • Microsoft Hyper-V – for more information, see Access the Gateway Local Console with Microsoft Hyper-V. 2. At the prompt, enter the corresponding numeral to select Gateway Console. 3. Enter h to open the list of available commands. 4. Do one of the following: • If your gateway is using a public endpoint, in the AVAILABLE COMMANDS window, enter open-support-channel to connect to customer support for Storage Gateway. Allow TCP port 22 so you can open a support channel to AWS. When you connect to customer support, Storage Gateway assigns you a support number. Make a note of your support number. • If your gateway is using a VPC endpoint, in the AVAILABLE COMMANDS window, enter open-support-channel. If your gateway is not activated, provide the VPC endpoint or IP Activating Support to help troubleshoot your gateway API Version 2013-06-30 239 AWS Storage Gateway Volume Gateway User Guide address to connect to customer support for Storage Gateway. Allow TCP port 22 so you can open a support channel to AWS. When you connect to customer support, Storage Gateway assigns you a support number. Make a note of your support number. Note The channel number is not a Transmission Control
storagegateway-vgw-ug-091
storagegateway-vgw-ug.pdf
91
your support number. • If your gateway is using a VPC endpoint, in the AVAILABLE COMMANDS window, enter open-support-channel. If your gateway is not activated, provide the VPC endpoint or IP Activating Support to help troubleshoot your gateway API Version 2013-06-30 239 AWS Storage Gateway Volume Gateway User Guide address to connect to customer support for Storage Gateway. Allow TCP port 22 so you can open a support channel to AWS. When you connect to customer support, Storage Gateway assigns you a support number. Make a note of your support number. Note The channel number is not a Transmission Control Protocol/User Datagram Protocol (TCP/UDP) port number. Instead, the gateway makes a Secure Shell (SSH) (TCP 22) connection to Storage Gateway servers and provides the support channel for the connection. 5. After the support channel is established, provide your support service number to Support so Support can provide troubleshooting assistance. 6. When the support session is completed, enter q to end it. Don't close the session until Amazon Web Services Support notifies you that the support session is complete. 7. 8. Enter exit to log out of the gateway console. Follow the prompts to exit the local console. Troubleshooting Microsoft Hyper-V setup The following table lists typical issues that you might encounter when deploying Storage Gateway on the Microsoft Hyper-V platform. Issue Action to Take You try to import a gateway and receive the following error message: "A server error occurred while attempting to import the virtual machine. Import failed. Unable to find virtual machine import files under location [...]. You This error can occur for the following reasons: • If you are not pointing to the root of the unzipped gateway source files. The last part of the location you specify in the Import Virtual Machine dialog box should be AWS-Storage- Gateway . For example: C:\prod-gateway\unzippedSourceVM\AWS- Storage-Gateway\ . • If you have already deployed a gateway and you did not select the Copy the virtual machine option and check the Duplicate Troubleshooting Microsoft Hyper-V setup issues API Version 2013-06-30 240 AWS Storage Gateway Volume Gateway User Guide Issue Action to Take can import a virtual machine only if you used Hyper-V to create and all files option in the Import Virtual Machine dialog box, then the VM was created in the location where you have the unzipped gateway files and you cannot import from this export it." location again. To fix this problem, get a fresh copy of the unzipped gateway source files and copy to a new location. Use the new location as the source of the import. If you plan on creating multiple gateways from one unzipped source files location, you must select Copy the virtual machine and check the Duplicate all files box in the Import Virtual Machine dialog box. If you have already deployed a gateway and you try to reuse the default folders that store the virtual hard disk files and virtual machine configuration files, then this error will occur. To fix this problem, specify new locations under Server in the panel on the left side of the Hyper-V Settings dialog box. You try to import a gateway and receive the following error message: "A server error occurred while attempting to import the virtual machine. Import failed. Import task failed to copy file from [...]: The file exists. (0x80070050)" Troubleshooting Microsoft Hyper-V setup issues API Version 2013-06-30 241 AWS Storage Gateway Volume Gateway User Guide Issue Action to Take When you import the gateway make sure you select Copy the virtual machine and check the Duplicate all files box in the Import Virtual Machine dialog box to create a new unique ID for the VM. You try to import a gateway and receive the following error message: "A server error occurred while attempting to import the virtual machine. Import failed. Import failed because the virtual machine must have a new identifier. Select a new identifier and try the import again." You try to start a gateway VM and receive the This error is likely caused by a CPU discrepancy between the required CPUs for the gateway and the available CPUs on the host. following error message: Ensure that the VM CPU count is supported by the underlying "An error occurred while hypervisor. attempting to start the For more information about the requirements for Storage selected virtual machine(s Gateway, see Requirements for setting up Volume Gateway. ). The child partition processor setting is incompatible with parent partition. 'AWS-Stor age-Gateway' could not initialize. (Virtual machine ID [...])" Troubleshooting Microsoft Hyper-V setup issues API Version 2013-06-30 242 AWS Storage Gateway Volume Gateway User Guide Issue Action to Take You try to start a gateway VM and receive the This error is likely caused by a RAM discrepancy between the required RAM for the gateway and the available RAM
storagegateway-vgw-ug-092
storagegateway-vgw-ug.pdf
92
the underlying "An error occurred while hypervisor. attempting to start the For more information about the requirements for Storage selected virtual machine(s Gateway, see Requirements for setting up Volume Gateway. ). The child partition processor setting is incompatible with parent partition. 'AWS-Stor age-Gateway' could not initialize. (Virtual machine ID [...])" Troubleshooting Microsoft Hyper-V setup issues API Version 2013-06-30 242 AWS Storage Gateway Volume Gateway User Guide Issue Action to Take You try to start a gateway VM and receive the This error is likely caused by a RAM discrepancy between the required RAM for the gateway and the available RAM on the host. following error message: "An error occurred while Gateway, see Requirements for setting up Volume Gateway. For more information about the requirements for Storage attempting to start the selected virtual machine(s ). 'AWS-Storage-Gatew ay' could not initializ e. (Virtual machine ID [...]) Failed to create partition: Insufficient system resources exist to complete the requested service. (0x800705AA)" Your snapshots and gateway software updates The gateway VM's clock might be offset from the actual time, known as clock drift. Check and correct the VM's time using are occurring at slightly local gateway console's time synchronization option. For more different times than information, see Synchronize VM time with Hyper-V or Linux KVM expected. host time. You need to put the unzipped Microsoft Hyper- V Storage Gateway files on the host file system. Access the host as you do a typical Microsoft Windows server. For example, if the hypervisor host is name hyperv-server , then you can use the following UNC path \\hyperv-server\c$ , which assumes that the name hyperv-server can be resolved or is defined in your local hosts file. You are prompted for credentials when connecting to hypervisor. Add your user credentials as a local administrator for the hypervisor host by using the Sconfig.cmd tool. Troubleshooting Microsoft Hyper-V setup issues API Version 2013-06-30 243 AWS Storage Gateway Volume Gateway User Guide Issue Action to Take You may notice poor network performance For information about a workaround, see the Microsoft documentation, see Poor network performance on virtual if you turn on virtual machines on a Windows Server 2012 Hyper-V host if VMQ is machine queue (VMQ) turned on. for a Hyper-V host that's using a Broadcom network adapter. Troubleshooting Amazon EC2 gateway issues In the following sections, you can find typical issues that you might encounter working with your gateway deployed on Amazon EC2. For more information about the difference between an on- premises gateway and a gateway deployed in Amazon EC2, see Deploy a customized Amazon EC2 instance for Volume Gateway. Topics • Your gateway activation hasn't occurred after a few moments • You can't find your EC2 gateway instance in the instance list • You created an Amazon EBS volume but can't attach it to your EC2 gateway instance • You can't attach an initiator to a volume target of your EC2 gateway • You get a message that you have no disks available when you try to add storage volumes • You want to remove a disk allocated as upload buffer space to reduce upload buffer space • Throughput to or from your EC2 gateway drops to zero • You want Support to help troubleshoot your EC2 gateway • You want to connect to your gateway instance using the Amazon EC2 serial console Your gateway activation hasn't occurred after a few moments Check the following in the Amazon EC2 console: Troubleshooting Amazon EC2 gateway issues API Version 2013-06-30 244 AWS Storage Gateway Volume Gateway User Guide • Port 80 is activated in the security group that you associated with the instance. For more information about adding a security group rule, see Adding a security group rule in the Amazon EC2 User Guide. • The gateway instance is marked as running. In the Amazon EC2 console, the State value for the instance should be RUNNING. • Make sure that your Amazon EC2 instance type meets the minimum requirements, as described in Storage requirements. After correcting the problem, try activating the gateway again. To do this, open the Storage Gateway console, choose Deploy a new Gateway on Amazon EC2, and re-enter the IP address of the instance. You can't find your EC2 gateway instance in the instance list If you didn't give your instance a resource tag and you have many instances running, it can be hard to tell which instance you launched. In this case, you can take the following actions to find the gateway instance: • Check the name of the Amazon Machine Image (AMI) on the Description tab of the instance. An instance based on the Storage Gateway AMI should start with the text aws-storage-gateway- ami. • If you have several instances based on the Storage Gateway AMI, check the instance launch time to find the correct
storagegateway-vgw-ug-093
storagegateway-vgw-ug.pdf
93
your EC2 gateway instance in the instance list If you didn't give your instance a resource tag and you have many instances running, it can be hard to tell which instance you launched. In this case, you can take the following actions to find the gateway instance: • Check the name of the Amazon Machine Image (AMI) on the Description tab of the instance. An instance based on the Storage Gateway AMI should start with the text aws-storage-gateway- ami. • If you have several instances based on the Storage Gateway AMI, check the instance launch time to find the correct instance. You created an Amazon EBS volume but can't attach it to your EC2 gateway instance Check that the Amazon EBS volume in question is in the same Availability Zone as the gateway instance. If there is a discrepancy in Availability Zones, create a new Amazon EBS volume in the same Availability Zone as your instance. You can't attach an initiator to a volume target of your EC2 gateway Check that the security group that you launched the instance with includes a rule that allows the port that you are using for iSCSI access. The port is usually set as 3260. For more information on connecting to volumes, see Connecting to your volumes from a Windows client. Can't find the EC2 gateway instance in the instance list API Version 2013-06-30 245 AWS Storage Gateway Volume Gateway User Guide You get a message that you have no disks available when you try to add storage volumes For a newly activated gateway, no volume storage is defined. Before you can define volume storage, you must allocate local disks to the gateway to use as an upload buffer and cache storage. For a gateway deployed to Amazon EC2, the local disks are Amazon EBS volumes attached to the instance. This error message likely occurs because no Amazon EBS volumes are defined for the instance. Check block devices defined for the instance that is running the gateway. If there are only two block devices (the default devices that come with the AMI), then you should add storage. For more information on doing so, see Deploy a customized Amazon EC2 instance for Volume Gateway. After attaching two or more Amazon EBS volumes, try creating volume storage on the gateway. You want to remove a disk allocated as upload buffer space to reduce upload buffer space Follow the steps in Determining the size of upload buffer to allocate. Throughput to or from your EC2 gateway drops to zero Verify that the gateway instance is running. If the instance is starting due to a reboot, for example, wait for the instance to restart. Also, verify that the gateway IP has not changed. If the instance was stopped and then restarted, the IP address of the instance might have changed. In this case, you need to activate a new gateway. You can view the throughput to and from your gateway from the Amazon CloudWatch console. For more information about measuring throughput to and from your gateway and AWS, see Measuring Performance Between Your Gateway and AWS. You want Support to help troubleshoot your EC2 gateway Storage Gateway provides a local console you can use to perform several maintenance tasks, including activating Support to access your gateway to assist you with troubleshooting gateway issues. By default, Support access to your gateway is deactivated. You provide this access through the Amazon EC2 local console. You log in to the Amazon EC2 local console through a Secure Shell No disks available when you try to add storage volumes message API Version 2013-06-30 246 AWS Storage Gateway Volume Gateway User Guide (SSH). To successfully log in through SSH, your instance's security group must have a rule that opens TCP port 22. Note If you add a new rule to an existing security group, the new rule applies to all instances that use that security group. For more information about security groups and how to add a security group rule, see Amazon EC2 security groups in the Amazon EC2 User Guide. To let Support connect to your gateway, you first log in to the local console for the Amazon EC2 instance, navigate to the Storage Gateway's console, and then provide the access. To activate Support access to a gateway deployed on an Amazon EC2 instance 1. Log in to the local console for your Amazon EC2 instance. For instructions, go to Connect to your instance in the Amazon EC2 User Guide. You can use the following command to log in to the EC2 instance's local console. ssh –i PRIVATE-KEY admin@INSTANCE-PUBLIC-DNS-NAME Note The PRIVATE-KEY is the .pem file containing the private certificate of the EC2 key pair that you used to launch the Amazon EC2 instance. For more information, see Retrieving the public key
storagegateway-vgw-ug-094
storagegateway-vgw-ug.pdf
94
the Storage Gateway's console, and then provide the access. To activate Support access to a gateway deployed on an Amazon EC2 instance 1. Log in to the local console for your Amazon EC2 instance. For instructions, go to Connect to your instance in the Amazon EC2 User Guide. You can use the following command to log in to the EC2 instance's local console. ssh –i PRIVATE-KEY admin@INSTANCE-PUBLIC-DNS-NAME Note The PRIVATE-KEY is the .pem file containing the private certificate of the EC2 key pair that you used to launch the Amazon EC2 instance. For more information, see Retrieving the public key for your key pair in the Amazon EC2 User Guide. The INSTANCE-PUBLIC-DNS-NAME is the public Domain Name System (DNS) name of your Amazon EC2 instance that your gateway is running on. You obtain this public DNS name by selecting the Amazon EC2 instance in the EC2 console and clicking the Description tab. 2. At the prompt, enter 6 - Command Prompt to open the Support Channel console. 3. Enter h to open the AVAILABLE COMMANDS window. 4. Do one of the following: • If your gateway is using a public endpoint, in the AVAILABLE COMMANDS window, enter open-support-channel to connect to customer support for Storage Gateway. Allow TCP Activating Support to help troubleshoot the gateway API Version 2013-06-30 247 AWS Storage Gateway Volume Gateway User Guide port 22 so you can open a support channel to AWS. When you connect to customer support, Storage Gateway assigns you a support number. Make a note of your support number. • If your gateway is using a VPC endpoint, in the AVAILABLE COMMANDS window, enter open-support-channel. If your gateway is not activated, provide the VPC endpoint or IP address to connect to customer support for Storage Gateway. Allow TCP port 22 so you can open a support channel to AWS. When you connect to customer support, Storage Gateway assigns you a support number. Make a note of your support number. Note The channel number is not a Transmission Control Protocol/User Datagram Protocol (TCP/UDP) port number. Instead, the gateway makes a Secure Shell (SSH) (TCP 22) connection to Storage Gateway servers and provides the support channel for the connection. 5. After the support channel is established, provide your support service number to Support so Support can provide troubleshooting assistance. 6. When the support session is completed, enter q to end it. Don't close the session until Support notifies you that the support session is complete. Enter exit to exit the Storage Gateway console. Follow the console menus to log out of the Storage Gateway instance. 7. 8. You want to connect to your gateway instance using the Amazon EC2 serial console You can use the Amazon EC2 serial console to troubleshoot boot, network configuration, and other issues. For instructions and troubleshooting tips, see Amazon EC2 Serial Console in the Amazon Elastic Compute Cloud User Guide. Troubleshooting hardware appliance issues The following topics discuss issues that you might encounter with the Storage Gateway Hardware Appliance, and suggestions on troubleshooting these. Connect to your Amazon EC2 gateway using the serial console API Version 2013-06-30 248 AWS Storage Gateway Volume Gateway User Guide You can't determine the service IP address When attempting to connect to your service, make sure that you are using the service's IP address and not the host IP address. Configure the service IP address in the service console, and the host IP address in the hardware console. You see the hardware console when you start the hardware appliance. To go to the service console from the hardware console, choose Open Service Console. How do you perform a factory reset? If you need to perform a factory reset on your appliance, contact the Storage Gateway Hardware Appliance team for support, as described in the Support section following. How do you perform a remote restart? If you need to perform a remote restart of your appliance, you can do so using the Dell iDRAC management interface. For more information, see iDRAC9 Virtual Power Cycle: Remotely power cycle Dell EMC PowerEdge Servers on the Dell Technologies InfoHub website. Where do you obtain Dell iDRAC support? The Dell PowerEdge server comes with the Dell iDRAC management interface. We recommend the following: • If you use the iDRAC management interface, you should change the default password. For more information about the iDRAC credentials, see Dell PowerEdge - What is the default sign-in credentials for iDRAC?. • Make sure that the firmware is up-to-date to prevent security breaches. • Moving the iDRAC network interface to a normal (em) port can cause performance issues or prevent the normal functioning of the appliance. You can't find the hardware appliance serial number You can find the serial number for your Storage Gateway Hardware Appliance using the Storage Gateway console. To find the
storagegateway-vgw-ug-095
storagegateway-vgw-ug.pdf
95
We recommend the following: • If you use the iDRAC management interface, you should change the default password. For more information about the iDRAC credentials, see Dell PowerEdge - What is the default sign-in credentials for iDRAC?. • Make sure that the firmware is up-to-date to prevent security breaches. • Moving the iDRAC network interface to a normal (em) port can cause performance issues or prevent the normal functioning of the appliance. You can't find the hardware appliance serial number You can find the serial number for your Storage Gateway Hardware Appliance using the Storage Gateway console. To find the hardware appliance serial number: 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. How to determine service IP address API Version 2013-06-30 249 AWS Storage Gateway Volume Gateway User Guide 2. Choose Hardware from the navigation menu on the left side of the page. 3. 4. Select your hardware appliance from the list. Locate the Serial Number field on the Details tab for your appliance. Where to obtain hardware appliance support To contact AWS about technical support for your hardware appliance, see Support. The Support team might ask you to activate the support channel to troubleshoot your gateway issues remotely. You don't need this port to be open for the normal operation of your gateway, but it is required for troubleshooting. You can activate the support channel from the hardware console as shown in the procedure following. To open a support channel for AWS 1. Open the hardware console. 2. Choose Open Support Channel at the bottom of the main page of the hardware console, and then press Enter. The assigned port number should appear within 30 seconds if there are no network connectivity or firewall issues. For example: Status: Open on port 19599 3. Note the port number and provide it to Support. Troubleshooting volume issues You can find information about the most typical issues you might encounter when working with volumes, and actions that we suggest that you take to fix them. Topics • The Console Says That Your Volume Is Not Configured • The Console Says That Your Volume Is Irrecoverable • Your Cached Gateway is Unreachable And You Want to Recover Your Data • The Console Says That Your Volume Has PASS THROUGH Status • You Want to Verify Volume Integrity and Fix Possible Errors How to get hardware appliance support API Version 2013-06-30 250 AWS Storage Gateway Volume Gateway User Guide • Your Volume's iSCSI Target Doesn’t Appear in Windows Disk Management Console • You Want to Change Your Volume's iSCSI Target Name • Your Scheduled Volume Snapshot Did Not Occur • You Need to Remove or Replace a Disk That Has Failed • Throughput from Your Application to a Volume Has Dropped to Zero • A Cache Disk in Your Gateway Encounters a Failure • A Volume Snapshot Has PENDING Status Longer Than Expected • High Availability Health Notifications The Console Says That Your Volume Is Not Configured If the Storage Gateway console indicates that your volume has a status of UPLOAD BUFFER NOT CONFIGURED, add upload buffer capacity to your gateway. You cannot use a gateway to store your application data if the upload buffer for the gateway is not configured. For more information, see To configure additional upload buffer or cache storage for your gateway. The Console Says That Your Volume Is Irrecoverable For stored volumes, if the Storage Gateway console indicates that your volume has a status of IRRECOVERABLE, you can no longer use this volume. You can try to delete the volume in the Storage Gateway console. If there is data on the volume, then you can recover the data when you create a new volume based on the local disk of the VM that was initially used to create the volume. When you create the new volume, select Preserve existing data. Make sure to delete pending snapshots of the volume before deleting the volume. For more information, see Deleting snapshots of your storage volumes. If deleting the volume in the Storage Gateway console does not work, then the disk allocated for the volume might have been improperly removed from the VM and cannot be removed from the appliance. For cached volumes, if the Storage Gateway console indicates that your volume has a status of IRRECOVERABLE, you can no longer use this volume. If there is data on the volume, you can create a snapshot of the volume and then recover your data from the snapshot or you can clone the volume from the last recovery point. You can delete the volume after you have recovered your data. For more information, see Your Cached Gateway is Unreachable And You Want to Recover Your Data. The Console Says That Your Volume Is Not Configured API Version 2013-06-30 251 AWS Storage Gateway
storagegateway-vgw-ug-096
storagegateway-vgw-ug.pdf
96
cached volumes, if the Storage Gateway console indicates that your volume has a status of IRRECOVERABLE, you can no longer use this volume. If there is data on the volume, you can create a snapshot of the volume and then recover your data from the snapshot or you can clone the volume from the last recovery point. You can delete the volume after you have recovered your data. For more information, see Your Cached Gateway is Unreachable And You Want to Recover Your Data. The Console Says That Your Volume Is Not Configured API Version 2013-06-30 251 AWS Storage Gateway Volume Gateway User Guide For stored volumes, you can create a new volume from the disk that was used to create the irrecoverable volume. For more information, see Creating a storage volume. For information about volume status, see Understanding Volume Statuses and Transitions. Your Cached Gateway is Unreachable And You Want to Recover Your Data When your gateway becomes unreachable (such as when you shut it down), you have the option of either creating a snapshot from a volume recovery point and using that snapshot, or cloning a new volume from the last recovery point for an existing volume. Cloning from a volume recovery point is faster and more cost effective than creating a snapshot. For more information about cloning a volume, see Cloning a cached volume from a recovery point. Storage Gateway provides recovery points for each volume in a cached Volume Gateway architecture. A volume recovery point is a point in time at which all data of the volume is consistent and from which you can create a snapshot or clone a volume. The Console Says That Your Volume Has PASS THROUGH Status In some cases, the Storage Gateway console might indicate that your volume has a status of PASSTHROUGH. A volume can have PASSTHROUGH status for several reasons. Some reasons require action, and some do not. An example of when you should take action if your volume has the PASS THROUGH status is when your gateway has run out of upload buffer space. To verify if your upload buffer was exceeded in the past, you can view the UploadBufferPercentUsed metric in the Amazon CloudWatch console; for more information, see Monitoring the upload buffer. If your gateway has the PASS THROUGH status because it has run out of upload buffer space, you should allocate more upload buffer space to your gateway. Adding more buffer space will cause your volume to transition from PASS THROUGH to BOOTSTRAPPING to AVAILABLE automatically. While the volume has the BOOTSTRAPPING status, the gateway reads data off the volume's disk, uploads this data to Amazon S3, and catches up as needed. When the gateway has caught up and saved the volume data to Amazon S3, the volume status becomes AVAILABLE and snapshots can be started again. Note that when your volume has the PASS THROUGH or BOOTSTRAPPING status, you can continue to read and write data from the volume disk. For more information about adding more upload buffer space, see Determining the size of upload buffer to allocate. Your Cached Gateway is Unreachable And You Want to Recover Your Data API Version 2013-06-30 252 AWS Storage Gateway Volume Gateway User Guide To take action before the upload buffer is exceeded, you can set a threshold alarm on a gateway's upload buffer. For more information, see To set an upper threshold alarm for a gateway's upload buffer. In contrast, an example of not needing to take action when a volume has the PASS THROUGH status is when the volume is waiting to be bootstrapped because another volume is currently being bootstrapped. The gateway bootstraps volumes one at a time. Infrequently, the PASS THROUGH status can indicate that a disk allocated for an upload buffer has failed. In this is the case, you should remove the disk. For more information, see Working with Volume Gateway storage resources. For information about volume status, see Understanding Volume Statuses and Transitions. You Want to Verify Volume Integrity and Fix Possible Errors If you want to verify volume integrity and fix possible errors, and your gateway uses Microsoft Windows initiators to connect to its volumes, you can use the Windows CHKDSK utility to verify the integrity of your volumes and fix any errors on the volumes. Windows can automatically run the CHKDSK tool when volume corruption is detected, or you can run it yourself. Your Volume's iSCSI Target Doesn’t Appear in Windows Disk Management Console If your volume's iSCSI target does not show up in the Disk Management Console in Windows, check that you have configured the upload buffer for the gateway. For more information, see To configure additional upload buffer or cache storage for your gateway. You Want to Change Your Volume's iSCSI Target Name If you want to
storagegateway-vgw-ug-097
storagegateway-vgw-ug.pdf
97
CHKDSK utility to verify the integrity of your volumes and fix any errors on the volumes. Windows can automatically run the CHKDSK tool when volume corruption is detected, or you can run it yourself. Your Volume's iSCSI Target Doesn’t Appear in Windows Disk Management Console If your volume's iSCSI target does not show up in the Disk Management Console in Windows, check that you have configured the upload buffer for the gateway. For more information, see To configure additional upload buffer or cache storage for your gateway. You Want to Change Your Volume's iSCSI Target Name If you want to change the iSCSI target name of your volume, you must delete the volume and add it again with a new target name. If you do so, you can preserve the data on the volume. Your Scheduled Volume Snapshot Did Not Occur If your scheduled snapshot of a volume did not occur, check whether your volume has the PASSTHROUGH status, or if the gateway's upload buffer was filled just prior to the scheduled snapshot time. You can check the UploadBufferPercentUsed metric for the gateway in the Amazon CloudWatch console and create an alarm for this metric. For more information, see Monitoring the upload buffer and To set an upper threshold alarm for a gateway's upload buffer. You Want to Verify Volume Integrity and Fix Possible Errors API Version 2013-06-30 253 AWS Storage Gateway Volume Gateway User Guide You Need to Remove or Replace a Disk That Has Failed If you need to replace a volume disk that has failed or replace a volume because it isn't needed, you should remove the volume first using the Storage Gateway console. For more information, see To delete a volume. You then use the hypervisor client to remove the backing storage: • For VMware ESXi, remove the backing storage as described in Deleting storage volumes. • For Microsoft Hyper-V, remove the backing storage. Throughput from Your Application to a Volume Has Dropped to Zero If throughput from your application to a volume has dropped to zero, try the following: • If you are using the VMware vSphere client, check that your volume's Host IP address matches one of the addresses that appears in the vSphere client on the Summary tab. You can find the Host IP address for a storage volume in the Storage Gateway console in the Details tab for the volume. A discrepancy in the IP address can occur, for example, when you assign a new static IP address to your gateway. If there is a discrepancy, restart your gateway from the Storage Gateway console as shown in Shutting Down Your Gateway VM. After the restart, the Host IP address in the ISCSI Target Info tab for a storage volume should match an IP address shown in the vSphere client on the Summary tab for the gateway. • If there is no IP address in the Host IP box for the volume and the gateway is online. For example, this could occur if you create a volume associated with an IP address of a network adapter of a gateway that has two or more network adapters. When you remove or deactivate the network adapter that the volume is associated with, the IP address might not appear in the Host IP box. To address this issue, delete the volume and then re-create it preserving its existing data. • Check that the iSCSI initiator your application uses is correctly mapped to the iSCSI target for the storage volume. For more information about connecting to storage volumes, see Connecting to your volumes from a Windows client. You can view the throughput for volumes and create alarms from the Amazon CloudWatch console. For more information about measuring throughput from your application to a volume, see Measuring Performance Between Your Application and Gateway. You Need to Remove or Replace a Disk That Has Failed API Version 2013-06-30 254 AWS Storage Gateway Volume Gateway User Guide A Cache Disk in Your Gateway Encounters a Failure If one or more cache disks in your gateway encounters a failure, the gateway prevents read and write operations to your virtual tapes and volumes. To resume normal functionality, reconfigure your gateway as described following: • If the cache disk is inaccessible or unusable, delete the disk from your gateway configuration. • If the cache disk is still accessible and useable, reconnect it to your gateway. Note If you delete a cache disk, tapes or volumes that have clean data (that is, for which data in the cache disk and Amazon S3 are synchronized) will continue to be available when the gateway resumes normal functionality. For example, if your gateway has three cache disks and you delete two, tapes or volumes that are clean will have AVAILABLE status. Other tapes and volumes will have
storagegateway-vgw-ug-098
storagegateway-vgw-ug.pdf
98
following: • If the cache disk is inaccessible or unusable, delete the disk from your gateway configuration. • If the cache disk is still accessible and useable, reconnect it to your gateway. Note If you delete a cache disk, tapes or volumes that have clean data (that is, for which data in the cache disk and Amazon S3 are synchronized) will continue to be available when the gateway resumes normal functionality. For example, if your gateway has three cache disks and you delete two, tapes or volumes that are clean will have AVAILABLE status. Other tapes and volumes will have IRRECOVERABLE status. If you use ephemeral disks as cache disks for your gateway or mount your cache disks on an ephemeral drive, your cache disks will be lost when you shut down the gateway. Shutting down the gateway when your cache disk and Amazon S3 are not synchronized can result in data loss. As a result, we don't recommend using ephemeral drives or disks. A Volume Snapshot Has PENDING Status Longer Than Expected If a volume snapshot remains in PENDING state longer than expected, the gateway VM might have crashed unexpectedly or the status of a volume might have changed to PASS THROUGH or IRRECOVERABLE. If any of these are the case, the snapshot remains in PENDING status and the snapshot does not successfully complete. In these cases, we recommend that you delete the snapshot. For more information, see Deleting snapshots of your storage volumes. When the volume returns to AVAILABLE status, create a new snapshot of the volume. For information about volume status, see Understanding Volume Statuses and Transitions. High Availability Health Notifications When running your gateway on the VMware vSphere High Availability (HA) platform, you may receive health notifications. For more information about health notifications, see Troubleshooting high availability issues. A Cache Disk in Your Gateway Encounters a Failure API Version 2013-06-30 255 AWS Storage Gateway Volume Gateway User Guide Troubleshooting high availability issues You can find information following about actions to take if you experience availability issues. Topics • Health notifications • Metrics Health notifications When you run your gateway on VMware vSphere HA, all gateways produce the following health notifications to your configured Amazon CloudWatch log group. These notifications go into a log stream called AvailabilityMonitor. Topics • Notification: Reboot • Notification: HardReboot • Notification: HealthCheckFailure • Notification: AvailabilityMonitorTest Notification: Reboot You can get a reboot notification when the gateway VM is restarted. You can restart a gateway VM by using the VM Hypervisor Management console or the Storage Gateway console. You can also restart by using the gateway software during the gateway's maintenance cycle. Action to Take If the time of the reboot is within 10 minutes of the gateway's configured maintenance start time, this is probably a normal occurrence and not a sign of any problem. If the reboot occurred significantly outside the maintenance window, check whether the gateway was restarted manually. Notification: HardReboot You can get a HardReboot notification when the gateway VM is restarted unexpectedly. Such a restart can be due to loss of power, a hardware failure, or another event. For VMware gateways, a reset by vSphere High Availability Application Monitoring can launch this event. Troubleshooting high availability issues API Version 2013-06-30 256 AWS Storage Gateway Action to Take Volume Gateway User Guide When your gateway runs in such an environment, check for the presence of the HealthCheckFailure notification and consult the VMware events log for the VM. Notification: HealthCheckFailure For a gateway on VMware vSphere HA, you can get a HealthCheckFailure notification when a health check fails and a VM restart is requested. This event also occurs during a test to monitor availability, indicated by an AvailabilityMonitorTest notification. In this case, the HealthCheckFailure notification is expected. Note This notification is for VMware gateways only. Action to Take If this event repeatedly occurs without an AvailabilityMonitorTest notification, check your VM infrastructure for issues (storage, memory, and so on). If you need additional assistance, contact Support. Notification: AvailabilityMonitorTest For a gateway on VMware vSphere HA, you can get an AvailabilityMonitorTest notification when you run a test of the Availability and application monitoring system in VMware. Metrics The AvailabilityNotifications metric is available on all gateways. This metric is a count of the number of availability-related health notifications generated by the gateway. Use the Sum statistic to observe whether the gateway is experiencing any availability-related events. Consult with your configured CloudWatch log group for details about the events. Metrics API Version 2013-06-30 257 AWS Storage Gateway Volume Gateway User Guide Best practices for Volume Gateway This section contains the following topics, which provide information about the best practices for working with gateways, local disks, snapshots, and data. We recommend that you familiarize yourself with the information outlined in this section, and attempt to follow
storagegateway-vgw-ug-099
storagegateway-vgw-ug.pdf
99
all gateways. This metric is a count of the number of availability-related health notifications generated by the gateway. Use the Sum statistic to observe whether the gateway is experiencing any availability-related events. Consult with your configured CloudWatch log group for details about the events. Metrics API Version 2013-06-30 257 AWS Storage Gateway Volume Gateway User Guide Best practices for Volume Gateway This section contains the following topics, which provide information about the best practices for working with gateways, local disks, snapshots, and data. We recommend that you familiarize yourself with the information outlined in this section, and attempt to follow these guidelines in order to avoid problems with your AWS Storage Gateway. For additional guidance on diagnosing and solving common issues you might encounter with your deployment, see Troubleshooting your gateway. Topics • Best practices: recovering your data • Cleaning up unnecessary resources • Reducing the amount of billed storage on a volume Best practices: recovering your data Although it is rare, your gateway might encounter an unrecoverable failure. Such a failure can occur in your virtual machine (VM), the gateway itself, the local storage, or elsewhere. If a failure occurs, we recommend that you follow the instructions in the appropriate section following to recover your data. Important Storage Gateway doesn’t support recovering a gateway VM from a snapshot that is created by your hypervisor or from your Amazon EC2 Amazon Machine Image (AMI). If your gateway VM malfunctions, activate a new gateway and recover your data to that gateway using the instructions following. Topics • Recovering from an unexpected virtual machine shutdown • Recovering your data from a malfunctioning gateway or VM • Recovering your data from an irrecoverable volume • Recovering your data from a malfunctioning cache disk • Recovering your data from a corrupted file system Best practices: recovering your data API Version 2013-06-30 258 AWS Storage Gateway Volume Gateway User Guide • Recovering your data from an inaccessible data center Recovering from an unexpected virtual machine shutdown If your VM shuts down unexpectedly, for example during a power outage, your gateway becomes unreachable. When power and network connectivity are restored, your gateway becomes reachable and starts to function normally. Following are some steps you can take at that point to help recover your data: • If an outage causes network connectivity issues, you can troubleshoot the issue. For information about how to test network connectivity, see Testing your gateway connection to the internet. • For cached volumes setups, when your gateway becomes reachable, your volumes go into BOOTSTRAPPING status. This functionality ensures that your locally stored data continues to be synchronized with AWS. For more information on this status, see Understanding Volume Statuses and Transitions. • If your gateway malfunctions and issues occur with your volumes or tapes as a result of an unexpected shutdown, you can recover your data. For information about how to recover your data, see the sections following that apply to your scenario. Recovering your data from a malfunctioning gateway or VM If your gateway or virtual machine malfunctions, you can recover data that has been uploaded to AWS and stored on a volume in Amazon S3. For cached volumes gateways, you recover data from a recovery snapshot. For stored volumes gateways, you can recover data from your most recent Amazon EBS snapshot of the volume. For Tape Gateways, you recover one or more tapes from a recovery point to a new Tape Gateway. If your cached volumes gateway becomes unreachable, you can use the following steps to recover your data from a recovery snapshot: 1. In the AWS Management Console, choose the malfunctioning gateway, choose the volume you want to recover, and then create a recovery snapshot from it. 2. Deploy and activate a new Volume Gateway. Or, if you have an existing functioning Volume Gateway, you can use that gateway to recover your volume data. 3. Find the snapshot you created and restore it to a new volume on the functioning gateway. 4. Mount the new volume as an iSCSI device on your on-premises application server. Recovering from an unexpected VM shutdown API Version 2013-06-30 259 AWS Storage Gateway Volume Gateway User Guide For detailed information on how to recover cached volumes data from a recovery snapshot, see Your Cached Gateway is Unreachable And You Want to Recover Your Data. Recovering your data from an irrecoverable volume If the status of your volume is IRRECOVERABLE, you can no longer use this volume. For stored volumes, you can retrieve your data from the irrecoverable volume to a new volume by using the following steps: 1. Create a new volume from the disk that was used to create the irrecoverable volume. 2. Preserve existing data when you are creating the new volume. 3. Delete all pending snapshot jobs for the irrecoverable volume.
storagegateway-vgw-ug-100
storagegateway-vgw-ug.pdf
100
cached volumes data from a recovery snapshot, see Your Cached Gateway is Unreachable And You Want to Recover Your Data. Recovering your data from an irrecoverable volume If the status of your volume is IRRECOVERABLE, you can no longer use this volume. For stored volumes, you can retrieve your data from the irrecoverable volume to a new volume by using the following steps: 1. Create a new volume from the disk that was used to create the irrecoverable volume. 2. Preserve existing data when you are creating the new volume. 3. Delete all pending snapshot jobs for the irrecoverable volume. 4. Delete the irrecoverable volume from the gateway. For cached volumes, we recommend using the last recovery point to clone a new volume. For detailed information about how to retrieve your data from an irrecoverable volume to a new volume, see The Console Says That Your Volume Is Irrecoverable. Recovering your data from a malfunctioning cache disk If your cache disk encounters a failure, we recommend you use the following steps to recover your data depending on your situation: • If the malfunction occurred because a cache disk was removed from your host, shut down the gateway, re-add the disk, and restart the gateway. • If the cache disk is corrupted or not accessible, shut down the gateway, reset the cache disk, reconfigure the disk for cache storage, and restart the gateway. Recovering your data from a corrupted file system If your file system gets corrupted, you can use the fsck command to check your file system for errors and repair it. If you can repair the file system, you can then recover your data from the volumes on the file system, as described following: 1. Shut down your virtual machine and use the Storage Gateway Management Console to create a recovery snapshot. This snapshot represents the most current data stored in AWS. Recovering data from an irrecoverable volume API Version 2013-06-30 260 AWS Storage Gateway Note Volume Gateway User Guide You use this snapshot as a fallback if your file system can't be repaired or the snapshot creation process can't be completed successfully. For information about how to create a recovery snapshot, see Your Cached Gateway is Unreachable And You Want to Recover Your Data. 2. Use the fsck command to check your file system for errors and attempt a repair. 3. Restart your gateway VM. 4. When your hypervisor host starts to boot up, press and hold down shift key to enter the grub boot menu. 5. From the menu, press e to edit. 6. Choose the kernel line (the second line), and then press e to edit. 7. Append the following option to the kernel command line: init=/bin/bash. Use a space to separate the previous option from the option you just appended. 8. Delete both console= lines, making sure to delete all values following the = symbol, including those separated by commas. 9. Press Return to save the changes. 10.Press b to boot your computer with the modified kernel option. Your computer will boot to a bash# prompt. 11.Enter /sbin/fsck -f /dev/sda1 to run this command manually from the prompt, to check and repair your file system. If the command does not work with the /dev/sda1 path, you can use lsblk to determine the root filesystem device for / and use that path instead. 12.When the file system check and repair is complete, reboot the instance. The grub settings will revert to the original values, and the gateway will boot up normally. 13.Wait for snapshots that are in-progress from the original gateway to complete, and then validate the snapshot data. You can continue to use the original volume as-is, or you can create a new gateway with a new volume based on either the recovery snapshot or the completed snapshot. Alternatively, you can create a new volume from any of your completed snapshots from this volume. Recovering data from a corrupted file system API Version 2013-06-30 261 AWS Storage Gateway Volume Gateway User Guide Recovering your data from an inaccessible data center If your gateway or data center becomes inaccessible for some reason, you can recover your data to another gateway in a different data center or recover to a gateway hosted on an Amazon EC2 instance. If you don't have access to another data center, we recommend creating the gateway on an Amazon EC2 instance. The steps you follow depends on the gateway type you are covering the data from. To recover data from a Volume Gateway in an inaccessible data center 1. Create and activate a new Volume Gateway on an Amazon EC2 host. For more information, see Deploy a customized Amazon EC2 instance for Volume Gateway. Note Gateway stored volumes can't be hosted on Amazon EC2 instance. 2. Create a new volume and choose
storagegateway-vgw-ug-101
storagegateway-vgw-ug.pdf
101
recover to a gateway hosted on an Amazon EC2 instance. If you don't have access to another data center, we recommend creating the gateway on an Amazon EC2 instance. The steps you follow depends on the gateway type you are covering the data from. To recover data from a Volume Gateway in an inaccessible data center 1. Create and activate a new Volume Gateway on an Amazon EC2 host. For more information, see Deploy a customized Amazon EC2 instance for Volume Gateway. Note Gateway stored volumes can't be hosted on Amazon EC2 instance. 2. Create a new volume and choose the EC2 gateway as the target gateway. For more information, see Creating a storage volume. Create the new volume based on an Amazon EBS snapshot or clone from last recovery point of the volume you want to recover. If your volume is based on a snapshot, provide the snapshot id. If you are cloning a volume from a recovery point, choose the source volume. Cleaning up unnecessary resources If you created your gateway as an example exercise or a test, consider cleaning up to avoid incurring unexpected or unnecessary charges. To clean up resources you don't need 1. Delete any snapshots. For instructions, see Deleting snapshots of your storage volumes. 2. Unless you plan to continue using the gateway, delete it. For more information, see Deleting your gateway and removing associated resources. 3. Delete the Storage Gateway VM from your on-premises host. If you created your gateway on an Amazon EC2 instance, terminate the instance. Recovering data from an inaccessible data center API Version 2013-06-30 262 AWS Storage Gateway Volume Gateway User Guide Reducing the amount of billed storage on a volume Deleting files from your file system doesn't necessarily delete data from the underlying block device or reduce the amount of data stored on your volume. If you want to reduce the amount of billed storage on your volume, we recommend overwriting your files with zeros to compress the storage to a negligible amount of actual storage. Storage Gateway charges for volume usage based on compressed storage. Note If you use a delete tool that overwrites the data on your volume with random data, your usage will not be reduced. This is because the random data is not compressible. Reducing the amount of billed storage on a volume API Version 2013-06-30 263 AWS Storage Gateway Volume Gateway User Guide Additional Storage Gateway Resources This section describes AWS and third-party software, tools, and resources that can help you set up or manage your gateway, and also Storage Gateway quotas. Topics • Deploying and configuring the gateway VM host - Learn how to deploy and configure a virtual machine host for your gateway. • Working with Volume Gateway storage resources - Learn about procedures related to Volume Gateway storage resources, such as removing local disks and managing Amazon EBS volumes on gateway Amazon EC2 instances. • Getting an activation key for your gateway - Learn where to find the activation key that you need to provide when you deploy a new gateway. • Connecting iSCSI Initiators - Learn how to work with volumes or virtual tape library (VTL) devices that are exposed as Internet Small Computer System Interface (iSCSI) targets. • Using AWS Direct Connect with Storage Gateway - Learn how to create a dedicated network connection between your on-premises gateway and the AWS cloud. • Getting the IP address for your gateway appliance - Learn where to find the gateway's virtual machine host IP address, which you need to provide when you deploy a new gateway. • Understanding Storage Gateway Resources and Resource IDs - Learn how AWS identifies the resources and subresources that are created by Storage Gateway. • Tagging Storage Gateway Resources - Learn how to use metadata tags to categorize your resources and make them easier to manage. • Working with open-source components for Storage Gateway - Learn about the third-party tools and licenses that are used to deliver Storage Gateway functionality. • AWS Storage Gateway quotas - Learn about limits and quotas for Volume Gateway, including maximum limitations for volume size and quantity, and local disk size recommendations. Deploying and configuring the gateway VM host The topics in this section describe how to set up and manage the virtual machine host for your Storage Gateway appliance, including on-premises appliances running on VMware, Hyper-V, or Linux KVM, and appliances running on Amazon EC2 instances in the AWS cloud. Host setup API Version 2013-06-30 264 AWS Storage Gateway Topics Volume Gateway User Guide • Deploy a default Amazon EC2 host for Volume Gateway - Learn about how to deploy and activate a Volume Gateway on an Amazon Elastic Compute Cloud (Amazon EC2) instance using the default specifications. • Deploy a customized Amazon EC2 instance for Volume Gateway -
storagegateway-vgw-ug-102
storagegateway-vgw-ug.pdf
102
topics in this section describe how to set up and manage the virtual machine host for your Storage Gateway appliance, including on-premises appliances running on VMware, Hyper-V, or Linux KVM, and appliances running on Amazon EC2 instances in the AWS cloud. Host setup API Version 2013-06-30 264 AWS Storage Gateway Topics Volume Gateway User Guide • Deploy a default Amazon EC2 host for Volume Gateway - Learn about how to deploy and activate a Volume Gateway on an Amazon Elastic Compute Cloud (Amazon EC2) instance using the default specifications. • Deploy a customized Amazon EC2 instance for Volume Gateway - Learn about how to deploy and activate a Volume Gateway on an Amazon Elastic Compute Cloud (Amazon EC2) instance using customized settings. • Modify Amazon EC2 instance metadata options - Learn about how to configure your Amazon EC2 gateway instance to accept incoming metadata requests that use IMDS Version 1 (IMDSv1) or require that all metadata requests use IMDS Version 2 (IMDSv2). • Synchronize VM time with Hyper-V or Linux KVM host time - Learn about how to view and synchronize the time of an on-premises Hyper-V or Linux KVM gateway virtual machine to a Network Time Protocol (NTP) server. • Synchronize VM time with VMware host time - Learn about how to check the host time for a VMware gateway virtual machine and, if needed, set the time and configure the host to synchronize its time automatically to a Network Time Protocol (NTP) server. • Configuring paravirtualization on a VMware host - Learn about how you can configure the VMware host platform for your Storage Gateway appliance to use paravirtual Internet Small Computer System Interface Protocol (iSCSI) controllers. • Configuring network adapters for your gateway - Learn about how you can reconfigure your gateway to use the VMXNET3 (10 GbE) network adapter, or to use more than one network adapter so that it can be accessed fron nultiple IP addresses. • Using VMware vSphere High Availability with Storage Gateway - Learn about how to protect your storage workloads against hardware, hypervisor, or network failures by configuring Storage Gateway to work with VMware vSphere High Availability. Deploy a default Amazon EC2 host for Volume Gateway This topic lists the steps to deploy an Amazon EC2 host using the default specifications. You can deploy and activate a Volume Gateway on an Amazon Elastic Compute Cloud (Amazon EC2) instance. The AWS Storage Gateway Amazon Machine Image (AMI) is available as a community AMI. Deploy a default Amazon EC2 host for Volume Gateway API Version 2013-06-30 265 AWS Storage Gateway Note Volume Gateway User Guide Storage Gateway community AMIs are published and fully supported by AWS. You can see that the publisher is AWS, a verified provider. 1. 2. To set up the Amazon EC2instance, choose Amazon EC2 as the Host platform in the Platform options section of the workflow. For instructions on configuring the Amazon EC2 instance, see Deploying an Amazon EC2 instance to host your Volume Gateway. Select Launch instance to open the AWS Storage Gateway AMI template in the Amazon EC2 console and customize additional settings such as Instance types, Network settings and Configure storage. 3. Optionally, you can select Use default settings in the Storage Gateway console to deploy an Amazon EC2 instance with the default configuration. The Amazon EC2 instance that Use default settings creates has the following default specifications: • Instance type — m5.xlarge • Network Settings • For VPC, select the VPC that you want your EC2 instance to run in. • For Subnet, specify the subnet that your EC2 instance should be launched in. Note VPC subnets will appear in the drop down only if they have the auto-assign public IPv4 address setting activated from the VPC management console. • Auto-assign Public IP — Activated An EC2 security group is created and associated with the EC2 instance. The security group has the following inbound port rules: Deploy a default Amazon EC2 host for Volume Gateway API Version 2013-06-30 266 AWS Storage Gateway Volume Gateway User Guide Note You will need Port 80 open during gateway activation. The port is closed immediately following activation. Thereafter, your EC2 instance can only be accessed over the other ports from the selected VPC. The iSCSI targets on your gateway are only accessible from the hosts in the same VPC as the gateway. If the iSCSI targets need to be accessed from hosts outside of the VPC, you should update the appropriate security group rules. You can edit security groups at any time by navigating to the Amazon EC2 instance details page, selecting Security, navigating to Security group details, and choosing the security group ID. Port Protocol 80 TCP File System Protocol HTTP access for activation 3260 TCP iSCSI • Configure storage Default Settings AMI Root Volume Volume 2 Cache
storagegateway-vgw-ug-103
storagegateway-vgw-ug.pdf
103
from the selected VPC. The iSCSI targets on your gateway are only accessible from the hosts in the same VPC as the gateway. If the iSCSI targets need to be accessed from hosts outside of the VPC, you should update the appropriate security group rules. You can edit security groups at any time by navigating to the Amazon EC2 instance details page, selecting Security, navigating to Security group details, and choosing the security group ID. Port Protocol 80 TCP File System Protocol HTTP access for activation 3260 TCP iSCSI • Configure storage Default Settings AMI Root Volume Volume 2 Cache Volume 3 Cache Device Name '/dev/sdb' '/dev/sdc' Size 80 Gib 165 GiB 150 GiB Volume Type gp3 gp3 gp3 IOPS 3000 3000 3000 Deploy a default Amazon EC2 host for Volume Gateway API Version 2013-06-30 267 AWS Storage Gateway Volume Gateway User Guide Default Settings AMI Root Volume Volume 2 Cache Volume 3 Cache Yes Yes Yes Delete on terminati on Encrypted No Throughpu t 125 No 125 No 125 Deploy a customized Amazon EC2 instance for Volume Gateway You can deploy and activate a Volume Gateway on an Amazon Elastic Compute Cloud (Amazon EC2) instance. The AWS Storage Gateway Amazon Machine Image (AMI) is available as a community AMI. Note Storage Gateway community AMIs are published and fully supported by AWS. You can see that the publisher is AWS, a verified provider. Volume Gateway AMIs use the following naming convention. The version number appended to the AMI name changes with each version release. aws-storage-gateway-CLASSIC-2.9.0 To deploy an Amazon EC2 instance to host your Volume Gateway 1. Start setting up a new gateway using the Storage Gateway console. For instructions, see Set up a Volume Gateway. When you reach the Platform options section, choose Amazon EC2 as the Host platform, then use the following steps to launch the Amazon EC2 instance that will host your Volume Gateway. Deploy a customized Amazon EC2 instance for Volume Gateway API Version 2013-06-30 268 AWS Storage Gateway Note Volume Gateway User Guide The Amazon EC2 host platform supports Cached volumes only. Stored volume gateways cannot be deployed on EC2 instances. 2. Choose Launch instance to open the AWS Storage Gateway AMI template in the Amazon EC2 console, where you can configure additional settings. Use Quicklaunch to launch the Amazon EC2 instance with default settings. For more information on Amazon EC2 Quicklaunch default sepcifications, see Quicklaunch Configuration Specifications for Amazon EC2. 3. 4. For Name, enter a name for the Amazon EC2 instance. After the instance is deployed, you can search for this name to find your instance on list pages in the Amazon EC2 console. In the Instance type section, for Instance type, choose the hardware configuration for your instance. The hardware configuration must meet certain minimum requirements to support your gateway. We recommend starting with the m5.xlarge instance type, which meets the minimum hardware requirements for your gateway to function properly. For more information, see Requirements for Amazon EC2 instance types. You can resize your instance after you launch, if necessary. For more information, see Resizing your instance in the Amazon EC2 User Guide. Note Certain instance types, particularly i3 EC2, use NVMe SSD disks. These can cause problems when you start or stop Volume Gateway; for example, you can lose data from the cache. Monitor the CachePercentDirty Amazon CloudWatch metric, and only start or stop your system when that parameter is 0. To learn more about monitoring metrics for your gateway, see Storage Gateway metrics and dimensions in the CloudWatch documentation. 5. In the Key pair (login) section, for Key pair name - required, select the key pair you want to use to securely connect to your instance. You can create a new key pair if necessary. For more information, see Create a key pair in the Amazon Elastic Compute Cloud User Guide for Linux Instances. Deploy a customized Amazon EC2 instance for Volume Gateway API Version 2013-06-30 269 AWS Storage Gateway Volume Gateway User Guide 6. In the Network settings section, review the preconfigured settings and choose Edit to make changes to the following fields: a. b. For VPC - required, choose the VPC where you want to launch your Amazon EC2 instance. For more information, see How Amazon VPC works in the Amazon Virtual Private Cloud User Guide. (Optional) For Subnet, choose the subnet where you want to launch your Amazon EC2 instance. c. For Auto-assign Public IP, choose Enable. 7. In the Firewall (security groups) subsection, review the preconfigured settings. You can change the default name and description of the new security group to be created for your Amazon EC2 instance if you want, or choose to apply firewall rules from an existing security group instead. 8. In the Inbound security groups rules subsection, add firewall rules to open
storagegateway-vgw-ug-104
storagegateway-vgw-ug.pdf
104
EC2 instance. For more information, see How Amazon VPC works in the Amazon Virtual Private Cloud User Guide. (Optional) For Subnet, choose the subnet where you want to launch your Amazon EC2 instance. c. For Auto-assign Public IP, choose Enable. 7. In the Firewall (security groups) subsection, review the preconfigured settings. You can change the default name and description of the new security group to be created for your Amazon EC2 instance if you want, or choose to apply firewall rules from an existing security group instead. 8. In the Inbound security groups rules subsection, add firewall rules to open the ports that clients will use to connect to your instance. For more information on the ports required for Volume Gateway, see Port requirements. For more information on adding firewall rules, see Security group rules in the Amazon Elastic Compute Cloud User Guide for Linux Instances. Note Volume Gateway requires TCP port 80 to be open for inbound traffic and for one-time HTTP access during gateway activation. After activation, you can close this port. Additionally, you must open TCP port 3260 for iSCSI access. 9. In the Advanced network configuration subsection, review the preconfigured settings and make changes if necessary. 10. In the Configure storage section, choose Add new volume to add storage to your gateway instance. Important You must add at least one Amazon EBS volume with at least 165 GiB capacity for cache storage, and at least one Amazon EBS volume with at least 150 GiB capacity for upload buffer, in addition to the preconfigured Root volume. For increased performance, we recommend allocating multiple EBS volumes for cache storage with at least 150 GiB each. Deploy a customized Amazon EC2 instance for Volume Gateway API Version 2013-06-30 270 AWS Storage Gateway Volume Gateway User Guide 11. In the Advanced details section, review the preconfigured settings and make changes if necessary. 12. Choose Launch instance to launch your new Amazon EC2 gateway instance with the configured settings. 13. To verify that your new instance launched successfully, navigate to the Instances page in the Amazon EC2 console and search for your new instance by name. Ensure that that Instance state displays Running with a green check mark, and that the Status check is complete, and shows a green check mark. 14. Select your instance from the details page. Copy the Public IPv4 address from the Instance summary section, then return to the Set up gateway page in the Storage Gateway console to resume setting up your Volume Gateway. You can determine the AMI ID to use for launching a Volume Gateway by using the Storage Gateway console or by querying the AWS Systems Manager parameter store. To determine the AMI ID, do one of the following: • Start setting up a new gateway using the Storage Gateway console. For instructions, see Set up a Volume Gateway. When you reach the Platform options section, choose Amazon EC2 as the Host platform, then choose Launch instance to open the AWS Storage Gateway AMI template in the Amazon EC2 console. You are redirected to the EC2 community AMI page, where you can see the AMI ID for your AWS Region in the URL. • Query the Systems Manager parameter store. You can use the AWS CLI or Storage Gateway API to query the Systems Manager public parameter under the namespace /aws/service/ storagegateway/ami/CACHED/latest for Cached Volume Gateways or /aws/service/ storagegateway/ami/STORED/latest for Stored Volume Gateways. For example, using the following CLI command returns the ID of the current AMI in the AWS Region you specify. aws --region us-east-2 ssm get-parameter --name /aws/service/storagegateway/ami/ STORED/latest The CLI command returns output similar to the following. { "Parameter": { Deploy a customized Amazon EC2 instance for Volume Gateway API Version 2013-06-30 271 AWS Storage Gateway Volume Gateway User Guide "Type": "String", "LastModifiedDate": 1561054105.083, "Version": 4, "ARN": "arn:aws:ssm:us-east-2::parameter/aws/service/storagegateway/ami/ STORED/latest", "Name": "/aws/service/storagegateway/ami/STORED/latest", "Value": "ami-123c45dd67d891000" } } Modify Amazon EC2 instance metadata options The instance metadata service (IMDS) is an on-instance component that provides secure access to Amazon EC2 instance metadata. An instance can be configured to accept incoming metadata requests that use IMDS Version 1 (IMDSv1) or require that all metadata requests use IMDS Version 2 (IMDSv2). IMDSv2 uses session-oriented requests and mitigates several types of vulnerabilities that could be used to try to access the IMDS. For information about IMDSv2, see How Instance Metadata Service Version 2 works in the Amazon Elastic Compute Cloud User Guide. We recommend that you require IMDSv2 for all Amazon EC2 instances that host Storage Gateway. IMDSv2 is required by default on all newly launched gateway instances. If you have existing instances that are still configured to accept IMDSv1 metadata requests, see Require the use of IMDSv2 in the Amazon Elastic Compute Cloud User Guide for instructions to modify your instance metadata options to require
storagegateway-vgw-ug-105
storagegateway-vgw-ug.pdf
105
and mitigates several types of vulnerabilities that could be used to try to access the IMDS. For information about IMDSv2, see How Instance Metadata Service Version 2 works in the Amazon Elastic Compute Cloud User Guide. We recommend that you require IMDSv2 for all Amazon EC2 instances that host Storage Gateway. IMDSv2 is required by default on all newly launched gateway instances. If you have existing instances that are still configured to accept IMDSv1 metadata requests, see Require the use of IMDSv2 in the Amazon Elastic Compute Cloud User Guide for instructions to modify your instance metadata options to require the use of IMDSv2. Applying this change does not require an instance reboot. Synchronize VM time with Hyper-V or Linux KVM host time For a gateway deployed on VMware ESXi, setting the hypervisor host time and synchronizing the virtual machine time to the host is sufficient to avoid time drift. For more information, see Synchronize VM time with VMware host time. For a gateway deployed on Microsoft Hyper-V or Linux KVM, we recommend that you periodically check the virtual machine time using the procedure described following. To view and synchronize the time of a hypervisor gateway virtual machine to a Network Time Protocol (NTP) server 1. Log in to your gateway's local console: Modify Amazon EC2 instance metadata options API Version 2013-06-30 272 AWS Storage Gateway Volume Gateway User Guide • For more information on logging in to the Microsoft Hyper-V local console, see Access the Gateway Local Console with Microsoft Hyper-V. • For more information on logging in to the local console for Linux Kernel-based Virtual Machine (KVM), see Accessing the Gateway Local Console with Linux KVM. 2. On the Storage Gateway Configuration main menu screen, enter the corresponding numeral to select System Time Management. 3. On the System Time Management menu screen, enter the corresponding numeral to select View and Synchronize System Time. The gateway local console displays the current system time and compares it with the time reported by the NTP server, then reports the exact discrepancy between the two times in seconds. 4. If the time discrepancy is greater than 60 seconds, enter y to synchronize the system time with NTP time. Otherwise, enter n. Time synchronization might take a few moments. Synchronize VM time with VMware host time To successfully activate your gateway, you must ensure that your VM time is synchronized to the host time, and that the host time is correctly set. In this section, you first synchronize the time on the VM to the host time. Then you check the host time and, if needed, set the host time and configure the host to synchronize its time automatically to a Network Time Protocol (NTP) server. Important Synchronizing the VM time with the host time is required for successful gateway activation. To synchronize VM time with host time 1. Configure your VM time. a. In the vSphere client, right-click on the name of your gateway VM in panel on the left side of the application window to open the context menu for the VM, and then choose Edit Settings. Synchronize VM time with VMware host time API Version 2013-06-30 273 AWS Storage Gateway Volume Gateway User Guide The Virtual Machine Properties dialog box opens. b. Choose the Options tab, and then choose VMware Tools from the options list. c. Check the Synchronize guest time with host option in the Advanced section on the right side of the Virtual Machine Properties dialog box, and then choose OK. The VM synchronizes its time with the host. 2. Configure the host time. It is important to make sure that your host clock is set to the correct time. If you have not configured your host clock, perform the following steps to set and synchronize it with an NTP server. a. In the VMware vSphere client, select the vSphere host node in the left panel, and then choose the Configuration tab. b. Select Time Configuration in the Software panel, and then choose the Properties link. The Time Configuration dialog box appears. c. Under Date and Time, set the date and time for your vSphere host. d. Configure the host to synchronize its time automatically to an NTP server. i. Choose Options in the Time Configuration dialog box, and then in the NTP Daemon (ntpd) Options dialog box, choose NTP Settings in the left panel. ii. Choose Add to add a new NTP server. iii. In the Add NTP Server dialog box, type the IP address or the fully qualified domain name of an NTP server, and then choose OK. You can use pool.ntp.org as the domain name. iv. In the NTP Daemon (ntpd) Options dialog box, choose General in the left panel. v. Under Service Commands, choose Start to start the service. Note that if you change
storagegateway-vgw-ug-106
storagegateway-vgw-ug.pdf
106
server. i. Choose Options in the Time Configuration dialog box, and then in the NTP Daemon (ntpd) Options dialog box, choose NTP Settings in the left panel. ii. Choose Add to add a new NTP server. iii. In the Add NTP Server dialog box, type the IP address or the fully qualified domain name of an NTP server, and then choose OK. You can use pool.ntp.org as the domain name. iv. In the NTP Daemon (ntpd) Options dialog box, choose General in the left panel. v. Under Service Commands, choose Start to start the service. Note that if you change this NTP server reference or add another later, you will need to restart the service to use the new server. e. f. Choose OK to close the NTP Daemon (ntpd) Options dialog box. Choose OK to close the Time Configuration dialog box. Synchronize VM time with VMware host time API Version 2013-06-30 274 AWS Storage Gateway Volume Gateway User Guide Configuring paravirtualization on a VMware host The following procedure describes how to configure the VMware host platform for your Storage Gateway appliance to use paravirtual Internet Small Computer System Interface Protocol (iSCSI) controllers. Paravirtual iSCSI controllers are high performance storage controllers that can result in greater throughput and lower CPU use. These controllers are best suited for high performance storage environments. When you configure iSCSI controllers this way, the Storage Gateway virtual machine works with the host operating system to allow the gateway console to identify the virtual disks that you add to your virtual machine. Note You need to complete this step to avoid issues in identifying these disks when you configure them in the gateway console. To configure your VMware host platform to use paravirtualized controllers 1. In the VMware vSphere client, right-click on the name of your gateway virtual machine in the navigation pane on the left side of the application window to open the context menu, and then choose Edit Settings. 2. In the Virtual Machine Properties dialog box, choose the Hardware tab. 3. On the Hardware tab, select SCSI controller 0, and then choose Change Type. 4. In the Change SCSI Controller Type dialog box, select the VMware Paravirtual SCSI controller type, and then choose OK to save the configuration. Configuring network adapters for your gateway By default, Storage Gateway is configured to use the E1000 network adapter type, but you can reconfigure your gateway to use the VMXNET3 (10 GbE) network adapter. You can also configure Storage Gateway so it can be accessed by more than one IP address. You do this by configuring your gateway to use more than one network adapter. Topics • Configuring Your Gateway to Use the VMXNET3 Network Adapter • Configuring Your Gateway for Multiple NICs Configure paravirtualized disk controllers API Version 2013-06-30 275 AWS Storage Gateway Volume Gateway User Guide Configuring Your Gateway to Use the VMXNET3 Network Adapter Storage Gateway supports the E1000 network adapter type in both VMware ESXi and Microsoft Hyper-V hypervisor hosts. However, the VMXNET3 (10 GbE) network adapter type is supported in VMware ESXi hypervisor only. If your gateway is hosted on a VMware ESXi hypervisor, you can reconfigure your gateway to use the VMXNET3 (10 GbE) adapter type. For more information on these adapters, see Choosing a network adapter for your virtual machine on the Broadcom (VMware) website. Important To select VMXNET3, your guest operating system type must be Other Linux64. Following are the steps you take to configure your gateway to use the VMXNET3 adapter: 1. Remove the default E1000 adapter. 2. Add the VMXNET3 adapter. 3. Restart your gateway. 4. Configure the adapter for the network. Details on how to perform each step follow. To remove the default E1000 adapter and configure your gateway to use the VMXNET3 adapter 1. 2. 3. In VMware, open the context (right-click) menu for your gateway and choose Edit Settings. In the Virtual Machine Properties window, choose the Hardware tab. For Hardware, choose Network adapter. Notice that the current adapter is E1000 in the Adapter Type section. You will replace this adapter with the VMXNET3 adapter. 4. Choose the E1000 network adapter, and then choose Remove. In this example, the E1000 network adapter is Network adapter 1. Note Although you can run the E1000 and VMXNET3 network adapters in your gateway at the same time, we don't recommend doing so because it can cause network problems. Configuring network adapters for your gateway API Version 2013-06-30 276 AWS Storage Gateway Volume Gateway User Guide 5. Choose Add to open the Add Hardware wizard. 6. Choose Ethernet Adapter, and then choose Next. 7. 8. In the Network Type wizard, select VMXNET3 for Adapter Type, and then choose Next. In the Virtual Machine properties wizard, verify in the Adapter Type section that Current Adapter is set to
storagegateway-vgw-ug-107
storagegateway-vgw-ug.pdf
107
Network adapter 1. Note Although you can run the E1000 and VMXNET3 network adapters in your gateway at the same time, we don't recommend doing so because it can cause network problems. Configuring network adapters for your gateway API Version 2013-06-30 276 AWS Storage Gateway Volume Gateway User Guide 5. Choose Add to open the Add Hardware wizard. 6. Choose Ethernet Adapter, and then choose Next. 7. 8. In the Network Type wizard, select VMXNET3 for Adapter Type, and then choose Next. In the Virtual Machine properties wizard, verify in the Adapter Type section that Current Adapter is set to VMXNET3, and then choose OK. 9. In the VMware VSphere client, shut down your gateway. 10. In the VMware VSphere client, restart your gateway. After your gateway restarts, reconfigure the adapter you just added to make sure that network connectivity to the internet is established. To configure the adapter for the network 1. In the VSphere client, choose the Console tab to start the local console. Use the default login credentials to log in to the gateway's local console for this configuration task. For information about how to log in using the default credentials, see Logging in to the Local Console Using Default Credentials. 2. At the prompt, enter the corresponding numeral to select Network Configuration. 3. At the prompt, enter the corresponding numeral to select Reset all to DHCP, and then enter y (for yes) at the prompt to set all adapters to use Dynamic Host Configuration Protocol (DHCP). All available adapters are set to use DHCP. If your gateway is already activated, you must shut it down and restart it from the Storage Gateway Management Console. After the gateway restarts, you must test network connectivity to the internet. For information about how to test network connectivity, see Testing Your Gateway Connection to the Internet. Configuring Your Gateway for Multiple NICs If you configure your gateway to use multiple network adapters (NICs), it can be accessed by more than one IP address. You might want to do this in the following situations: • Maximizing throughput – You might want to maximize throughput to a gateway when network adapters are a bottleneck. Configuring network adapters for your gateway API Version 2013-06-30 277 AWS Storage Gateway Volume Gateway User Guide • Application separation – You might need to separate how your applications write to a gateway's volumes. For example, you might choose to have a critical storage application exclusively use one particular adapter defined for your gateway. • Network constraints – Your application environment might require that you keep your iSCSI targets and the initiators that connect to them in an isolated network that is different from the network by which the gateway communicates with AWS. In a typical multiple-adapter use case, one adapter is configured as the route by which the gateway communicates with AWS (that is, as the default gateway). Except for this one adapter, initiators must be in the same subnet as the adapter that contains the iSCSI targets to which they connect. Otherwise, communication with the intended targets might not be possible. If a target is configured on the same adapter that is used for communication with AWS, then iSCSI traffic for that target and AWS traffic will flow through the same adapter. When you configure one adapter to connect to the Storage Gateway console and then add a second adapter, Storage Gateway automatically configures the route table to use the second adapter as the preferred route. For instructions on how to configure multiple-adapters, see the following sections. • Configuring multiple network adapters on a VMware ESXi host • Configuring multiple network adapters on Microsoft Hyper-V host Configuring multiple network adapters on a VMware ESXi host The following procedure assumes that your gateway VM already has one network adapter defined, and describes how to add an adapter on VMware ESXi. To configure your gateway to use an additional network adapter in VMware ESXi host 1. 2. 3. Shut down the gateway. In the VMware vSphere client, select your gateway VM. The VM can remain turned on for this procedure. In the client, open the context (right-click) menu for your gateway VM, and choose Edit Settings. 4. On the Hardware tab of the Virtual Machine Properties dialog box, choose Add to add a device. Configuring network adapters for your gateway API Version 2013-06-30 278 AWS Storage Gateway Volume Gateway User Guide 5. Follow the Add Hardware wizard to add a network adapter. a. b. In the Device Type pane, choose Ethernet Adapter to add an adapter, and then choose Next. In the Network Type pane, ensure that Connect at power on is selected for Type, and then choose Next. We recommend that you use the VMXNET3 network adapter with Storage Gateway. For more information on the adapter types
storagegateway-vgw-ug-108
storagegateway-vgw-ug.pdf
108
the Hardware tab of the Virtual Machine Properties dialog box, choose Add to add a device. Configuring network adapters for your gateway API Version 2013-06-30 278 AWS Storage Gateway Volume Gateway User Guide 5. Follow the Add Hardware wizard to add a network adapter. a. b. In the Device Type pane, choose Ethernet Adapter to add an adapter, and then choose Next. In the Network Type pane, ensure that Connect at power on is selected for Type, and then choose Next. We recommend that you use the VMXNET3 network adapter with Storage Gateway. For more information on the adapter types that might appear in the adapter list, see Network Adapter Types in the ESXi and vCenter Server Documentation. c. In the Ready to Complete pane, review the information, and then choose Finish. 6. Choose the Summary tab for the VM, and choose View All next to the IP Address box. The Virtual Machine IP Addresses window displays all the IP addresses you can use to access the gateway. Confirm that a second IP address is listed for the gateway. Note It might take several moments for the adapter changes to take effect and the VM summary information to refresh. 7. 8. In the Storage Gateway console, turn on the gateway. In the Navigation pane of the Storage Gateway console, choose Gateways and choose the gateway to which you added the adapter. Confirm that the second IP address is listed in the Details tab. For information about local console tasks common to VMware, Hyper-V, and KVM hosts, see Performing Tasks on the VM Local Console Configuring multiple network adapters on Microsoft Hyper-V host The following procedure assumes that your gateway VM already has one network adapter defined and that you are adding a second adapter. This procedure shows how to add an adapter for a Microsoft Hyper-V host. To configure your gateway to use an additional network adapter in a Microsoft Hyper-V Host 1. On the Storage Gateway console, turn off the gateway. 2. In the Microsoft Hyper-V Manager, select your gateway VM from the Virtual Machines panel. Configuring network adapters for your gateway API Version 2013-06-30 279 AWS Storage Gateway Volume Gateway User Guide 3. If the gateway VM isn't turned off already, right-click the VM name to open the context menu, and then choose Turn Off. 4. Right-click the gateway VM name to open the context menu, and then choose Settings. 5. 6. In the Settings dialog box, under Hardware, choose Add Hardware. In the Add Hardware panel on the right side of the Settings dialog box, choose Network Adapter, and then choose Add to add a device. 7. Configure the network adapter, and then choose Apply to apply settings. 8. In the Settings dialog box, under Hardware, confirm that the new network adapter was added to the hardware list, and then choose OK. 9. Turn on the gateway using the Storage Gateway console. 10. In the Navigation panel of the Storage Gateway console, choose Gateways, then select the gateway to which you added the adapter. Confirm that a second IP address is listed in the Details tab. For information about local console tasks common to VMware, Hyper-V, and KVM hosts, see Performing Tasks on the VM Local Console Using VMware vSphere High Availability with Storage Gateway Storage Gateway provides high availability on VMware through a set of application-level health checks integrated with VMware vSphere High Availability (VMware HA). This approach helps protect storage workloads against hardware, hypervisor, or network failures. It also helps protect against software errors, such as connection timeouts and file share or volume unavailability. vSphere HA works by pooling virtual machines and the hosts they reside on into a cluster for redundancy. Hosts in the cluster are monitored and in the event of a failure, the virtual machines on a failed host are restarted on alternate hosts. Generally, this recovery happens quickly and without data loss. For more information about vSphere HA, see How vSphere HA Works in the VMware documentation. Note The time required to restart a failed virtual machine and re-establish the iSCSI connection on a new host depends on many factors, such as the host operating system and resource load, disk speed, network connection, and SAN/storage infrastructure. To minimize failover downtime, implement the recommendations outlined in Optimizing Gateway Performance. Using VMware High Availability with Storage Gateway API Version 2013-06-30 280 AWS Storage Gateway Volume Gateway User Guide To use Storage Gateway with VMware HA, we recommend doing the following things: • Deploy the VMware ESX .ova downloadable package that contains the Storage Gateway VM on only one host in a cluster. • When deploying the .ova package, select a data store that is not local to one host. Instead, use a data store that is accessible to all hosts in the cluster.
storagegateway-vgw-ug-109
storagegateway-vgw-ug.pdf
109
network connection, and SAN/storage infrastructure. To minimize failover downtime, implement the recommendations outlined in Optimizing Gateway Performance. Using VMware High Availability with Storage Gateway API Version 2013-06-30 280 AWS Storage Gateway Volume Gateway User Guide To use Storage Gateway with VMware HA, we recommend doing the following things: • Deploy the VMware ESX .ova downloadable package that contains the Storage Gateway VM on only one host in a cluster. • When deploying the .ova package, select a data store that is not local to one host. Instead, use a data store that is accessible to all hosts in the cluster. If you select a data store that is local to a host and the host fails, then the data source might not be accessible to other hosts in the cluster and failover to another host might not succeed. • To prevent your initiator from disconnecting from storage volume targets during failover, follow the recommended iSCSI settings for your operating system. In a failover event, it can take from a few seconds to several minutes for a gateway VM to start in a new host in the failover cluster. The recommended iSCSI timeouts for both Windows and Linux clients are greater than the typical time it takes for failover to occur. For more information on customizing Windows clients' timeout settings, see Customizing Your Windows iSCSI Settings. For more information on customizing Linux clients' timeout settings, see Customizing Your Linux iSCSI Settings. • With clustering, if you deploy the .ova package to the cluster, select a host when you are prompted to do so. Alternately, you can deploy directly to a host in a cluster. The following topics describe how to deploy Storage Gateway in a VMware HA cluster: Topics • Configure Your vSphere VMware HA Cluster • Download the .ova Image from the Storage Gateway console • Deploy the Gateway • (Optional) Add Override Options for Other VMs on Your Cluster • Activate Your Gateway • Test Your VMware High Availability Configuration Configure Your vSphere VMware HA Cluster First, if you haven’t already created a VMware cluster, create one. For information about how to create a VMware cluster, see Create a vSphere HA Cluster in the VMware documentation. Next, configure your VMware cluster to work with Storage Gateway. Using VMware High Availability with Storage Gateway API Version 2013-06-30 281 AWS Storage Gateway Volume Gateway User Guide To configure your VMware cluster 1. On the Edit Cluster Settings page in VMware vSphere, make sure that VM monitoring is configured for VM and application monitoring. To do so, set the following values for each option: • Host Failure Response: Restart VMs • Response for Host Isolation: Shut down and restart VMs • Datastore with PDL: Disabled • Datastore with APD: Disabled • VM Monitoring: VM and Application Monitoring 2. Fine-tune the sensitivity of the cluster by adjusting the following values: • Failure interval – After this interval, the VM is restarted if a VM heartbeat isn't received. • Minimum uptime – The cluster waits this long after a VM starts to begin monitoring for VM tools' heartbeats. • Maximum per-VM resets – The cluster restarts the VM a maximum of this many times within the maximum resets time window. • Maximum resets time window – The window of time in which to count the maximum resets per-VM resets. If you aren't sure what values to set, use these example settings: • Failure interval: 30 seconds • Minimum uptime: 120 seconds • Maximum per-VM resets: 3 • Maximum resets time window: 1 hour If you have other VMs running on the cluster, you might want to set these values specifically for your VM. You can't do this until you deploy the VM from the .ova. For more information on setting these values, see (Optional) Add Override Options for Other VMs on Your Cluster. Using VMware High Availability with Storage Gateway API Version 2013-06-30 282 AWS Storage Gateway Volume Gateway User Guide Download the .ova Image from the Storage Gateway console To download the .ova image for your gateway • On the Set up gateway page in the Storage Gateway console, select your gateway type and host platform, then use the link provided in the console to download the .ova as outlined in Set up a Volume Gateway. Deploy the Gateway In your configured cluster, deploy the .ova image to one of the cluster's hosts. To deploy the gateway .ova image 1. Deploy the .ova image to one of the hosts in the cluster. 2. Make sure the data stores that you choose for the root disk and the cache are available to all hosts in the cluster. When deploying the Storage Gateway .ova file in a VMware or on-prem environment, the disks are described as paravirtualized SCSI disks. Paravirtualization is a mode where the
storagegateway-vgw-ug-110
storagegateway-vgw-ug.pdf
110
console to download the .ova as outlined in Set up a Volume Gateway. Deploy the Gateway In your configured cluster, deploy the .ova image to one of the cluster's hosts. To deploy the gateway .ova image 1. Deploy the .ova image to one of the hosts in the cluster. 2. Make sure the data stores that you choose for the root disk and the cache are available to all hosts in the cluster. When deploying the Storage Gateway .ova file in a VMware or on-prem environment, the disks are described as paravirtualized SCSI disks. Paravirtualization is a mode where the gateway VM works with the host operating system so the console can identify the virtual disks that you add to your VM. To configure your VM to use paravirtualized controllers 1. In the VMware vSphere client, open the context (right-click) menu for your gateway VM, and then choose Edit Settings. 2. In the Virtual Machine Properties dialog box, choose the Hardware tab, select the SCSI controller 0, and then choose Change Type. 3. In the Change SCSI Controller Type dialog box, select the VMware Paravirtual SCSI controller type, and then choose OK. (Optional) Add Override Options for Other VMs on Your Cluster If you have other VMs running on your cluster, you might want to set the cluster values specifically for each VM. For instructions, see Customize an Individual Virtual Machine in the VMware vSphere online documentation. Using VMware High Availability with Storage Gateway API Version 2013-06-30 283 AWS Storage Gateway Volume Gateway User Guide To add override options for other VMs on your cluster 1. On the Summary page in VMware vSphere, choose your cluster to open the cluster page, and then choose Configure. 2. Choose the Configuration tab, and then choose VM Overrides. 3. Add a new VM override option to change each value. Set the following values for each option under vSphere HA - VM Monitoring: • VM Monitoring: Override Enabled - VM and Application Monitoring • VM monitoring sensitivity: Override Enabled - VM and Application Monitoring • VM Monitoring: Custom • Failure interval: 30 seconds • Minimum uptime: 120 seconds • Maximum per-VM resets: 5 • Maximum resets time window: Within 1 hrs Activate Your Gateway After the .ova for your gateway is deployed, activate your gateway. The instructions about how are different for each gateway type. To activate your gateway • Follow the procedures outlined in the following topics: a. Connect your Volume Gateway to AWS b. Review settings and activate your Volume Gateway c. Configure your Volume Gateway Test Your VMware High Availability Configuration After you activate your gateway, test your configuration. Using VMware High Availability with Storage Gateway API Version 2013-06-30 284 AWS Storage Gateway Volume Gateway User Guide To test your VMware HA configuration 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. On the navigation pane, choose Gateways, and then choose the gateway that you want to test for VMware HA. For Actions, choose Verify VMware HA. In the Verify VMware High Availability Configuration box that appears, choose OK. 3. 4. Note Testing your VMware HA configuration reboots your gateway VM and interrupts connectivity to your gateway. The test might take a few minutes to complete. If the test is successful, the status of Verified appears in the details tab of the gateway in the console. 5. Choose Exit. You can find information about VMware HA events in the Amazon CloudWatch log groups. For more information, see Getting Volume Gateway Health Logs with CloudWatch Log Groups. Working with Volume Gateway storage resources The topics in this section describe how you can manage the storage resources that are associated with your Volume Gateway appliance and its virtual host platform. This includes resources such as the physical disks attached to a gateway's hypervisor host platform, with specific procedures for removing disks from VMware vSphere ESXi, Microsoft Hyper-V, or Linux Kernel-based Virtual Machine (KVM) virtualization hosts. This also includes managing the Amazon EBS volumes attached to a gateway's Amazon EC2 instance for gateways hosted on Amazon EC2 in the AWS cloud. Topics • Removing Disks from Your Gateway - Learn about what to do if you need to remove a disk from the VMware vSphere ESXi, Microsoft Hyper-V, or Linux Kernel-based Virtual Machine (KVM) virtualization host platform for your gateway, for example if you have a physical disk failure. Working with Volume Gateway storage resources API Version 2013-06-30 285 AWS Storage Gateway Volume Gateway User Guide • Managing Amazon EBS volumes on Amazon EC2 gateways - Learn about how you can increase or reduce the quanity of Amazon EBS volumes that are allocated for use as upload buffer or cache storage for a gateway that is hosted on an Amazon EC2 instance, for example, if your application storage needs increase or decrease over
storagegateway-vgw-ug-111
storagegateway-vgw-ug.pdf
111
VMware vSphere ESXi, Microsoft Hyper-V, or Linux Kernel-based Virtual Machine (KVM) virtualization host platform for your gateway, for example if you have a physical disk failure. Working with Volume Gateway storage resources API Version 2013-06-30 285 AWS Storage Gateway Volume Gateway User Guide • Managing Amazon EBS volumes on Amazon EC2 gateways - Learn about how you can increase or reduce the quanity of Amazon EBS volumes that are allocated for use as upload buffer or cache storage for a gateway that is hosted on an Amazon EC2 instance, for example, if your application storage needs increase or decrease over time. Removing Disks from Your Gateway Although we don’t recommend removing the underlying disks from your gateway, you might want to remove a disk from your gateway, for example if you have a failed disk. Removing a Disk from a Gateway Hosted on VMware ESXi You can use the following procedure to remove a disk from your gateway hosted on VMware hypervisor. To remove a disk allocated for the upload buffer (VMware ESXi) 1. In the vSphere client, open the context (right-click) menu, choose the name of your gateway VM, and then choose Edit Settings. 2. On the Hardware tab of the Virtual Machine Properties dialog box, select the disk allocated as upload buffer space, and then choose Remove. Verify that the Virtual Device Node value in the Virtual Machine Properties dialog box has the same value that you noted previously. Doing this helps ensure that you remove the correct disk. 3. Choose an option in the Removal Options panel, and then choose OK to complete the process of removing the disk. Removing a Disk from a Gateway Hosted on Microsoft Hyper-V Using the following procedure, you can remove a disk from your gateway hosted on a Microsoft Hyper-V hypervisor. To remove an underlying disk allocated for the upload buffer (Microsoft Hyper-V) 1. In the Microsoft Hyper-V Manager, open the context (right-click) menu, choose the name of your gateway VM, and then choose Settings. Removing Disks from Your Gateway API Version 2013-06-30 286 AWS Storage Gateway Volume Gateway User Guide 2. In the Hardware list of the Settings dialog box, select the disk to remove, and then choose Remove. The disks you add to a gateway appear under the SCSI Controller entry in the Hardware list. Verify that the Controller and Location value are the same value that you noted previously. Doing this helps ensure that you remove the correct disk. The first SCSI controller displayed in the Microsoft Hyper-V Manager is controller 0. 3. Choose OK to apply the change. Removing a Disk from a Gateway Hosted on Linux KVM To detach a disk from your gateway hosted on Linux Kernel-based Virtual Machine (KVM) hypervisor, you can use a virsh command similar to the one following. $ virsh detach-disk domain_name /device/path For more details about managing KVM disks, see documentation of your Linux distribution. Managing Amazon EBS volumes on Amazon EC2 gateways When you initially configured your gateway to run as an Amazon EC2 instance, you allocated Amazon EBS volumes for use as an upload buffer and cache storage. Over time, as your applications needs change, you can allocate additional Amazon EBS volumes for this use. You can also reduce the storage you allocated by removing previously allocated Amazon EBS volumes. For more information about Amazon EBS, see Amazon Elastic Block Store (Amazon EBS) in the Amazon EC2 User Guide. Before you add more storage to the gateway, you should review how to size your upload buffer and cache storage based on your application needs for a gateway. To do so, see Determining the size of upload buffer to allocate and Determining the size of cache storage to allocate. There are quotas on the maximum storage you can allocate as an upload buffer and cache storage. You can attach as many Amazon EBS volumes to your instance as you want, but you can only configure these volumes as upload buffer and cache storage space up to these storage quotas. For more information, see AWS Storage Gateway quotas. EBS Volumes for EC2 Gateways API Version 2013-06-30 287 AWS Storage Gateway Volume Gateway User Guide To add an Amazon EBS volume and configure it for your gateway 1. Create an Amazon EBS volume. For instructions, see Creating or Restoring an Amazon EBS Volume in the Amazon EC2 User Guide. 2. Attach the Amazon EBS volume to your Amazon EC2 instance. For instructions, see Attaching an Amazon EBS Volume to an Instance in the Amazon EC2 User Guide. 3. Configure the Amazon EBS volume you added as either an upload buffer or cache storage. For instructions, see Managing local disks for your Storage Gateway. There are times you might find you don’t need the amount of storage you allocated for the upload
storagegateway-vgw-ug-112
storagegateway-vgw-ug.pdf
112
and configure it for your gateway 1. Create an Amazon EBS volume. For instructions, see Creating or Restoring an Amazon EBS Volume in the Amazon EC2 User Guide. 2. Attach the Amazon EBS volume to your Amazon EC2 instance. For instructions, see Attaching an Amazon EBS Volume to an Instance in the Amazon EC2 User Guide. 3. Configure the Amazon EBS volume you added as either an upload buffer or cache storage. For instructions, see Managing local disks for your Storage Gateway. There are times you might find you don’t need the amount of storage you allocated for the upload buffer. To remove an Amazon EBS volume Warning These steps apply only for Amazon EBS volumes allocated as upload buffer space, not for volumes allocated to cache. 1. Shut down the gateway by following the approach described in the Shutting Down Your Gateway VM section. 2. Detach the Amazon EBS volume from your Amazon EC2 instance. For instructions, see Detaching an Amazon EBS Volume from an Instance in the Amazon EC2 User Guide. 3. Delete the Amazon EBS volume. For instructions, see Deleting an Amazon EBS Volume in the Amazon EC2 User Guide. 4. Start the gateway by following the approach described in the Shutting Down Your Gateway VM section. Getting an activation key for your gateway To receive an activation key for your gateway, make a web request to the gateway virtual machine (VM). The VM returns a redirect that contains the activation key, which is passed as one of the parameters for the ActivateGateway API action to specify the configuration of your gateway. For more information, see ActivateGateway in the Storage Gateway API Reference. Getting Activation Key API Version 2013-06-30 288 AWS Storage Gateway Note Gateway activation keys expire in 30 minutes if unused. Volume Gateway User Guide The request that you make to the gateway VM includes the AWS Region where the activation occurs. The URL that's returned by the redirect in the response contains a query string parameter called activationkey. This query string parameter is your activation key. The format of the query string looks like the following: http://gateway_ip_address/? activationRegion=activation_region. The output of this query returns both activation region and key. The URL also includes vpcEndpoint, the VPC Endpoint ID for gateways that connect using the VPC endpoint type. Note The Storage Gateway Hardware Appliance, VM image templates, and Amazon EC2 Amazon Machine Images (AMI) come preconfigured with the HTTP services necessary to receive and respond to the web requests described on this page. It's not required or recommended to install any additional services on your gateway. Topics • Linux (curl) • Linux (bash/zsh) • Microsoft Windows PowerShell • Using your local console Linux (curl) The following examples show you how to get an activation key using Linux (curl). Note Replace the highlighted variables with actual values for your gateway. Acceptable values are as follows: Linux (curl) API Version 2013-06-30 289 AWS Storage Gateway Volume Gateway User Guide • gateway_ip_address - The IPv4 address of your gateway, for example 172.31.29.201 • gateway_type - The type of gateway you want to activate, such as STORED, CACHED, VTL, FILE_S3, or FILE_FSX_SMB. • region_code - The Region where you want to activate your gateway. See Regional endpoints in the AWS General Reference Guide. If this parameter is not specified, or if the value provided is misspelled or doesn't match a valid region, the command will default to the us-east-1 region. • vpc_endpoint - The VPC endpoint name for your gateway, for example vpce-050f90485f28f2fd0-iep0e8vq.storagegateway.us- west-2.vpce.amazonaws.com. To get the activation key for a public endpoint: curl "http://gateway_ip_address/?activationRegion=region_code&no_redirect" To get the activation key for a VPC endpoint: curl "http://gateway_ip_address/? activationRegion=region_code&vpcEndpoint=vpc_endpoint&no_redirect" Linux (bash/zsh) The following example shows you how to use Linux (bash/zsh) to fetch the HTTP response, parse HTTP headers, and get the activation key. function get-activation-key() { local ip_address=$1 local activation_region=$2 if [[ -z "$ip_address" || -z "$activation_region" || -z "$gateway_type" ]]; then echo "Usage: get-activation-key ip_address activation_region gateway_type" return 1 fi Linux (bash/zsh) API Version 2013-06-30 290 AWS Storage Gateway Volume Gateway User Guide if redirect_url=$(curl -f -s -S -w '%{redirect_url}' "http://$ip_address/? activationRegion=$activation_region&gatewayType=$gateway_type"); then activation_key_param=$(echo "$redirect_url" | grep -oE 'activationKey=[A-Z0-9-]+') echo "$activation_key_param" | cut -f2 -d= else return 1 fi } Microsoft Windows PowerShell The following example shows you how to use Microsoft Windows PowerShell to fetch the HTTP response, parse HTTP headers, and get the activation key. function Get-ActivationKey { [CmdletBinding()] Param( [parameter(Mandatory=$true)][string]$IpAddress, [parameter(Mandatory=$true)][string]$ActivationRegion, [parameter(Mandatory=$true)][string]$GatewayType ) PROCESS { $request = Invoke-WebRequest -UseBasicParsing -Uri "http://$IpAddress/? activationRegion=$ActivationRegion&gatewayType=$GatewayType" -MaximumRedirection 0 - ErrorAction SilentlyContinue if ($request) { $activationKeyParam = $request.Headers.Location | Select-String -Pattern "activationKey=([A-Z0-9-]+)" $activationKeyParam.Matches.Value.Split("=")[1] } } } Using your local console The following example shows you how to use your local console to generate and display an activation key. To get an activation key for your gateway from your local console 1.
storagegateway-vgw-ug-113
storagegateway-vgw-ug.pdf
113
} Microsoft Windows PowerShell The following example shows you how to use Microsoft Windows PowerShell to fetch the HTTP response, parse HTTP headers, and get the activation key. function Get-ActivationKey { [CmdletBinding()] Param( [parameter(Mandatory=$true)][string]$IpAddress, [parameter(Mandatory=$true)][string]$ActivationRegion, [parameter(Mandatory=$true)][string]$GatewayType ) PROCESS { $request = Invoke-WebRequest -UseBasicParsing -Uri "http://$IpAddress/? activationRegion=$ActivationRegion&gatewayType=$GatewayType" -MaximumRedirection 0 - ErrorAction SilentlyContinue if ($request) { $activationKeyParam = $request.Headers.Location | Select-String -Pattern "activationKey=([A-Z0-9-]+)" $activationKeyParam.Matches.Value.Split("=")[1] } } } Using your local console The following example shows you how to use your local console to generate and display an activation key. To get an activation key for your gateway from your local console 1. Log in to your local console. If you are connecting to your Amazon EC2 instance from a Windows computer, log in as admin. Microsoft Windows PowerShell API Version 2013-06-30 291 AWS Storage Gateway Volume Gateway User Guide 2. After you log in and see the AWS Appliance Activation - Configuration main menu, select 0 to choose Get activation key. 3. Select Storage Gateway for gateway family option. 4. When prompted, enter the AWS Region where you want to activate your gateway. 5. 6. Enter 1 for Public or 2 for VPC endpoint as the network type. Enter 1 for Standard or 2 for Federal Information Processing Standard (FIPS) as the endpoint Type. Connecting iSCSI Initiators When managing your gateway, you work with volumes or virtual tape library (VTL) devices that are exposed as Internet Small Computer System Interface (iSCSI) targets. For Volume Gateways, the iSCSI targets are volumes. For Tape Gateways, the targets are VTL devices. As part of this work, you do such tasks as connecting to those targets, customizing iSCSI settings, connecting from a Red Hat Linux client, and configuring Challenge-Handshake Authentication Protocol (CHAP). Topics • Connecting to your volumes from a Windows client • Connecting your volumes to a Linux client • Customizing iSCSI Settings • Configuring CHAP Authentication for Your iSCSI Targets The iSCSI standard is an Internet Protocol (IP)–based storage networking standard for initiating and managing connections between IP-based storage devices and clients. The following list defines some of the terms that are used to describe the iSCSI connection and the components involved. iSCSI initiator The client component of an iSCSI network. The initiator sends requests to the iSCSI target. Initiators can be implemented in software or hardware. Storage Gateway only supports software initiators. iSCSI target The server component of the iSCSI network that receives and responds to requests from initiators. Each of your volumes is exposed as an iSCSI target. Connect only one iSCSI initiator to each iSCSI target. Connecting iSCSI Initiators API Version 2013-06-30 292 AWS Storage Gateway Microsoft iSCSI initiator Volume Gateway User Guide The software program on Microsoft Windows computers that allows you to connect a client computer (that is, the computer running the application whose data you want to write to the gateway) to an external iSCSI-based array (that is, the gateway). The connection is made using the host computer's Ethernet network adapter card. The Microsoft iSCSI initiator has been validated with Storage Gateway on Windows Server 2022. The initiator is built into the operating system. Red Hat iSCSI initiator The iscsi-initiator-utils Resource Package Manager (RPM) package provides you with an iSCSI initiator implemented in software for Red Hat Linux. The package includes a server daemon for the iSCSI protocol. Each type of gateway can connect to iSCSI devices, and you can customize those connections, as described following. Connecting to your volumes from a Windows client A Volume Gateway exposes volumes you have created for the gateway as iSCSI targets. For more information, see Connecting your volumes to your client. Note To connect to your volume target, your gateway must have an upload buffer configured. If an upload buffer is not configured for your gateway, then the status of your volumes is displayed as UPLOAD BUFFER NOT CONFIGURED. To configure an upload buffer for a gateway in a stored volumes setup, see To configure additional upload buffer or cache storage for your gateway. To configure an upload buffer for a gateway in a cached volumes setup, see To configure additional upload buffer or cache storage for your gateway. The following diagram highlights the iSCSI target in the larger picture of the Storage Gateway architecture. For more information, see How Volume Gateway works. Connecting to your volumes from a Windows client API Version 2013-06-30 293 AWS Storage Gateway Volume Gateway User Guide You can connect to your volume from either a Windows or Red Hat Linux client. You can optionally configure CHAP for either client type. Your gateway exposes your volume as an iSCSI target with a name you specify, prepended by iqn.1997-05.com.amazon:. For example, if you specify a target name of myvolume, then the iSCSI target you use to connect to the volume is iqn.1997-05.com.amazon:myvolume. For more information about how
storagegateway-vgw-ug-114
storagegateway-vgw-ug.pdf
114
the Storage Gateway architecture. For more information, see How Volume Gateway works. Connecting to your volumes from a Windows client API Version 2013-06-30 293 AWS Storage Gateway Volume Gateway User Guide You can connect to your volume from either a Windows or Red Hat Linux client. You can optionally configure CHAP for either client type. Your gateway exposes your volume as an iSCSI target with a name you specify, prepended by iqn.1997-05.com.amazon:. For example, if you specify a target name of myvolume, then the iSCSI target you use to connect to the volume is iqn.1997-05.com.amazon:myvolume. For more information about how to configure your applications to mount volumes over iSCSI, see Connecting to your volumes from a Windows client. To See Connect to your volume from Windows. Connecting to a Microsoft Windows Client Connect to your volume from Red Hat Linux. Connecting to a Red Hat Enterprise Linux Client Configure CHAP authentication for Windows and Red Hat Linux. Configuring CHAP Authentication for Your iSCSI Targets Connecting to your volumes from a Windows client API Version 2013-06-30 294 AWS Storage Gateway Volume Gateway User Guide To connect your Windows client to a storage volume 1. On the Start menu of your Windows client computer, enter iscsicpl.exe in the Search Programs and files box, locate the iSCSI initiator program, and then run it. Note You must have administrator rights on the client computer to run the iSCSI initiator. 2. 3. 4. If prompted, choose Yes to start the Microsoft iSCSI initiator service. In the iSCSI Initiator Properties dialog box, choose the Discovery tab, and then choose Discover Portal. In the Discover Target Portal dialog box, enter the IP address of your iSCSI target for IP address or DNS name, and then choose OK. To get the IP address of your gateway, check the Gateway tab on the Storage Gateway console. If you deployed your gateway on an Amazon EC2 instance, you can find the public IP or DNS address in the Description tab on the Amazon EC2 console. The IP address now appears in the Target portals list on the Discovery tab. Warning For gateways that are deployed on an Amazon EC2 instance, accessing the gateway over a public internet connection is not supported. The Elastic IP address of the Amazon EC2 instance cannot be used as the target address. 5. Connect the new target portal to the storage volume target on the gateway: a. Choose the Targets tab. The new target portal is shown with an inactive status. The target name shown should be the same as the name that you specified for your storage volume in step 1. b. Select the target, and then choose Connect. If the target name is not populated already, enter the name of the target as shown in step 1. In the Connect to Target dialog box, select Add this connection to the list of Favorite Targets, and then choose OK. Connecting to your volumes from a Windows client API Version 2013-06-30 295 AWS Storage Gateway Volume Gateway User Guide c. In the Targets tab, ensure that the target Status has the value Connected, indicating the target is connected, and then choose OK. You can now initialize and format this storage volume for Windows so that you can begin saving data on it. You do this by using the Windows Disk Management tool. Note Although it is not required for this exercise, we highly recommend that you customize your iSCSI settings for a real-world application as discussed in Customizing Your Windows iSCSI Settings. Connecting your volumes to a Linux client When using Red Hat Enterprise Linux (RHEL), you use the iscsi-initiator-utils RPM package to connect to your gateway iSCSI targets (volumes or VTL devices). To connect a Linux client to the iSCSI targets 1. Install the iscsi-initiator-utils RPM package, if it isn't already installed on your client. You can use the following command to install the package. sudo yum install iscsi-initiator-utils 2. Ensure that the iSCSI daemon is running. a. Verify that the iSCSI daemon is running using one of the following commands. For RHEL 8 or 9, use the following command. sudo service iscsid status b. If the status command doesn't return a status of running, start the daemon using one of the following commands. For RHEL 8 or 9, use the following command. You usually don't need to explicitly start the iscsid service. Connecting volumes to a Linux client API Version 2013-06-30 296 AWS Storage Gateway Volume Gateway User Guide sudo service iscsid start 3. To discover the volume or VTL device targets defined for a gateway, use the following discovery command. sudo /sbin/iscsiadm --mode discovery --type sendtargets --portal [GATEWAY_IP]:3260 Substitute your gateway's IP address for the [GATEWAY_IP] variable in the preceding command. You can find the gateway IP in the iSCSI Target Info
storagegateway-vgw-ug-115
storagegateway-vgw-ug.pdf
115
running, start the daemon using one of the following commands. For RHEL 8 or 9, use the following command. You usually don't need to explicitly start the iscsid service. Connecting volumes to a Linux client API Version 2013-06-30 296 AWS Storage Gateway Volume Gateway User Guide sudo service iscsid start 3. To discover the volume or VTL device targets defined for a gateway, use the following discovery command. sudo /sbin/iscsiadm --mode discovery --type sendtargets --portal [GATEWAY_IP]:3260 Substitute your gateway's IP address for the [GATEWAY_IP] variable in the preceding command. You can find the gateway IP in the iSCSI Target Info properties of a volume on the Storage Gateway console. The output of the discovery command will look like the following example output. For Volume Gateways: [GATEWAY_IP]:3260, 1 iqn.1997-05.com.amazon:myvolume For Tape Gateways: iqn.1997-05.com.amazon:[GATEWAY_IP]-tapedrive-01 Your iSCSI qualified name (IQN) will be different than what is shown preceding, because IQN values are unique to an organization. The name of the target is the name that you specified when you created the volume. You can also find this target name in the iSCSI Target Info properties pane when you select a volume on the Storage Gateway console. 4. To connect to a target, use the following command. Note that you need to specify the correct [GATEWAY_IP] and IQN in the connect command. Warning For gateways that are deployed on an Amazon EC2 instance, accessing the gateway over a public internet connection is not supported. The Elastic IP address of the Amazon EC2 instance cannot be used as the target address. sudo /sbin/iscsiadm --mode node --targetname iqn.1997-05.com.amazon:[ISCSI_TARGET_NAME] --portal [GATEWAY_IP]:3260,1 --login 5. To verify that the volume is attached to the client machine (the initiator), use the following command. Connecting volumes to a Linux client API Version 2013-06-30 297 AWS Storage Gateway Volume Gateway User Guide ls -l /dev/disk/by-path The output of the command will look like the following example output. lrwxrwxrwx. 1 root root 9 Apr 16 19:31 ip-[GATEWAY_IP]:3260-iscsi- iqn.1997-05.com.amazon:myvolume-lun-0 -> ../../sda We highly recommend that after you set up your initiator, you customize your iSCSI settings as discussed in Customizing Your Linux iSCSI Settings. Customizing iSCSI Settings After you set up your initiator, we highly recommend that you customize your iSCSI settings to prevent the initiator from disconnecting from targets. By increasing the iSCSI timeout values as shown in the following steps, you make your application better at dealing with write operations that take a long time and other transient issues such as network interruptions. Note Before making changes to the registry, you should make a backup copy of the registry. For information on making a backup copy and other best practices to follow when working with the registry, see Registry best practices in the Microsoft TechNet Library. Topics • Customizing Your Windows iSCSI Settings • Customizing Your Linux iSCSI Settings • Customizing Your Linux Disk Timeout Settings for Volume Gateways Customizing Your Windows iSCSI Settings When using a Windows client, you use the Microsoft iSCSI initiator to connect to your gateway volume. For instructions on how to connect to your volumes, see Connecting your volumes to your client. Customizing iSCSI Settings API Version 2013-06-30 298 AWS Storage Gateway Volume Gateway User Guide To customize your Windows iSCSI settings 1. Increase the maximum time for which requests are queued. a. Start Registry Editor (Regedit.exe). b. Navigate to the globally unique identifier (GUID) key for the device class that contains iSCSI controller settings, shown following. Warning Make sure that you are working in the CurrentControlSet subkey and not another control set, such as ControlSet001 or ControlSet002. HKEY_Local_Machine\SYSTEM\CurrentControlSet\Control\Class\{4D36E97B-E325-11CE- BFC1-08002BE10318} c. Find the subkey for the Microsoft iSCSI initiator, shown following as [<Instance Number]. The key is represented by a four-digit number, such as 0000. HKEY_Local_Machine\SYSTEM\CurrentControlSet\Control\Class\{4D36E97B-E325-11CE- BFC1-08002BE10318}\[<Instance Number] Depending on what is installed on your computer, the Microsoft iSCSI initiator might not be the subkey 0000. You can ensure that you have selected the correct subkey by verifying that the string DriverDesc has the value Microsoft iSCSI Initiator. d. To show the iSCSI settings, choose the Parameters subkey. e. Open the context (right-click) menu for the MaxRequestHoldTime DWORD (32-bit) value, choose Modify, and then change the value to 600. MaxRequestHoldTime specifies how many seconds Microsoft iSCSI initiator should hold and retry outstanding commands for, before notifying the upper layer of a Device Removal event. This value represents a hold time of 600 seconds. Customizing iSCSI Settings API Version 2013-06-30 299 AWS Storage Gateway Volume Gateway User Guide 2. You can increase the maximum amount of data that can be sent in iSCSI packets by modifying the following parameters: • FirstBurstLength controls the maximum amount of data that can be transmitted in an unsolicited write request. Set this value to 262144 or the Windows OS default, whichever is higher. • MaxBurstLength is similar to FirstBurstLength, but it sets
storagegateway-vgw-ug-116
storagegateway-vgw-ug.pdf
116
should hold and retry outstanding commands for, before notifying the upper layer of a Device Removal event. This value represents a hold time of 600 seconds. Customizing iSCSI Settings API Version 2013-06-30 299 AWS Storage Gateway Volume Gateway User Guide 2. You can increase the maximum amount of data that can be sent in iSCSI packets by modifying the following parameters: • FirstBurstLength controls the maximum amount of data that can be transmitted in an unsolicited write request. Set this value to 262144 or the Windows OS default, whichever is higher. • MaxBurstLength is similar to FirstBurstLength, but it sets the maximum amount of data that can be transmitted in solicited write sequences. Set this value to 1048576 or the Windows OS default, whichever is higher. • MaxRecvDataSegmentLength controls the maximum data segment size that is associated with a single protocol data unit (PDU). Set this value to 262144 or the Windows OS default, whichever is higher. Note Different backup software can be optimized to work best using different iSCSI settings. To verify which values for these parameters will provide the best performance, see the documentation for your backup software. 3. Increase the disk timeout value, as shown following: a. Start Registry Editor (Regedit.exe), if you haven't already. b. Navigate to the Disk subkey in the Services subkey of the CurrentControlSet, shown following. HKEY_Local_Machine\SYSTEM\CurrentControlSet\Services\Disk c. Open the context (right-click) menu for the TimeOutValue DWORD (32-bit) value, choose Modify, and then change the value to 600. TimeOutValue specifies how many seconds iSCSI initiator will wait for a response from the target before it attempts session recovery by dropping and re-establishing the connection. This value represents a timeout period of 600 seconds. 4. To ensure that the new configuration values take effect, restart your system. Before restarting, you must make sure that the results of all write operations to volumes are flushed. To do this, take any mapped storage volume disks offline before restarting. Customizing iSCSI Settings API Version 2013-06-30 300 AWS Storage Gateway Volume Gateway User Guide Customizing Your Linux iSCSI Settings After setting up the initiator for your gateway, we highly recommend that you customize your iSCSI settings to prevent the initiator from disconnecting from targets. By increasing the iSCSI timeout values as shown following, you make your application better at dealing with write operations that take a long time and other transient issues such as network interruptions. Note Commands might be slightly different for other types of Linux. The following examples are based on Red Hat Linux. To customize your Linux iSCSI settings 1. Increase the maximum time for which requests are queued. a. Open the /etc/iscsi/iscsid.conf file and find the following lines. node.session.timeo.replacement_timeout = [replacement_timeout_value] node.conn[0].timeo.noop_out_interval = [noop_out_interval_value] node.conn[0].timeo.noop_out_timeout = [noop_out_timeout_value] b. Set the [replacement_timeout_value] value to 600. Set the [noop_out_interval_value] value to 60. Set the [noop_out_timeout_value] value to 600. All three values are in seconds. Note The iscsid.conf settings must be made before discovering the gateway. If you have already discovered your gateway or logged in to the target, or both, you can delete the entry from the discovery database using the following command. Then you can rediscover or log in again to pick up the new configuration. Customizing iSCSI Settings API Version 2013-06-30 301 AWS Storage Gateway Volume Gateway User Guide iscsiadm -m discoverydb -t sendtargets -p [GATEWAY_IP]:3260 -o delete 2. Increase the maximum values for the amount of data that can be transmitted in each response. a. Open the /etc/iscsi/iscsid.conf file and find the following lines. node.session.iscsi.FirstBurstLength = [replacement_first_burst_length_value] node.session.iscsi.MaxBurstLength = [replacement_max_burst_length_value] node.conn[0].iscsi.MaxRecvDataSegmentLength = [replacement_segment_length_value] b. We recommend the following values to achieve better performance. Your backup software might be optimized to use different values, so see your backup software documentation for best results. Set the [replacement_first_burst_length_value] value to 262144 or the Linux OS default, whichever is higher. Set the [replacement_max_burst_length_value] value to 1048576 or the Linux OS default, whichever is higher. Set the [replacement_segment_length_value] value to 262144 or the Linux OS default, whichever is higher. Note Different backup software can be optimized to work best using different iSCSI settings. To verify which values for these parameters will provide the best performance, see the documentation for your backup software. 3. Restart your system to ensure that the new configuration values take effect. Before restarting, make sure that the results of all write operations to your tapes are flushed. To do this, unmount tapes before restarting. Customizing iSCSI Settings API Version 2013-06-30 302 AWS Storage Gateway Volume Gateway User Guide Customizing Your Linux Disk Timeout Settings for Volume Gateways If you are using a Volume Gateway, you can customize the following Linux disk timeout settings in addition to the iSCSI settings described in the preceding section. To customize your Linux disk timeout settings 1. Increase the disk timeout value in the rules file. a. If you
storagegateway-vgw-ug-117
storagegateway-vgw-ug.pdf
117
that the new configuration values take effect. Before restarting, make sure that the results of all write operations to your tapes are flushed. To do this, unmount tapes before restarting. Customizing iSCSI Settings API Version 2013-06-30 302 AWS Storage Gateway Volume Gateway User Guide Customizing Your Linux Disk Timeout Settings for Volume Gateways If you are using a Volume Gateway, you can customize the following Linux disk timeout settings in addition to the iSCSI settings described in the preceding section. To customize your Linux disk timeout settings 1. Increase the disk timeout value in the rules file. a. If you are using the RHEL 5 initiator, open the /etc/udev/rules.d/50-udev.rules file, and find the following line. ACTION=="add", SUBSYSTEM=="scsi" , SYSFS{type}=="0|7|14", \ RUN+="/bin/sh -c 'echo [timeout] > /sys$$DEVPATH/timeout'" This rules file does not exist in RHEL 6 or 7 initiators, so you must create it using the following rule. ACTION=="add", SUBSYSTEMS=="scsi" , ATTRS{model}=="Storage Gateway", RUN+="/bin/sh -c 'echo [timeout] > /sys$$DEVPATH/timeout'" To modify the timeout value in RHEL 6, use the following command, and then add the lines of code shown preceding. sudo vim /etc/udev/rules.d/50-udev.rules To modify the timeout value in RHEL 7, use the following command, and then add the lines of code shown preceding. sudo su -c "echo 600 > /sys/block/[device name]/device/timeout" b. Set the [timeout] value to 600. This value represents a timeout of 600 seconds. 2. Restart your system to ensure that the new configuration values take effect. Before restarting, make sure that the results of all write operations to your volumes are flushed. To do this, unmount storage volumes before restarting. 3. You can test the configuration by using the following command. Customizing iSCSI Settings API Version 2013-06-30 303 AWS Storage Gateway Volume Gateway User Guide udevadm test [PATH_TO_ISCSI_DEVICE] This command shows the udev rules that are applied to the iSCSI device. Configuring CHAP Authentication for Your iSCSI Targets Storage Gateway supports authentication between your gateway and iSCSI initiators by using Challenge-Handshake Authentication Protocol (CHAP). CHAP provides protection against playback attacks by periodically verifying the identity of an iSCSI initiator as authenticated to access a volume and VTL device target. Note CHAP configuration is optional but highly recommended. To set up CHAP, you must configure it both on the Storage Gateway console and in the iSCSI initiator software that you use to connect to the target. Storage Gateway uses mutual CHAP, which is when the initiator authenticates the target and the target authenticates the initiator. To set up mutual CHAP for your targets 1. Configure CHAP on the Storage Gateway console, as discussed in To configure CHAP for a volume target on the Storage Gateway console. 2. In your client initiator software, complete the CHAP configuration: • To configure mutual CHAP on a Windows client, see To configure mutual CHAP on a Windows client. • To configure mutual CHAP on a Red Hat Linux client, see To configure mutual CHAP on a Red Hat Linux client. To configure CHAP for a volume target on the Storage Gateway console In this procedure, you specify two secret keys that are used to read and write to a volume. These same keys are used in the procedure to configure the client initiator. 1. On the Storage Gateway console, choose Volumes in the navigation pane. Configuring CHAP Authentication API Version 2013-06-30 304 AWS Storage Gateway Volume Gateway User Guide 2. For Actions, choose Configure CHAP Authentication. 3. Provide the requested information in the Configure CHAP Authentication dialog box. a. For Initiator Name, enter the name of your iSCSI initiator. This name is an Amazon iSCSI qualified name (IQN) that is prepended by iqn.1997-05.com.amazon: followed by the target name. The following is an example. iqn.1997-05.com.amazon:your-volume-name You can find the initiator name by using your iSCSI initiator software. For example, for Windows clients, the name is the value on the Configuration tab of the iSCSI initiator. For more information, see To configure mutual CHAP on a Windows client. Note To change an initiator name, you must first deactivate CHAP, change the initiator name in your iSCSI initiator software, and then activate CHAP with the new name. b. For Secret used to Authenticate Initiator, enter the secret requested. This secret must be a minimum of 12 characters and a maximum of 16 characters long. This value is the secret key that the initiator (that is, the Windows client) must know to participate in CHAP with the target. c. For Secret used to Authenticate Target (Mutual CHAP), enter the secret requested. This secret must be a minimum of 12 characters and a maximum of 16 characters long. This value is the secret key that the target must know to participate in CHAP with the initiator. Note The secret used to authenticate the target must be different than the secret to authenticate the initiator. d. Choose Save.
storagegateway-vgw-ug-118
storagegateway-vgw-ug.pdf
118
12 characters and a maximum of 16 characters long. This value is the secret key that the initiator (that is, the Windows client) must know to participate in CHAP with the target. c. For Secret used to Authenticate Target (Mutual CHAP), enter the secret requested. This secret must be a minimum of 12 characters and a maximum of 16 characters long. This value is the secret key that the target must know to participate in CHAP with the initiator. Note The secret used to authenticate the target must be different than the secret to authenticate the initiator. d. Choose Save. 4. Choose the Details tab and confirm that iSCSI CHAP authentication is set to true. Configuring CHAP Authentication API Version 2013-06-30 305 AWS Storage Gateway Volume Gateway User Guide To configure mutual CHAP on a Windows client In this procedure, you configure CHAP in the Microsoft iSCSI initiator using the same keys that you used to configure CHAP for the volume on the console. 1. If the iSCSI initiator is not already started, on the Start menu of your Windows client computer, choose Run, enter iscsicpl.exe, and then choose OK to run the program. 2. Configure mutual CHAP configuration for the initiator (that is, the Windows client): a. Choose the Configuration tab. Note The Initiator Name value is unique to your initiator and company. The name shown preceding is the value that you used in the Configure CHAP Authentication dialog box of the Storage Gateway console. The name shown in the example image is for demonstration purposes only. b. Choose CHAP. c. In the iSCSI Initiator Mutual Chap Secret dialog box, enter the mutual CHAP secret value. In this dialog box, you enter the secret that the initiator (the Windows client) uses to authenticate the target (the storage volume). This secret allows the target to read and write to the initiator. This secret is the same as the secret entered into the Secret used to Authenticate Target (Mutual CHAP) box in the Configure CHAP Authentication dialog box. For more information, see Configuring CHAP Authentication for Your iSCSI Targets. d. If the key that you entered is fewer than 12 characters or more than 16 characters long, an Initiator CHAP secret error dialog box appears. Choose OK, and then enter the key again. 3. Configure the target with the initiator's secret to complete the mutual CHAP configuration. a. b. c. d. Choose the Targets tab. If the target that you want to configure for CHAP is currently connected, disconnect the target by selecting it and choosing Disconnect. Select the target that you want to configure for CHAP, and then choose Connect. In the Connect to Target dialog box, choose Advanced. Configuring CHAP Authentication API Version 2013-06-30 306 AWS Storage Gateway Volume Gateway User Guide e. In the Advanced Settings dialog box, configure CHAP. i. ii. Select Activate CHAP log on. Enter the secret that is required to authenticate the initiator. This secret is the same as the secret entered into the Secret used to Authenticate Initiator box in the Configure CHAP Authentication dialog box. For more information, see Configuring CHAP Authentication for Your iSCSI Targets. iii. Select Perform mutual authentication. iv. To apply the changes, choose OK. f. In the Connect to Target dialog box, choose OK. 4. If you provided the correct secret key, the target shows a status of Connected. To configure mutual CHAP on a Red Hat Linux client In this procedure, you configure CHAP in the Linux iSCSI initiator using the same keys that you used to configure CHAP for the volume on the Storage Gateway console. 1. Ensure that the iSCSI daemon is running and that you have already connected to a target. If you have not completed these two tasks, see Connecting to a Red Hat Enterprise Linux Client. 2. Disconnect and remove any existing configuration for the target for which you are about to configure CHAP. a. To find the target name and ensure it is a defined configuration, list the saved configurations using the following command. sudo /sbin/iscsiadm --mode node b. Disconnect from the target. The following command disconnects from the target named myvolume that is defined in the Amazon iSCSI qualified name (IQN). Change the target name and IQN as required for your situation. sudo /sbin/iscsiadm --mode node --logout GATEWAY_IP:3260,1 iqn.1997-05.com.amazon:myvolume c. Remove the configuration for the target. Configuring CHAP Authentication API Version 2013-06-30 307 AWS Storage Gateway Volume Gateway User Guide The following command removes the configuration for the myvolume target. sudo /sbin/iscsiadm --mode node --op delete --targetname iqn.1997-05.com.amazon:myvolume 3. Edit the iSCSI configuration file to activate CHAP. a. Get the name of the initiator (that is, the client you are using). The following command gets the initiator name from the /etc/iscsi/ initiatorname.iscsi file. sudo cat /etc/iscsi/initiatorname.iscsi The output from this
storagegateway-vgw-ug-119
storagegateway-vgw-ug.pdf
119
(IQN). Change the target name and IQN as required for your situation. sudo /sbin/iscsiadm --mode node --logout GATEWAY_IP:3260,1 iqn.1997-05.com.amazon:myvolume c. Remove the configuration for the target. Configuring CHAP Authentication API Version 2013-06-30 307 AWS Storage Gateway Volume Gateway User Guide The following command removes the configuration for the myvolume target. sudo /sbin/iscsiadm --mode node --op delete --targetname iqn.1997-05.com.amazon:myvolume 3. Edit the iSCSI configuration file to activate CHAP. a. Get the name of the initiator (that is, the client you are using). The following command gets the initiator name from the /etc/iscsi/ initiatorname.iscsi file. sudo cat /etc/iscsi/initiatorname.iscsi The output from this command looks like this: InitiatorName=iqn.1994-05.com.redhat:8e89b27b5b8 b. Open the /etc/iscsi/iscsid.conf file. c. Uncomment the following lines in the file and specify the correct values for username, password, username_in, and password_in. node.session.auth.authmethod = CHAP node.session.auth.username = username node.session.auth.password = password node.session.auth.username_in = username_in node.session.auth.password_in = password_in For guidance on what values to specify, see the following table. Configuration Setting username Value The initiator name that you found in a previous step in this procedure. The value starts with iqn. For example, iqn.1994- is a valid username value 05.com.redhat:8e89b27b5b8 . Configuring CHAP Authentication API Version 2013-06-30 308 AWS Storage Gateway Volume Gateway User Guide Configuration Setting password username_in password_in Value The secret key used to authenticate the initiator (the client you are using) when it communicates with the volume. The IQN of the target volume. The value starts with iqn and ends with the target name. For example, iqn.1997- is a valid username_in 05.com.amazon:myvolume value. The secret key used to authenticate the target (the volume) when it communicates to the initiator. d. Save the changes in the configuration file, and then close the file. 4. Discover and log in to the target. To do so, follow the steps in Connecting to a Red Hat Enterprise Linux Client. Using AWS Direct Connect with Storage Gateway AWS Direct Connect links your internal network to the Amazon Web Services Cloud. By using AWS Direct Connect with Storage Gateway, you can create a connection for high-throughput workload needs, providing a dedicated network connection between your on-premises gateway and AWS. Storage Gateway uses public endpoints. With an AWS Direct Connect connection in place, you can create a public virtual interface to allow traffic to be routed to the Storage Gateway endpoints. The public virtual interface bypasses internet service providers in your network path. The Storage Gateway service public endpoint can be in the same AWS Region as the AWS Direct Connect location, or it can be in a different AWS Region. The following illustration shows an example of how AWS Direct Connect works with Storage Gateway. network architecture showing Storage Gateway connected to the cloud using AWS direct connect. The following procedure assumes that you have created a functioning gateway. Using AWS Direct Connect with Storage Gateway API Version 2013-06-30 309 AWS Storage Gateway Volume Gateway User Guide To use AWS Direct Connect with Storage Gateway 1. Create and establish an AWS Direct Connect connection between your on-premises data center and your Storage Gateway endpoint. For more information about how to create a connection, see Getting Started with AWS Direct Connect in the AWS Direct Connect User Guide. 2. Connect your on-premises Storage Gateway appliance to the AWS Direct Connect router. 3. Create a public virtual interface, and configure your on-premises router accordingly. Even with Direct Connect, VPC endpoints must be created with the HAProxy. For more information, see Creating a Virtual Interface in the AWS Direct Connect User Guide. For details about AWS Direct Connect, see What is AWS Direct Connect? in the AWS Direct Connect User Guide. Getting the IP address for your gateway appliance After you choose a host and deploy your gateway VM, you connect and activate your gateway. To do this, you need the IP address of your gateway VM. You get the IP address from your gateway's local console. You log in to the local console and get the IP address from the top of the console page. For gateways deployed on-premises, you can also get the IP address from your hypervisor. For Amazon EC2 gateways, you can also get the IP address of your Amazon EC2 instance from the Amazon EC2 Management Console. To find how to get your gateway's IP address, see one of the following: • VMware host: Accessing the Gateway Local Console with VMware ESXi • HyperV host: Access the Gateway Local Console with Microsoft Hyper-V • Linux Kernel-based Virtual Machine (KVM) host: Accessing the Gateway Local Console with Linux KVM • EC2 host: Getting an IP Address from an Amazon EC2 Host When you locate the IP address, take note of it. Then return to the Storage Gateway console and type the IP address into the console. Getting the gateway IP address API Version 2013-06-30 310 AWS
storagegateway-vgw-ug-120
storagegateway-vgw-ug.pdf
120
Management Console. To find how to get your gateway's IP address, see one of the following: • VMware host: Accessing the Gateway Local Console with VMware ESXi • HyperV host: Access the Gateway Local Console with Microsoft Hyper-V • Linux Kernel-based Virtual Machine (KVM) host: Accessing the Gateway Local Console with Linux KVM • EC2 host: Getting an IP Address from an Amazon EC2 Host When you locate the IP address, take note of it. Then return to the Storage Gateway console and type the IP address into the console. Getting the gateway IP address API Version 2013-06-30 310 AWS Storage Gateway Volume Gateway User Guide Getting an IP Address from an Amazon EC2 Host To get the IP address of the Amazon EC2 instance your gateway is deployed on, log in to the EC2 instance's local console. Then get the IP address from the top of the console page. For instructions, see Logging In to Your Amazon EC2 Gateway Local Console. You can also get the IP address from the Amazon EC2 Management Console. We recommend using the public IP address for activation. To get the public IP address, use procedure 1. If you choose to use the elastic IP address instead, see procedure 2. Procedure 1: To connect to your gateway using the public IP address 1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/. 2. In the navigation pane, choose Instances, and then select the EC2 instance that your gateway is deployed on. 3. Choose the Description tab at the bottom, and then note the public IP. You use this IP address to connect to the gateway. Return to the Storage Gateway console and type in the IP address. If you want to use the elastic IP address for activation, use the procedure following. Procedure 2: To connect to your gateway using the elastic IP address 1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/. 2. In the navigation pane, choose Instances, and then select the EC2 instance that your gateway is deployed on. 3. Choose the Description tab at the bottom, and then note the Elastic IP value. You use this elastic IP address to connect to the gateway. Return to the Storage Gateway console and type in the elastic IP address. 4. After your gateway is activated, choose the gateway that you just activated, and then choose the VTL devices tab in the bottom panel. 5. Get the names of all your VTL devices. 6. For each target, run the following command to configure the target. iscsiadm -m node -o new -T [$TARGET_NAME] -p [$Elastic_IP]:3260 7. For each target, run the following command to log in. iscsiadm -m node -p [$ELASTIC_IP]:3260 --login Getting an IP Address from an Amazon EC2 Host API Version 2013-06-30 311 AWS Storage Gateway Volume Gateway User Guide Your gateway is now connected using the elastic IP address of the EC2 instance. Understanding Storage Gateway Resources and Resource IDs In Storage Gateway, the primary resource is a gateway but other resource types include: volume, virtual tape, iSCSI target, and vtl device. These are referred to as subresources and they don't exist unless they are associated with a gateway. These resources and subresources have unique Amazon Resource Names (ARNs) associated with them as shown in the following table. Resource Type Gateway ARN ARN Format arn:aws:storagegateway: region:account-id :gateway/ gateway- id Volume ARN arn:aws:storagegateway: region:account-id :gateway/ gateway- id /volume/volume-id Target ARN ( iSCSI target) arn:aws:storagegateway: region:account-id :gateway/ gateway- id /target/iSCSItarget Storage Gateway also supports the use of EC2 instances and EBS volumes and snapshots. These resources are Amazon EC2 resources that are used in Storage Gateway. Working with Resource IDs When you create a resource, Storage Gateway assigns the resource a unique resource ID. This resource ID is part of the resource ARN. A resource ID takes the form of a resource identifier, followed by a hyphen, and a unique combination of eight letters and numbers. For example, a gateway ID is of the form sgw-12A3456B where sgw is the resource identifier for gateways. A volume ID takes the form vol-3344CCDD where vol is the resource identifier for volumes. For virtual tapes, you can prepend a up to a four character prefix to the barcode ID to help you organize your tapes. Understanding Resources and Resource IDs API Version 2013-06-30 312 AWS Storage Gateway Volume Gateway User Guide Storage Gateway resource IDs are in uppercase. However, when you use these resource IDs with the Amazon EC2 API, Amazon EC2 expects resource IDs in lowercase. You must change your resource ID to lowercase to use it with the EC2 API. For example, in Storage Gateway the ID for a volume might be vol-1122AABB. When you use this ID with the EC2 API, you must change it to vol-1122aabb. Otherwise, the EC2 API might not behave as expected.
storagegateway-vgw-ug-121
storagegateway-vgw-ug.pdf
121
to help you organize your tapes. Understanding Resources and Resource IDs API Version 2013-06-30 312 AWS Storage Gateway Volume Gateway User Guide Storage Gateway resource IDs are in uppercase. However, when you use these resource IDs with the Amazon EC2 API, Amazon EC2 expects resource IDs in lowercase. You must change your resource ID to lowercase to use it with the EC2 API. For example, in Storage Gateway the ID for a volume might be vol-1122AABB. When you use this ID with the EC2 API, you must change it to vol-1122aabb. Otherwise, the EC2 API might not behave as expected. Tagging Storage Gateway Resources In Storage Gateway, you can use tags to manage your resources. Tags let you add metadata to your resources and categorize your resources to make them easier to manage. Each tag consists of a key- value pair, which you define. You can add tags to gateways, volumes, and virtual tapes. You can search and filter these resources based on the tags you add. As an example, you can use tags to identify Storage Gateway resources used by each department in your organization. You might tag gateways and volumes used by your accounting department like this: (key=department and value=accounting). You can then filter with this tag to identify all gateways and volumes used by your accounting department and use the information to determine cost. For more information, see Using Cost Allocation Tags and Working with Tag Editor. If you archive a virtual tape that is tagged, the tape maintains its tags in the archive. Similarly, if you retrieve a tape from the archive to another gateway, the tags are maintained in the new gateway. Tags don’t have any semantic meaning but rather are interpreted as strings of characters. The following restrictions apply to tags: • Tag keys and values are case-sensitive. • The maximum number of tags for each resource is 50. • Tag keys cannot begin with aws:. This prefix is reserved for AWS use. • Valid characters for the key property are UTF-8 letters and numbers, space, and special characters + - = . _ : / and @. Working with Tags You can work with tags by using the Storage Gateway console, the Storage Gateway API, or the Storage Gateway Command Line Interface (CLI). The following procedures show you how to add, edit, and delete a tag on the console. Tagging Your Resources API Version 2013-06-30 313 AWS Storage Gateway To add a tag Volume Gateway User Guide 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. In the navigation pane, choose the resource you want to tag. For example, to tag a gateway, choose Gateways, and then choose the gateway you want to tag from the list of gateways. 3. Choose Tags, and then choose Add/edit tags. 4. 5. In the Add/edit tags dialog box, choose Create tag. Type a key for Key and a value for Value. For example, you can type Department for the key and Accounting for the value. Note You can leave the Value box blank. 6. Choose Create Tag to add more tags. You can add multiple tags to a resource. 7. When you’re done adding tags, choose Save. To edit a tag 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose the resource whose tag you want to edit. 3. Choose Tags to open the Add/edit tags dialog box. 4. Choose the pencil icon next to the tag you want edit, and then edit the tag. 5. When you’re done editing the tag, choose Save. To delete a tag 1. Open the Storage Gateway console at https://console.aws.amazon.com/storagegateway/ home. 2. Choose the resource whose tag you want to delete. 3. Choose Tags, and then choose Add/edit tags to open the Add/edit tags dialog box. Working with Tags API Version 2013-06-30 314 AWS Storage Gateway Volume Gateway User Guide 4. Choose the X icon next to the tag you want to delete, and then choose Save. Working with open-source components for Storage Gateway This section describes third party tools and licenses that we depend on to deliver Storage Gateway functionality. The source code for certain open-source software components that are included with the AWS Storage Gateway software is available for download at the following locations: • For gateways deployed on VMware ESXi, download sources.tar • For gateways deployed on Microsoft Hyper-V, download sources_hyperv.tar • For gateways deployed on Linux Kernel-based Virtual Machine (KVM), download sources_KVM.tar This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/). For the relevant licenses for all dependent third party tools, see Third Party Licenses. AWS Storage Gateway quotas In this topic, you can find information about volume and tape quotas, configuration, and performance limits for Storage Gateway. Topics • Quotas for volumes • Recommended local
storagegateway-vgw-ug-122
storagegateway-vgw-ug.pdf
122
software is available for download at the following locations: • For gateways deployed on VMware ESXi, download sources.tar • For gateways deployed on Microsoft Hyper-V, download sources_hyperv.tar • For gateways deployed on Linux Kernel-based Virtual Machine (KVM), download sources_KVM.tar This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/). For the relevant licenses for all dependent third party tools, see Third Party Licenses. AWS Storage Gateway quotas In this topic, you can find information about volume and tape quotas, configuration, and performance limits for Storage Gateway. Topics • Quotas for volumes • Recommended local disk sizes for your gateway Quotas for volumes The following table lists quotas for volumes. Description Cached volumes Stored volumes Maximum size of a volume 32 TiB 16 TiB Open-Source Components API Version 2013-06-30 315 Cached volumes Stored volumes Volume Gateway User Guide AWS Storage Gateway Description Note If you create a snapshot from a cached volume that is more than 16 TiB in size, you can restore it to a Storage Gateway volume but not to an Amazon Elastic Block Store (Amazon EBS) volume. Maximum number of volumes per gateway 32 32 Total size of all volumes for a gateway 1,024 TiB 512 TiB Recommended local disk sizes for your gateway The following table recommends sizes for local disk storage for your deployed gateway. Gateway Type Cache (Minimum) Cache (Maximum) Upload Buffer Upload Buffer Other Required (Minimum) (Maximum) Local Disks Cached volume gateway Stored volume gateway 150 GiB 64 TiB 150 GiB 2 TiB — — — 150 GiB 2 TiB 1 or more for stored volume or volumes Recommended local disk sizes for your gateway API Version 2013-06-30 316 AWS Storage Gateway Note Volume Gateway User Guide You can configure one or more local drives for your cache and upload buffer, up to the maximum capacity. When adding cache or upload buffer to an existing gateway, it's important to create new disks in your host (hypervisor or Amazon EC2 instance). Don't change the size of existing disks if the disks have been previously allocated as either a cache or upload buffer. Recommended local disk sizes for your gateway API Version 2013-06-30 317 AWS Storage Gateway Volume Gateway User Guide API Reference for Storage Gateway In addition to using the console, you can use the AWS Storage Gateway API to programmatically configure and manage your gateways. This section describes the AWS Storage Gateway operations, request signing for authentication and the error handling. For information about the regions and endpoints available for Storage Gateway, see AWS Storage Gateway Endpoints and Quotas in the AWS General Reference. Note You can also use the AWS SDKs when developing applications with AWS Storage Gateway. The AWS SDKs for Java, .NET, and PHP wrap the underlying AWS Storage Gateway API, simplifying your programming tasks. For information about downloading the SDK libraries, see Sample Code Libraries. Topics • Storage Gateway Required Request Headers • Signing Requests • Error Responses • Actions Storage Gateway Required Request Headers This section describes the required headers that you must send with every POST request to Storage Gateway. You include HTTP headers to identify key information about the request including the operation you want to invoke, the date of the request, and information that indicates the authorization of you as the sender of the request. Headers are case insensitive and the order of the headers is not important. The following example shows headers that are used in the ActivateGateway operation. POST / HTTP/1.1 Required Request Headers API Version 2013-06-30 318 AWS Storage Gateway Volume Gateway User Guide Host: storagegateway.us-east-2.amazonaws.com Content-Type: application/x-amz-json-1.1 Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20120425/us-east-2/ storagegateway/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=9cd5a3584d1d67d57e61f120f35102d6b3649066abdd4bf4bbcf05bd9f2f8fe2 x-amz-date: 20120912T120000Z x-amz-target: StorageGateway_20120630.ActivateGateway The following are the headers that must include with your POST requests to Storage Gateway. Headers shown below that begin with "x-amz" are AWS-specific headers. All other headers listed are common header used in HTTP transactions. Header Description Authorization The authorization header contains several of pieces of information about the request that allows Storage Gateway to determine if the request is a valid action for the requester. The format of this header is as follows (line breaks added for readability): Authorization: AWS4-HMAC_SHA456 Credentials= YourAccessKey /yyymmdd/region/storagegateway/aw s4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-targ et, Signature= CalculatedSignature In the preceding syntax, you specify YourAccessKey, the year, month , and day (yyyymmdd), the region, and the CalculatedSignature. The format of the authorization header is dictated by the requirements of the AWS V4 Signing process. The details of signing are discussed in the topic Signing Requests. Content-Type Use application/x-amz-json-1.1 requests to Storage Gateway. as the content type for all Content-Type: application/x-amz-json-1.1 Required Request Headers API Version 2013-06-30 319 AWS Storage Gateway Volume Gateway User Guide Header Host x-amz-date Description Use the host header to specify the Storage Gateway endpoint where you send your request. For example, storagegateway.us- east-2.amazonaws.com
storagegateway-vgw-ug-123
storagegateway-vgw-ug.pdf
123
CalculatedSignature In the preceding syntax, you specify YourAccessKey, the year, month , and day (yyyymmdd), the region, and the CalculatedSignature. The format of the authorization header is dictated by the requirements of the AWS V4 Signing process. The details of signing are discussed in the topic Signing Requests. Content-Type Use application/x-amz-json-1.1 requests to Storage Gateway. as the content type for all Content-Type: application/x-amz-json-1.1 Required Request Headers API Version 2013-06-30 319 AWS Storage Gateway Volume Gateway User Guide Header Host x-amz-date Description Use the host header to specify the Storage Gateway endpoint where you send your request. For example, storagegateway.us- east-2.amazonaws.com region. For more information about the endpoints available for Storage is the endpoint for the US East (Ohio) Gateway, see AWS Storage Gateway Endpoints and Quotas in the AWS General Reference. Host: storagegateway. region.amazonaws.com You must provide the time stamp in either the HTTP Date header or the AWS x-amz-date header. (Some HTTP client libraries don't let you set the Date header.) When an x-amz-date header is present, the Storage Gateway ignores any Date header during the request authentication. The x-amz-date format must be ISO8601 Basic in the YYYYMMDD'T'HHMMSS'Z' format. If both the Date and x-amz- date header are used, the format of the Date header does not have to be ISO8601. x-amz-date: YYYYMMDD'T'HHMMSS'Z' x-amz-target This header specifies the version of the API and the operation that you are requesting. The target header values are formed by concatenating the API version with the API name and are in the following format. x-amz-target: StorageGateway_ APIversion .operationName The operationName value (e.g. "ActivateGateway") can be found from the API list, API Reference for Storage Gateway. Required Request Headers API Version 2013-06-30 320 AWS Storage Gateway Signing Requests Volume Gateway User Guide Storage Gateway requires that you authenticate every request you send by signing the request. To sign a request, you calculate a digital signature using a cryptographic hash function. A cryptographic hash is a function that returns a unique hash value based on the input. The input to the hash function includes the text of your request and your secret access key. The hash function returns a hash value that you include in the request as your signature. The signature is part of the Authorization header of your request. After receiving your request, Storage Gateway recalculates the signature using the same hash function and input that you used to sign the request. If the resulting signature matches the signature in the request, Storage Gateway processes the request. Otherwise, the request is rejected. Storage Gateway supports authentication using AWS Signature Version 4. The process for calculating a signature can be broken into three tasks: • Task 1: Create a Canonical Request Rearrange your HTTP request into a canonical format. Using a canonical form is necessary because Storage Gateway uses the same canonical form when it recalculates a signature to compare with the one you sent. • Task 2: Create a String to Sign Create a string that you will use as one of the input values to your cryptographic hash function. The string, called the string to sign, is a concatenation of the name of the hash algorithm, the request date, a credential scope string, and the canonicalized request from the previous task. The credential scope string itself is a concatenation of date, region, and service information. • Task 3: Create a Signature Create a signature for your request by using a cryptographic hash function that accepts two input strings: your string to sign and a derived key. The derived key is calculated by starting with your secret access key and using the credential scope string to create a series of Hash-based Message Authentication Codes (HMACs). Example Signature Calculation The following example walks you through the details of creating a signature for ListGateways. The example could be used as a reference to check your signature calculation method. Other Signing Requests API Version 2013-06-30 321 AWS Storage Gateway Volume Gateway User Guide reference calculations are included in the Signature Version 4 Test Suite of the Amazon Web Services Glossary. The example assumes the following: • The time stamp of the request is "Mon, 10 Sep 2012 00:00:00" GMT. • The endpoint is the US East (Ohio) region. The general request syntax (including the JSON body) is: POST / HTTP/1.1 Host: storagegateway.us-east-2.amazonaws.com x-amz-Date: 20120910T000000Z Authorization: SignatureToBeCalculated Content-type: application/x-amz-json-1.1 x-amz-target: StorageGateway_20120630.ListGateways {} The canonical form of the request calculated for Task 1: Create a Canonical Request is: POST / content-type:application/x-amz-json-1.1 host:storagegateway.us-east-2.amazonaws.com x-amz-date:20120910T000000Z x-amz-target:StorageGateway_20120630.ListGateways content-type;host;x-amz-date;x-amz-target 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a The last line of the canonical request is the hash of the request body. Also, note the empty third line in the canonical request. This is because there are no query parameters for this API (or any Storage Gateway APIs). The string to sign for Task 2: Create a String to Sign
storagegateway-vgw-ug-124
storagegateway-vgw-ug.pdf
124
(Ohio) region. The general request syntax (including the JSON body) is: POST / HTTP/1.1 Host: storagegateway.us-east-2.amazonaws.com x-amz-Date: 20120910T000000Z Authorization: SignatureToBeCalculated Content-type: application/x-amz-json-1.1 x-amz-target: StorageGateway_20120630.ListGateways {} The canonical form of the request calculated for Task 1: Create a Canonical Request is: POST / content-type:application/x-amz-json-1.1 host:storagegateway.us-east-2.amazonaws.com x-amz-date:20120910T000000Z x-amz-target:StorageGateway_20120630.ListGateways content-type;host;x-amz-date;x-amz-target 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a The last line of the canonical request is the hash of the request body. Also, note the empty third line in the canonical request. This is because there are no query parameters for this API (or any Storage Gateway APIs). The string to sign for Task 2: Create a String to Sign is: AWS4-HMAC-SHA256 Example Signature Calculation API Version 2013-06-30 322 AWS Storage Gateway 20120910T000000Z 20120910/us-east-2/storagegateway/aws4_request 92c0effa6f9224ac752ca179a04cecbede3038b0959666a8160ab452c9e51b3e Volume Gateway User Guide The first line of the string to sign is the algorithm, the second line is the time stamp, the third line is the credential scope, and the last line is a hash of the canonical request from Task 1. For Task 3: Create a Signature, the derived key can be represented as: derived key = HMAC(HMAC(HMAC(HMAC("AWS4" + YourSecretAccessKey,"20120910"),"us- east-2"),"storagegateway"),"aws4_request") If the secret access key, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY, is used, then the calculated signature is: 6d4c40b8f2257534dbdca9f326f147a0a7a419b63aff349d9d9c737c9a0f4c81 The final step is to construct the Authorization header. For the demonstration access key AKIAIOSFODNN7EXAMPLE, the header (with line breaks added for readability) is: Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20120910/us-east-2/ storagegateway/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=6d4c40b8f2257534dbdca9f326f147a0a7a419b63aff349d9d9c737c9a0f4c81 Error Responses Topics • Exceptions • Operation Error Codes • Error Responses This section provides reference information about AWS Storage Gateway errors. These errors are represented by an error exception and an operation error code. For example, the error exception Error Responses API Version 2013-06-30 323 AWS Storage Gateway Volume Gateway User Guide InvalidSignatureException is returned by any API response if there is a problem with the request signature. However, the operation error code ActivationKeyInvalid is returned only for the ActivateGateway API. Depending on the type of error, Storage Gateway may return only just an exception, or it may return both an exception and an operation error code. Examples of error responses are shown in the Error Responses. Exceptions The following table lists AWS Storage Gateway API exceptions. When an AWS Storage Gateway operation returns an error response, the response body contains one of these exceptions. The InternalServerError and InvalidGatewayRequestException return one of the operation error codes Operation Error Codes message codes that give the specific operation error code. Exception Message HTTP Status Code IncompleteSignatur The specified signature is incomplete. 400 Bad Request eException InternalFailure The request processing has failed due to some unknown error, exception or 500 Internal Server Error failure. InternalServerError One of the operation error code messages Operation Error Codes. 500 Internal Server Error InvalidAction The requested action or operation is not valid. 400 Bad Request InvalidClientTokenId The X.509 certificate or AWS Access Key ID provided does not exist in our records. 403 Forbidden InvalidGatewayRequ estException One of the operation error code messages in Operation Error Codes. 400 Bad Request InvalidSignatureEx ception Exceptions The request signature we calculate d does not match the signature you 400 Bad Request API Version 2013-06-30 324 AWS Storage Gateway Volume Gateway User Guide Exception Message HTTP Status Code provided. Check your AWS Access Key and signing method. MissingAction The request is missing an action or operation parameter. 400 Bad Request MissingAuthenticat ionToken The request must contain either a valid (registered) AWS Access Key ID 403 Forbidden RequestExpired or X.509 certificate. The request is past the expiration date or the request date (either with 15 minute padding), or the request date occurs more than 15 minutes in the future. 400 Bad Request SerializationException An error occurred during serializa tion. Check that your JSON payload 400 Bad Request is well-formed. ServiceUnavailable The request has failed due to a temporary failure of the server. 503 Service Unavailable SubscriptionRequir edException The AWS Access Key Id needs a subscription for the service. 400 Bad Request ThrottlingException Rate exceeded. 400 Bad Request TooManyRequests Too many requests. UnknownOperationEx ception An unknown operation was specified . Valid operations are listed in Operations in Storage Gateway. 429 Too Many Requests 400 Bad Request UnrecognizedClient Exception The security token included in the request is not valid. 400 Bad Request Exceptions API Version 2013-06-30 325 AWS Storage Gateway Exception Message ValidationException The value of an input parameter is bad or out of range. Volume Gateway User Guide HTTP Status Code 400 Bad Request Operation Error Codes The following table shows the mapping between AWS Storage Gateway operation error codes and APIs that can return the codes. All operation error codes are returned with one of two general exceptions—InternalServerError and InvalidGatewayRequestException—described in Exceptions. Operation Error Code Message Operations That Return this Error Code ActivationKeyExpired The specified activatio n key has expired. ActivateGateway ActivationKeyInvalid The specified activatio n key is not valid. ActivateGateway ActivationKeyNotFound The specified activatio n key was not found.
storagegateway-vgw-ug-125
storagegateway-vgw-ug.pdf
125
ValidationException The value of an input parameter is bad or out of range. Volume Gateway User Guide HTTP Status Code 400 Bad Request Operation Error Codes The following table shows the mapping between AWS Storage Gateway operation error codes and APIs that can return the codes. All operation error codes are returned with one of two general exceptions—InternalServerError and InvalidGatewayRequestException—described in Exceptions. Operation Error Code Message Operations That Return this Error Code ActivationKeyExpired The specified activatio n key has expired. ActivateGateway ActivationKeyInvalid The specified activatio n key is not valid. ActivateGateway ActivationKeyNotFound The specified activatio n key was not found. ActivateGateway BandwidthThrottleS cheduleNotFound The specified bandwidth throttle was not found. DeleteBandwidthRateLimit CannotExportSnapshot The specified snapshot cannot be exported. CreateCachediSCSIVolume CreateStorediSCSIVolume InitiatorNotFound The specified initiator was not found. DeleteChapCredentials DiskAlreadyAllocated The specified disk is already allocated. AddCache AddUploadBuffer Operation Error Codes API Version 2013-06-30 326 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code AddWorkingStorage CreateStorediSCSIVolume DiskDoesNotExist The specified disk does not exist. AddCache AddUploadBuffer AddWorkingStorage CreateStorediSCSIVolume CreateStorediSCSIVolume CreateStorediSCSIVolume CreateStorediSCSIVolume ActivateGateway DiskSizeNotGigAligned DiskSizeGreaterTha nVolumeMaxSize DiskSizeLessThanVo lumeSize DuplicateCertifica teInfo The specified disk is not gigabyte-aligned. The specified disk size is greater than the maximum volume size. The specified disk size is less than the volume size. The specified certifica te information is a duplicate. Operation Error Codes API Version 2013-06-30 327 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code GatewayInternalError A gateway internal error occurred. AddCache AddUploadBuffer AddWorkingStorage CreateCachediSCSIVolume CreateSnapshot CreateStorediSCSIVolume CreateSnapshotFromVolumeRec overyPoint DeleteBandwidthRateLimit DeleteChapCredentials DeleteVolume DescribeBandwidthRateLimit DescribeCache DescribeCachediSCSIVolumes DescribeChapCredentials DescribeGatewayInformation DescribeMaintenanceStartTime DescribeSnapshotSchedule DescribeStorediSCSIVolumes DescribeWorkingStorage ListLocalDisks Operation Error Codes API Version 2013-06-30 328 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code ListVolumes ListVolumeRecoveryPoints ShutdownGateway StartGateway UpdateBandwidthRateLimit UpdateChapCredentials UpdateMaintenanceStartTime UpdateGatewaySoftwareNow UpdateSnapshotSchedule Operation Error Codes API Version 2013-06-30 329 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code GatewayNotConnected The specified gateway is not connected. AddCache AddUploadBuffer AddWorkingStorage CreateCachediSCSIVolume CreateSnapshot CreateStorediSCSIVolume CreateSnapshotFromVolumeRec overyPoint DeleteBandwidthRateLimit DeleteChapCredentials DeleteVolume DescribeBandwidthRateLimit DescribeCache DescribeCachediSCSIVolumes DescribeChapCredentials DescribeGatewayInformation DescribeMaintenanceStartTime DescribeSnapshotSchedule DescribeStorediSCSIVolumes DescribeWorkingStorage ListLocalDisks Operation Error Codes API Version 2013-06-30 330 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code ListVolumes ListVolumeRecoveryPoints ShutdownGateway StartGateway UpdateBandwidthRateLimit UpdateChapCredentials UpdateMaintenanceStartTime UpdateGatewaySoftwareNow UpdateSnapshotSchedule Operation Error Codes API Version 2013-06-30 331 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code GatewayNotFound The specified gateway was not found. AddCache AddUploadBuffer AddWorkingStorage CreateCachediSCSIVolume CreateSnapshot CreateSnapshotFromVolumeRec overyPoint CreateStorediSCSIVolume DeleteBandwidthRateLimit DeleteChapCredentials DeleteGateway DeleteVolume DescribeBandwidthRateLimit DescribeCache DescribeCachediSCSIVolumes DescribeChapCredentials DescribeGatewayInformation DescribeMaintenanceStartTime DescribeSnapshotSchedule DescribeStorediSCSIVolumes DescribeWorkingStorage Operation Error Codes API Version 2013-06-30 332 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code ListLocalDisks ListVolumes ListVolumeRecoveryPoints ShutdownGateway StartGateway UpdateBandwidthRateLimit UpdateChapCredentials UpdateMaintenanceStartTime UpdateGatewaySoftwareNow UpdateSnapshotSchedule Operation Error Codes API Version 2013-06-30 333 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code GatewayProxyNetwor kConnectionBusy The specified gateway proxy network connection is busy. AddCache AddUploadBuffer AddWorkingStorage CreateCachediSCSIVolume CreateSnapshot CreateSnapshotFromVolumeRec overyPoint CreateStorediSCSIVolume DeleteBandwidthRateLimit DeleteChapCredentials DeleteVolume DescribeBandwidthRateLimit DescribeCache DescribeCachediSCSIVolumes DescribeChapCredentials DescribeGatewayInformation DescribeMaintenanceStartTime DescribeSnapshotSchedule DescribeStorediSCSIVolumes DescribeWorkingStorage ListLocalDisks Operation Error Codes API Version 2013-06-30 334 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code ListVolumes ListVolumeRecoveryPoints ShutdownGateway StartGateway UpdateBandwidthRateLimit UpdateChapCredentials UpdateMaintenanceStartTime UpdateGatewaySoftwareNow UpdateSnapshotSchedule Operation Error Codes API Version 2013-06-30 335 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code InternalError An internal error occurred. ActivateGateway AddCache AddUploadBuffer AddWorkingStorage CreateCachediSCSIVolume CreateSnapshot CreateSnapshotFromVolumeRec overyPoint CreateStorediSCSIVolume DeleteBandwidthRateLimit DeleteChapCredentials DeleteGateway DeleteVolume DescribeBandwidthRateLimit DescribeCache DescribeCachediSCSIVolumes DescribeChapCredentials DescribeGatewayInformation DescribeMaintenanceStartTime DescribeSnapshotSchedule DescribeStorediSCSIVolumes Operation Error Codes API Version 2013-06-30 336 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code DescribeWorkingStorage ListLocalDisks ListGateways ListVolumes ListVolumeRecoveryPoints ShutdownGateway StartGateway UpdateBandwidthRateLimit UpdateChapCredentials UpdateMaintenanceStartTime UpdateGatewayInformation UpdateGatewaySoftwareNow UpdateSnapshotSchedule Operation Error Codes API Version 2013-06-30 337 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code InvalidParameters The specified request contains incorrect parameters. ActivateGateway AddCache AddUploadBuffer AddWorkingStorage CreateCachediSCSIVolume CreateSnapshot CreateSnapshotFromVolumeRec overyPoint CreateStorediSCSIVolume DeleteBandwidthRateLimit DeleteChapCredentials DeleteGateway DeleteVolume DescribeBandwidthRateLimit DescribeCache DescribeCachediSCSIVolumes DescribeChapCredentials DescribeGatewayInformation DescribeMaintenanceStartTime DescribeSnapshotSchedule DescribeStorediSCSIVolumes Operation Error Codes API Version 2013-06-30 338 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code DescribeWorkingStorage ListLocalDisks ListGateways ListVolumes ListVolumeRecoveryPoints ShutdownGateway StartGateway UpdateBandwidthRateLimit UpdateChapCredentials UpdateMaintenanceStartTime UpdateGatewayInformation UpdateGatewaySoftwareNow UpdateSnapshotSchedule LocalStorageLimitE xceeded The local storage limit was exceeded. AddCache AddUploadBuffer AddWorkingStorage LunInvalid The specified LUN is incorrect. CreateStorediSCSIVolume Operation Error Codes API Version 2013-06-30 339 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message MaximumVolumeCount Exceeded The maximum volume count was exceeded. Operations That Return this Error Code CreateCachediSCSIVolume CreateStorediSCSIVolume DescribeCachediSCSIVolumes DescribeStorediSCSIVolumes NetworkConfigurati onChanged The gateway network configuration has
storagegateway-vgw-ug-126
storagegateway-vgw-ug.pdf
126
DescribeSnapshotSchedule DescribeStorediSCSIVolumes Operation Error Codes API Version 2013-06-30 338 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code DescribeWorkingStorage ListLocalDisks ListGateways ListVolumes ListVolumeRecoveryPoints ShutdownGateway StartGateway UpdateBandwidthRateLimit UpdateChapCredentials UpdateMaintenanceStartTime UpdateGatewayInformation UpdateGatewaySoftwareNow UpdateSnapshotSchedule LocalStorageLimitE xceeded The local storage limit was exceeded. AddCache AddUploadBuffer AddWorkingStorage LunInvalid The specified LUN is incorrect. CreateStorediSCSIVolume Operation Error Codes API Version 2013-06-30 339 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message MaximumVolumeCount Exceeded The maximum volume count was exceeded. Operations That Return this Error Code CreateCachediSCSIVolume CreateStorediSCSIVolume DescribeCachediSCSIVolumes DescribeStorediSCSIVolumes NetworkConfigurati onChanged The gateway network configuration has changed. CreateCachediSCSIVolume CreateStorediSCSIVolume Operation Error Codes API Version 2013-06-30 340 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code NotSupported The specified operation is not supported. ActivateGateway AddCache AddUploadBuffer AddWorkingStorage CreateCachediSCSIVolume CreateSnapshot CreateSnapshotFromVolumeRec overyPoint CreateStorediSCSIVolume DeleteBandwidthRateLimit DeleteChapCredentials DeleteGateway DeleteVolume DescribeBandwidthRateLimit DescribeCache DescribeCachediSCSIVolumes DescribeChapCredentials DescribeGatewayInformation DescribeMaintenanceStartTime DescribeSnapshotSchedule DescribeStorediSCSIVolumes Operation Error Codes API Version 2013-06-30 341 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code DescribeWorkingStorage ListLocalDisks ListGateways ListVolumes ListVolumeRecoveryPoints ShutdownGateway StartGateway UpdateBandwidthRateLimit UpdateChapCredentials UpdateMaintenanceStartTime UpdateGatewayInformation UpdateGatewaySoftwareNow UpdateSnapshotSchedule OutdatedGateway The specified gateway is out of date. ActivateGateway SnapshotInProgress Exception The specified snapshot is in progress. DeleteVolume SnapshotIdInvalid The specified snapshot is not valid. CreateCachediSCSIVolume CreateStorediSCSIVolume StagingAreaFull The staging area is full. CreateCachediSCSIVolume CreateStorediSCSIVolume Operation Error Codes API Version 2013-06-30 342 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code TargetAlreadyExists TargetInvalid The specified target already exists. CreateCachediSCSIVolume CreateStorediSCSIVolume The specified target is not valid. CreateCachediSCSIVolume CreateStorediSCSIVolume DeleteChapCredentials DescribeChapCredentials UpdateChapCredentials TargetNotFound The specified target was not found. CreateCachediSCSIVolume CreateStorediSCSIVolume DeleteChapCredentials DescribeChapCredentials DeleteVolume UpdateChapCredentials Operation Error Codes API Version 2013-06-30 343 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message UnsupportedOperati onForGatewayType The specified operation is not valid for the type of the gateway. Operations That Return this Error Code AddCache AddWorkingStorage CreateCachediSCSIVolume CreateSnapshotFromVolumeRec overyPoint CreateStorediSCSIVolume DeleteSnapshotSchedule DescribeCache DescribeCachediSCSIVolumes DescribeStorediSCSIVolumes DescribeUploadBuffer DescribeWorkingStorage ListVolumeRecoveryPoints VolumeAlreadyExists The specified volume already exists. CreateCachediSCSIVolume CreateStorediSCSIVolume VolumeIdInvalid VolumeInUse The specified volume is not valid. DeleteVolume The specified volume is already in use. DeleteVolume Operation Error Codes API Version 2013-06-30 344 AWS Storage Gateway Volume Gateway User Guide Operation Error Code Message Operations That Return this Error Code VolumeNotFound The specified volume was not found. CreateSnapshot CreateSnapshotFromVolumeRec overyPoint DeleteVolume DescribeCachediSCSIVolumes DescribeSnapshotSchedule DescribeStorediSCSIVolumes UpdateSnapshotSchedule VolumeNotReady The specified volume is not ready. CreateSnapshot CreateSnapshotFromVolumeRec overyPoint Error Responses When there is an error, the response header information contains: • Content-Type: application/x-amz-json-1.1 • An appropriate 4xx or 5xx HTTP status code The body of an error response contains information about the error that occurred. The following sample error response shows the output syntax of response elements common to all error responses. { "__type": "String", "message": "String", "error": { "errorCode": "String", Error Responses API Version 2013-06-30 345 AWS Storage Gateway Volume Gateway User Guide "errorDetails": "String" } } The following table explains the JSON error response fields shown in the preceding syntax. __type One of the exceptions from Exceptions. Type: String error Contains API-specific error details. In general errors (i.e., not specific to any API), this error information is not shown. Type: Collection errorCode One of the operation error codes . Type: String errorDetails This field is not used in the current version of the API. Type: String message One of the operation error code messages. Type: String Error Response Examples The following JSON body is returned if you use the DescribeStorediSCSIVolumes API and specify a gateway ARN request input that does not exist. { "__type": "InvalidGatewayRequestException", Error Responses API Version 2013-06-30 346 AWS Storage Gateway Volume Gateway User Guide "message": "The specified volume was not found.", "error": { "errorCode": "VolumeNotFound" } } The following JSON body is returned if Storage Gateway calculates a signature that does not match the signature sent with a request. { "__type": "InvalidSignatureException", "message": "The request signature we calculated does not match the signature you provided." } Operations in Storage Gateway For a list of Storage Gateway operations, see Actions in the AWS Storage Gateway API Reference. Operations API Version 2013-06-30 347 AWS Storage Gateway Volume Gateway User Guide Document history for the Volume Gateway User Guide • API version: 2013-06-30 • Latest documentation update: November 24, 2020 The following table describes important changes in each release of the AWS Storage Gateway User Guide after April 2018. For notification about updates to this documentation, you can subscribe to an RSS feed. Change Description Date Notice of availability change for FSx File Gateway Amazon FSx File Gateway is no longer available to new October 28, 2024 customers. Existing cust omers of FSx File Gateway can continue to use the service normally. For capabilities similar to FSx File Gateway, visit this blog post. Notice of availability
storagegateway-vgw-ug-127
storagegateway-vgw-ug.pdf
127
Gateway User Guide • API version: 2013-06-30 • Latest documentation update: November 24, 2020 The following table describes important changes in each release of the AWS Storage Gateway User Guide after April 2018. For notification about updates to this documentation, you can subscribe to an RSS feed. Change Description Date Notice of availability change for FSx File Gateway Amazon FSx File Gateway is no longer available to new October 28, 2024 customers. Existing cust omers of FSx File Gateway can continue to use the service normally. For capabilities similar to FSx File Gateway, visit this blog post. Notice of availability change for FSx File Gateway AWS Storage Gateway’s FSx File Gateway will no September 26, 2024 longer be available to new customers starting 10/28/24. To use the service, you must sign up prior to that date. Existing customers of FSx File Gateway can continue to use the service normally. For capabilities similar to FSx File Gateway, visit this blog post. Added option to turn maintenance updates on or off Storage Gateway receives regular maintenance updates that can include operating June 6, 2024 system and software API Version 2013-06-30 348 AWS Storage Gateway Volume Gateway User Guide upgrades, fixes to address stability, performance, and security, and access to new features. You can now configure a setting to turn these updates on or off for each individual gateway in your deployment. For more information, see Managing gateway updates using the AWS Storage Gateway console. Deprecated support for Tape Gateway on Snowball Edge It is no longer possible to host Tape Gateway on Snowball March 14, 2024 Edge devices. Updated instructions for testing your gateway setup The instructions for testing your gateway setup using using 3rd party applications 3rd party applications October 24, 2023 now describe the expected behavior if your gateway restarts during an ongoing backup job. For more information, see . API Version 2013-06-30 349 AWS Storage Gateway Volume Gateway User Guide Updated recommended CloudWatch alarms The CloudWatch HealthNot October 2, 2023 alarm now ifications applies to and is recommende d for all gateway types and host platforms. Recommend ed configuration settings have also been updated for HealthNotifications and AvailabilityNotifi cations . For more information see Understan ding CloudWatch alarms. Separated Tape and Volume Gateway User Guides The Storage Gateway User Guide, which previously March 23, 2022 contained information about both the tape and Volume Gateway types, has been split into the Tape Gateway User Guide and the Volume Gateway User Guide, each containing information on only one type of gateway. For more information, see Tape Gateway User Guide and Volume Gateway User Guide. Procedures for creating all gateway types using the Storage Gateway console have been updated. For more information, see Creating Your Gateway. Updated gateway creation procedures January 18, 2022 API Version 2013-06-30 350 AWS Storage Gateway New Tapes interface Volume Gateway User Guide September 23, 2021 The Tape overview page in the AWS Storage Gateway console has been updated with new search and filtering features. All relevant procedures in this guide have been updated to describe the new functionality. For more information, see Managing Your Tape Gateway. Support for Quest NetVault Backup 13 for Tape Gateway Tape Gateways now support Quest NetVault Backup 13 August 22, 2021 running on Microsoft Win dows Server 2012 R2 or Microsoft Windows Server 2016. For more information, see, see Testing Your Setup by Using Quest NetVault Backup. S3 File Gateway topics removed from Tape and To help make the user guides for Tape Gateway and Volume July 21, 2021 Volume Gateway guides Gateway easier to follow for Support for IBM Spectrum Protect 8.1.10 on Windows and Linux for Tape Gateway customers setting up their respective gateway types, some unnecessary topics have been removed. Tape Gateways now support IBM Spectrum Protect version 8.1.10 running on Microsoft Windows Server and Linux. For more information, see Testing Your Setup by Using IBM Spectrum Protect. November 24, 2020 API Version 2013-06-30 351 AWS Storage Gateway Volume Gateway User Guide FedRAMP compliance Schedule-based bandwidth throttling November 24, 2020 November 9, 2020 Storage Gateway is now FedRAMP compliant. For more information, see Compliance validation for Storage Gateway. Storage Gateway now supports schedule-based bandwidth throttling for tape and Volume Gateways. For more information, see Scheduling bandwidth throttling using the Storage Gateway console. Cached volume and Tape Gateways local cache storage Storage Gateway now supports a local cache of November 9, 2020 4x increase Gateway migration up to 64 TB for cached volume and Tape Gateways, improving performance for on-premises applications by providing low-latency access to larger working datasets. For more information, see Recommended local disk sizes for your gateway. Storage Gateway now supports migrating cached Volume Gateways to new virtual machines. For more information, see Moving Cached Volumes to a New Cached Volume Gateway Virtual Machine. September 10, 2020
storagegateway-vgw-ug-128
storagegateway-vgw-ug.pdf
128
Gateways. For more information, see Scheduling bandwidth throttling using the Storage Gateway console. Cached volume and Tape Gateways local cache storage Storage Gateway now supports a local cache of November 9, 2020 4x increase Gateway migration up to 64 TB for cached volume and Tape Gateways, improving performance for on-premises applications by providing low-latency access to larger working datasets. For more information, see Recommended local disk sizes for your gateway. Storage Gateway now supports migrating cached Volume Gateways to new virtual machines. For more information, see Moving Cached Volumes to a New Cached Volume Gateway Virtual Machine. September 10, 2020 API Version 2013-06-30 352 AWS Storage Gateway Volume Gateway User Guide Support for tape retention lock and write-once-read-ma Storage Gateway supports tape retention lock on virtual August 19, 2020 ny (WORM) tape protection tapes and write once read many (WORM). Tape retention lock lets you specify the retention mode and period on archived virtual tapes, preventing them from being deleted for a fixed amount of time up to 100 years. It includes permission controls on who can delete tapes or modify retention settings. For more information, see Using Tape Retention Lock. WORM- activated virtual tapes help ensure that data on active tapes in your virtual tape library cannot be overwritten or erased. For more informati on, see Write Once, Read Many (WORM) Tape Protectio n. Order the hardware appliance through the console You can now order the hardware appliance through August 12, 2020 the AWS Storage Gateway console. For more informati on, see Using the Storage Gateway Hardware Appliance. API Version 2013-06-30 353 AWS Storage Gateway Volume Gateway User Guide Support for Federal Informati on Processing Standard You can now activate a gateway with FIPS endpoints July 31, 2020 (FIPS) endpoints in new AWS in the US East (Ohio), US E Regions Gateway migration ast (N. Virginia), US West (N. California), US West (Oregon), and Canada (Central) Regions. For more informati on, see AWS Storage Gateway endpoints and quotas in the AWS General Reference. Storage Gateway now supports migrating tape and stored Volume Gateways to new virtual machines. For more information, see Moving Your Data to a New Gateway. July 31, 2020 View Amazon CloudWatc h alarms in the Storage You can now view CloudWatc h alarms in the Storage May 29, 2020 Gateway console Gateway console. For more information, see Understan ding CloudWatch alarms. Support for Federal Informati on Processing Standard (FIPS) You can now activate a gateway with FIPS endpoints May 22, 2020 endpoints in the AWS GovCloud (US) Regions. To choose a FIPS endpoint for a Volume Gateway, see Choosing a service endpoint. To choose a FIPS endpoint for a Tape Gateway, see Connect your Tape Gateway to AWS. API Version 2013-06-30 354 AWS Storage Gateway New AWS Regions Volume Gateway User Guide May 7, 2020 Storage Gateway is now available in the Africa (Cape Town) and Europe (Milan) Regions. For more informati on, see AWS Storage Gateway endpoints and quotas in the AWS General Reference. Support for S3 Intelligent- Tiering storage class Storage Gateway now supports S3 Intelligent-Tierin April 30, 2020 Tape Gateway write and read performance 2x increase g storage class. The S3 I ntelligent-Tiering storage class optimizes storage costs by automatically moving data to the most cost-effe ctive storage access tier, without performance impact or operational overhead. For more information, see Storage class for automatic ally optimizing frequently and infrequently accessed objects in the Amazon Simple Storage Service User Guide. Storage Gateway increases performance for reading from and writing to virtual tapes on Tape Gateway by 2x, allowing you to perform faster backup and recovery than before. For more information, see Performance Guidance for Tape Gateways in the Storage Gateway User Guide. April 23, 2020 API Version 2013-06-30 355 AWS Storage Gateway Volume Gateway User Guide Support for automatic tape creation Storage Gateway now provides the ability to April 23, 2020 automatically create new virtual tapes. Tape Gateway automatically creates new virtual tapes to maintain the minimum number of available tapes you configure and then makes these new tapes available for import by the backup application, allowing your backup jobs to run without interruption. For more information, see Creating Tapes Automatically in the Storage Gateway User Guide. Storage Gateway is now available in the AWS GovCloud (US-East) Region. For more information, see AWS Storage Gateway Endp oints and Quotas in the AWS General Reference. March 12, 2020 New AWS Region API Version 2013-06-30 356 AWS Storage Gateway Volume Gateway User Guide Support for Linux Kernel-ba sed Virtual Machine (KVM) Storage Gateway now provides the ability to deploy February 4, 2020 hypervisor an on-premises gateway on the KVM virtualization platform. Gateways deployed on KVM have all the same functionality and features as the existing on-premises gateways. For more informat ion, see Supported Hy pervisors and