Sunday Aug 31, 2008
Sunday Aug 31, 2008
Today I will write about a great subject which means a lot to me.
I read so often that people will use NFS as a cheap and easy shared storage for VMware ESX.
Conceptional! If you want to test something in a test environment, you need cheap storage or what ever you can use NFS. But why so much pepole will use NFS on Linux? There is not one benefit against NFS on ZFS with Solaris 10/Nevada. So lets use a great protocol from the same vendor who develop a very great filesystem and operating system. Lets checkout NFS and ZFS with Solaris...
VMware ESX, Solaris 10/Nevada with ZFS. The perfect NFS...
First, I will show you the benefits of NFS:
Now I will show you some benefits of ZFS:
So, I think we are ready to start with this great couple.
The first you need to do is to download the free Solaris OS from Sun. You can download Solaris 10 at www.sun.com. Its also possible to use the upcoming Solaris in a Developer Edition. Solaris Nevada is available at www.opensolaris.org but there is no possibility to buy support at the moment.
Dont be scared ahead the installation of Solaris! A lot of pepole wirte me that they don´t want to install Solaris but it is so easy with the new versions like Windows or Linux. Just test it! You need only a fews clicks to complete the installation.
After you installed Solaris we can create a ZFS Pool.
In the Bash (right click the desktop and then terminal) you can initiate all hdd´s with "#disk" and show all disks with "#format". You need a minimum of 2 hdd´s in the system because you can´t install ZFS volumes on the system disk.

We can create now a pool with for example 4 hdd´s. Just set up this command:
"#zpool create zfspool raidz c0d1 c1d1 c2t0d0 c2t1d0"
What happend now? We create a ZFS Pool with the 4 HDD´s c0d1 c1d1 c2t0d0 c2t1d0. The ZFS Pool is mounted to /zfspool. The pool is directly a RAIDZ. This is a sepcail RAID level for ZFS. It´s like Raid 5 with better functions because there isn´t a write break between „date-write“ and „parity-write! That´s it! Easy going or what do you think?
With the command "#zpool" list it is possible to see your ZFS Pool.

In this ZFS Pool it is possible to create a lot of ZFS Volumes. This is a great option. Because all volumes shrink and grow automatic you must just watch the size of the pool. The volumes mange themself.
"#zfs create zfspool/VMware_ESX_NFS"
With this command we create the new Volume in the pool. 
Now you have a full functional ZFS Volume with RAIDZ and you only use 2 commands. I think this is very great!
In this example you see the automatic growing and shrinkingoption. I copy a file to the filesystem and delte it again and the Volume has the same size as before.
Now we are ready to share the ZFS Volume over NFS to our ESX Server.
Firt we need to setup the vmkernel at our ESX Server. Over the vmkernel the ESX connect to the NFS Server.
Connect with the VI Client to the ESX Server or Virtucal Center and configure this option.

After you have done this, we can configure the ZFS Volume that it is possible that the ESX Server can connect to ths NFS volume.
#share –F nfs –o rw,root=192.168.36.204 /zfspool/esx_nfs_datastore
Now the ESX Host can access the NFS datastore. If you have more then one ESX host you can add more IP adresses to this command.
This is just a short view for the options with ZFS and NFS. I hope you read this article and test this great couple. Solaris, NFS and ZFSis a greap option for a cheap, fast and save storage system on a ESX Server.
Feedback is welcome.
Wish you all guys a nice day,
Thomas
If you are using ZFS, you can optimize the sharing process by using options on the 'zfs' command while creating the filesystem, and you won't need to use the subsequent 'share' command.
server# zpool create zfspool raidz c0d1 c1d1 c2t0d0 c2t1d0
server# zfs create -o sharenfs=rw=192.168.36.204,root=192.168.36.204 pool/esx-export
server:~# showmount -e
export list for server:
/pool/esx-export 192.168.36.204
You've got your filesystem, with the NFS export managed by the ZFS subsystem, rather than having to manage the shares separately.
As far as I know, it is not recommended to simultaneously use both 'share' and ZFS to manage shares. IMHO, you should be using ZFS to manage all shares.
MK
Posted by Michael Kennedy on September 01, 2008 at 02:24 PM CEST #
Have you benchmark this setup against a Solaris iSCSI target ?
besides backups at the file level, is there any other advantages, that make NFS more appealing that iSCSI ?
Great Article !
Thanks
Posted by Humberto Ramirez on September 12, 2008 at 03:26 PM CEST #
Hi,
thanks for the positive response.
My last information was that Solaris 10 with iSCSI is not supported because there are problems with the iSCSI Initiator from Solaris/ESX. At this time there was Update 4 state of the art. I will check what´s up with Update 5.
Thanks for this comment
Posted by Thomas Weyell on September 12, 2008 at 06:55 PM CEST #
I testet with X4500 with NFS shares and as a iSCSI target - throughput over 1Gbit LAN ~100MB/sec
NFS and ISCSI only whit ZFS options:
shareiscsi = on
Posted by Michael on September 18, 2008 at 03:18 PM CEST #
Michael, do you have any numbers you can post ? read/writes ? ....
Posted by Humberto Ramirez on September 18, 2008 at 03:27 PM CEST #