Creating a free iSCSI SAN with openfiler
This article makes use of the openfiler product to create an iSCSI target for an iSCSI SAN.
As we know we need a SAN for our VI so we can make use of advanced features such as vMotion, svMotion, HA, FT, DRS and DPM. The benefits of a SAN also include the fact that all your VI storage can potentially reside in a central location easing the administration burden.
It is recommended that openfiler is installed on dedicated physical server external to the VI, however for the purpose of our demo we can install it on a VM within the v-Sphere server.
openfiler is a free product widely available on the web and it is free to use. You can download openfiler at the following link www.openfiler.com.
Creating an iSCSI datastore
Below is a step by step process on creating an iSCSI datastore to be used in v-Sphere:
- Create a new VM called vm-iSCSI.
- OS will need to be “Other Linux (64-bit)”.
- Primary HD can be 8GB.
- Edit VM and increase RAM to 1GB.
- Remove floppy.
- Add a new HD, thin provisioned, of 200GB.
- Map open filer *.iso to CD\DVD.
- Power on VM and start the open filer installation.
- Keep everything at default until it asks to delete partitions, choose yes for sda. Choose no for sdb (this will be done later for the iSCSI partition).
- Keep everything to default until you get to the networking part, where you will need to specify a static IP and hostname.
- Time can be chosen however it will be synched later on using ntp.
- Configure Open Filer as an iSCSI target server.
- Point your web browser to https://hostname:446.
- Use “openfiler” for user and “password” for password.
- Configure the ntp time synch by going to System > Clock SetUp
- Create a “new physical volume” (for /dev/sdb) and follow the screen prompts, use 200GB as the size:
- Next add the “volume” to a “volume group”, so click on “add volume” on the right hand-side and create a “volume group” and then add the 200GB volume to it.
- Create FS within the volume, so click on Shares and “create a new filesystem volume”.
- Create the volume with the FS type.
- Click on services and enable iSCSI.
- Go to “volumes” > “Target Configuration” and add the newly created iSCSI target.
- Go to “Lun Mapping” and map the newly created iSCSI lun to iSCSI target.
- Go to “Network ACL” and allow the ESX host to map to the iSCSI target and make sure you set access to “allow”.
- In ESX allow networking on the vSwicth to use a vmkernel port for communication with iSCSI target.
- Enable software iSCSI initiator in vSphere.
- Discover iSCSI target by Dynamically discovering.
- Add iSCSI storage and format iSCSI LUN using vmfs3 for use in vSphere.