If you have some extra hardware floating around with reasonable disk space you can use it as a cheap iSCSI device to store non-critical VM backups using VDR. The process is pretty easy and works really well. I have several of these running in our lab, including some that are Openfiler running as a VM on ESX 5 and even then performance is pretty good. This article assumes that you already have Openfiler (http://www.openfiler.com/community/download) installed on a piece of hardware and the networking configured. For sure I recommend running 2 nics, one for management and the second as a private iSCSI network. Once all that is done all you need to do is configure the storage and iSCSI on the Openfiler box as well as your ESX host. Let’s see how we acomplish that:
1. Login to the Openfiler web interface and click on the Volumes tab and then on the right sidebar select Block Devices.
2. Select the section that says “Create a partition in /dev/sd(b)” The settings you use are: “Mode = Primary”, “Partition Type = Physical Volume”. Starting and Ending cylinders are set automatically to the largest setting and do not need modified unless you so choose. Then hit “Create”
3. Now click on the “Volume Groups” option on the right sidebar and you will see an option to “Create a new volume group”. Check the box for the physical volume you just created and give it a name like “VDR“.
4. Once that is complete click on the “Add Volume” option on the right sidebar and select your new “VDR” volume group. Under the section “Create a volume in ‘VDR‘” you can create a new volume. Name it something like “VDR” and give it all the available space. MAKE SURE that you change the “Filesystem / Volume Type” to iSCSI.
5. Your storage is ready, now we need to get iSCSI running. To do this you need to start the iSCSI Target Service and allow network access. To start the service click on the “Services” tab on the top toolbar and start the service. To get the iSCSI Network up and running go back to the “Volumes” tab and “iSCSI Targets”. Now you will notice 4 grey tabs under your top toolbar. Using these tabs create a new IQN under the “Target Configuration” tab and give your private iSCSI LAN access via the “Network ACL” tab.
6. Now that iSCSI is running we need to map the IQN to the LUN that we created earlier. It is as easy as going to “LUN Mapping” and selecting the LUN and hitting “Map”. Your job in the Openfiler webconsole is complete. Now off to the ESX host.
7. Open your vSphere Client and connect to your vCenter Server and your ESX host that is connected to the Openfiler box. I am assuming that you have already configured a NIC on the ESX host and it can ping the Openfiler private IP. If not you need to get that working before continuing.
8. In the vSphere client select the ESX host and go to the “Configuration” tab and select “Storage Adapters” from the left sidebar. Now select the “iSCSI Software Adapter” and click “Properties…”. Click on the “Configure…” button and enable iSCSI. Once iSCSI is enabled click on the “Dynamic Discovery” tab and add the IP of your Openfiler box. Once that is done and you Ok out of the menu it will prompt you to do a rescan which you want to do. If it all went well then once the Rescan is complete you should see a new device. If not then make sure your 2 boxes are talking to each other.
9. Now that our iSCSI Adapter can talk to our shiny Openfiler box we need to actually use that space to store our VDR backups. To do this click on the “Storage” option and select “Add Storage” option. This should bring up a wizard explaining how to add the storage. Name the new Datastore something like “VDR Backups”.
10. Right click on your VDR Appliance and go to “Edit Settings” and “Add..” a new hard drive making sure to select the new Datastore you just created. Don’t give the drive all the space on the Datastore. Make sure to leave several GB free for ESX to use for file operations.
11. Congratulations, now all you need to do is add the Datastore to your VDR Appliance as a backup destination!