It’s not the daily increase but daily decrease.Hack away at the unessential.
– Bruce Lee
As many of you know VMware storage only uses certain types of storage arrays most of them coming with astronomical price-tags. I would like to show you a way to get terabytes of storage into vCenter for only a couple of hundred bucks. Warning as suggested in the page title this is a hack so its going to be at your discretion to use in a production environment or as a storage device at all (but it works :).. We aren’t going to dive into code hacking or break any of VMware’s patents etc.. This is a tutorial on creating an iSCSI target that is fully redundant and has cutting edge striping and data redundancy usually only seen by UNIX backend servers.
Now that the formalities are over onto what this has to do with VMware? Well VMware does not recognize IDE or SATA hard drives by default and you cant install ESX on them or use them for storage. This forces you to buy expensive disks and including NAS and SAN devices that aren’t in everyone’s budget. There are only certain compatible NAS devices that will work with VMware as well which really limits your selection and they work at the file level. This means its not a block device and you cant do a lot of the neat features offered by VMware such as asynchronous replication, sync replication, snapshots, clones, thin provisioning, and others. So what I did was buy some Western Digital red hard drives that are NAS ready because they don’t power down and are pretty inexpensive, an old PC case and a motherboard that supports 8 GB of RAM. Below I’m going to create an open-source NAS server with the hardware just mentioned, assign an iSCSI target to it so that its block level, and then add it to my ESX server.
Let me say I loved SUN Solaris as well as Open Solaris and Open Indiana for their use of ZFS storage. I touched on it on a previous post here but if you want to learn more please check out a great introduction here. ZFS is a fully redundant software RAID that blows most other technologies completely out of the water in terms of speed and capabilities and don’t let the software RAID part spook you its independent of the OS itself. Now there are only a few operating systems that support ZFS mainly the Solaris forks that came when Oracle bought SUN and BSD. Unfortunately Linux doesn’t do a native support of ZFS and you need to hack the kernel etc. to get a poor version of it installed, so if you’re not comfortable enough with BSD you can simply use Nas4Free or FreeNas.
I personally chose to use Nas4Free which I find easier to Navigate and has the latest BSD release allowing for more hardware options while FreeNas was bought by a hardware company a while back and is not compatible with other ZFS implementations. In a nut shell if you want to start creating backend pools, ZFS copies and uber techie this is the choice for you. Here is a nice ZFS setup doc you can use to guide your way to a simple setup along with creating an iSCSI target to use.
The next step is creating an iSCSI switch and port:
1. Go into your ESX server under the configuration tab–>then Networking on the left Now Choose –>Add Networking
6. You should now see the new switch and kernel
7. You are ready to Connect the storage you created
While you are still under the configuration tab move over to the Storage section right above networking. Click the Rescan All button above
You may get lucky here and it will find your device immediately but not too likely..
1. So, go to Storage Adapters on the left and find your iSCSI software initiator highlight it and choose properties
2. Click on the CHAP button
3. If you decided to enter a CHAP authentication you can fill in the secret, if not I suggest using the following info which will prompt you anyway if you did
4. Go to the Dynamic Discovery Tab and Click Add and enter in the NAS IP address that is sharing your disk pool..
5. I used CHAP so I entered in the secret but if you didnt refer back to step 3 for the correct info.
6. Now if you go over to the Static discovery tab you should see the iSCSI target from the NAS4Free server that you created. (As you can see I created a very distinct name:)
7. you will be prompted to scan for new storage after configuring the software initiator allow it.
8. Go to Storage –> Configuration and choose Add Storage
9. Disk/LUN (sort of) which will show the target is now present
10. Here is the big question what type of format do you want? Read my notes in the image for some further clarification.
11. You will see your current system layout shown with capacity listed and device type. (Say good bye to 35K SAN and hello to $600)
12. Enter your Datastore name (You may not want to use this in the office:)
13. Use the full partition available to you
14. You are now ready to finish after reviewing your layout
15. You are done. Start having fun with all the new features available to you
Again use this information at your own discretion and consider implementing a good DR plan as well to go along with it.
Considerations to make for optimizing the setup we just did are
1. Using a switch w jumbo frame support because of the iSCSI traffic is very large and requires good throughput.
2. Multiple ZFS backends if you want crazy redundancy and have mission critical data or want to impress your colleagues.
3. VLAN the iSCSI NW since no fiber connections exist. This is an option to consider for traffic bottle necks but I just ran all of the iSCSI traffic over the second NIC and used a single switch that had jumbo frame support. Its really up to you and what resources you have available.
Till Next time,—