

# Working with Volume Gateway storage resources
<a name="resource-volume-gateway"></a>

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](add-remove-disks.md) - 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.
+ [Managing Amazon EBS volumes on Amazon EC2 gateways](GatewayInstanceStorage-common.md) - 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
<a name="add-remove-disks"></a>

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
<a name="remove-disk-vmware"></a>

You can use the following procedure to remove a disk from your gateway hosted on VMware hypervisor.<a name="CachedLocalDiskUploadBufferSizing-commonRemovingConsoleVMware"></a>

**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**. 

1. 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.

1. 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
<a name="remove-disk-hyperV"></a>

Using the following procedure, you can remove a disk from your gateway hosted on a Microsoft Hyper-V hypervisor.<a name="CachedLocalDiskUploadBufferSizing-commonRemovingConsoleHyperV"></a>

**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**. 

1. 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.

1. Choose **OK** to apply the change.

## Removing a Disk from a Gateway Hosted on Linux KVM
<a name="remove-disk-KVM"></a>

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
<a name="GatewayInstanceStorage-common"></a>

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)](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html) 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](decide-local-disks-and-sizes.md#CachedLocalDiskUploadBufferSizing-common) and [Determining the size of cache storage to allocate](decide-local-disks-and-sizes.md#CachedLocalDiskCacheSizing-common).

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](resource-gateway-limits.md).<a name="EC2GatewayAddBlockStorage-common"></a>

**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](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html) in the *Amazon EC2 User Guide*.

1. Attach the Amazon EBS volume to your Amazon EC2 instance. For instructions, see [Attaching an Amazon EBS Volume to an Instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html) in the *Amazon EC2 User Guide*.

1. 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](ManagingLocalStorage-common.md).

There are times you might find you don’t need the amount of storage you allocated for the upload buffer. <a name="EC2GatewayRemoveBlockStorage-common"></a>

**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](MaintenanceShutDown-common.md) section.

1. Detach the Amazon EBS volume from your Amazon EC2 instance. For instructions, see [Detaching an Amazon EBS Volume from an Instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html) in the *Amazon EC2 User Guide*.

1. Delete the Amazon EBS volume. For instructions, see [Deleting an Amazon EBS Volume](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html) in the *Amazon EC2 User Guide*.

1. Start the gateway by following the approach described in the [Shutting Down Your Gateway VM](MaintenanceShutDown-common.md) section.