In the third part of the series we will discuss how do create a storage volume and how to use it completing the task of having a functional backup solution.

These would be the remaining high-level steps to accomplish this:

  • Create the storage volume specifying the desired size
  • Configure the iSCSI initiator to connect to the device where the storage volume is configured
  • Connect to the target that represents the storage volume
  • Initialize the disk on the client computer
  • Format and assign a drive letter to the disk representing the storage volume
  • Start copying data to the new drive per your needs

VMware Training – Resources (Intense)

As you might remember from the second part of the series, we have activated one storage gateway:

To create a storage volume, select the “Volumes” tab and then click on “Create Volume”:

Next you will have to go through a few steps. Some of them can be skipped, but in a later part of the series we will come back and make real use of them.

The first step will be to configure the local storage. Remember that in part two of the series, we added two hard disks to the storage VM. One was for cache storage and one was for the upload buffer. We will make use of them here:

There is the possibility to configure alarms in case the upload buffer and cache storage disks get filled in above specific threshold that you configure. You can either choose to set the alarms or you can skip setting them up. This is for the upload buffer utilization:

And this one is for the cache storage:

Now the interesting part follows. You will need to configure the storage volume. This is the virtual hard disk where you will be backing up your data. You can configure anything up to 32TB. You will also get the iSCSI target name (iqn.1997-05.com.amazon:myvolume) that you will need later to attach the volume to your server. The host IP address and port cannot be modified. The host IP address is the IP address that was assigned to the storage gateway VM. Click on “Create Volume” to finish:

Optionally, you can configure the CHAP authentication as part of volume creation:

You will find the volume just created in the “Volumes” tab where you can see the size and the status:

Select the volume and then choose the “Details” tab from below to get detailed information about the volume:

More interesting information is contained in the “iSCSI Target Info” tab. Basically this is the information that will be required when you will start using the iSCSI initiator software on the client.

And you are done with the volume creation. Next you will need to use an iSCSI initiator software to connect to the gateway’s volume.

A iSCSI initiator allows the user to connect a host to an external iSCSI based storage array through an Ethernet NIC.

Based on the operating system that you are using, the software needed is different. It can be already installed like it is on Windows 7 or you might need to install it if you are using Ubuntu.

For our testing we will use Windows 7 because the software is already installed.

Start the iSCSI Initiator software, select the “Discovery” tab and then click on “Discover Portal”:

The discover portal contains the IP address of the storage gateway and the port on which the iSCSI initiator should connect to. We will use the information that we got during the storage gateway deployment and volume creation:

Once you click on OK and then go to “Targets” tab, you will see that our target was auto discovered but it is inactive:

Select the target to which you want to connect and click on “Connect”:

You will be asked for confirmation and you can enable extra options:

Now you are connected to the target:

Now it’s time to use the volume. For this, you will need to go to the Control Panel, then on Computer Management and select the Storage section. Yow should see a new disk that is not initialized:

Right click on this disk and initialize it:

You can leave everything as it is and finish the disk initialization:

Now that the disk was initialized, it’s time to create a new volume to which we will assign a drive letter like for any other partition that you might have. Right click on the disk and select “New Simple Volume”:

Follow the process where you will specify the volume size, the drive letter and optionally you can format the new drive and eventually you should get something like this:

As you can see, during volume creation, I assigned drive letter “E” and now along with the initial drive that I had, I can see the new drive in “My Computer”:

Now you can copy data on the new drive, as it would be a local hard disk. But you actually copy the data to the storage gateway and eventually to the Amazon S3 bucket.

Let’s see quickly how you connect using the iSCSI initiator from Ubuntu.

Check what targets are available on the host:

lab@UBUNTU:~$ sudo iscsiadm -m discovery -t st -p 172.30.158.240
172.30.158.240:3260,1 iqn.1997-05.com.amazon:myvolume
lab@UBUNTU:~$

Connect to the iSCSI target:

lab@UBUNTU:~$ sudo iscsiadm -m node --login
Logging in to [iface: default, target: iqn.1997-05.com.amazon:myvolume, portal: 172.30.158.240,3260] (multiple)
Login to [iface: default, target: iqn.1997-05.com.amazon:myvolume, portal: 172.30.158.240,3260] successful.
lab@UBUNTU:~$

To find out what device is used for the new disk and that it was properly detected, check the dmesg output:

lab@UBUNTU:~$ dmesg | grep sd
[2228747.117076] sd 3:0:0:0: Attached scsi generic sg2 type 0
[2228747.127542] sd 3:0:0:0: [sdb] 314572800 512-byte logical blocks: (161 GB/150 GiB)
[2228747.131406] sd 3:0:0:0: [sdb] Write Protect is off
[2228747.131410] sd 3:0:0:0: [sdb] Mode Sense: 19 00 00 00
[2228747.133786] sd 3:0:0:0: [sdb] No Caching mode page found
[2228747.135053] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[2228748.979842] sdb: unknown partition table
[2228748.995817] sd 3:0:0:0: [sdb] Attached SCSI disk
lab@UBUNTU:~$

From this point on you can proceed with the regular Linux commands to create a partition, format the file system and mount the new iSCSI disk.

By reaching this point of the article and of the series, you should know how to deploy a functional backup solution using S3 buckets through storage gateways.

In the next part of the series, we will discuss snapshots – what they are and how you can use them.

Reference