Mac OS X,  Mac OS X Server,  Xsan

How to Use Xsan with iSCSI

Using iSCSI targets with Xsan… Don’t do this one at home kids.  It’s just silly and not going to be supported by anyone…  But if you are like me then you can do it if you must.  So to get started with iSCSI check out this article. When you have a LUN that is connected don’t yet assign it a file system (or if you have partition it back to free space). Now install Xsan but don’t yet create a volume. Once you’re done, you can go ahead and fire up your trusty Terminal app from /Applications/Utilities. Type in cvlabel -l which should show you all your available LUNs. Next, type the following, which will dump your cvlabel information out to a file called labels:

cvlabel -c >labels

Now that you have your file open it in your favorite text editor and change the very first text field to read what you want your LUN to be called within Xsan Admin. Once you’re satisfied save the file. Now, use the following command, which will read the file you just edited and then label the LUN for use with acfs using the name you just provided, making it appear in Xsan admin:
cvlabel labels

Now you can open up Xsan Admin. Here, click on LUNs in your SAN Assets. Make sure that the LUN you just labelled shows up as seen below.

iSCSI LUN in Xsan Admin
iSCSI LUN in Xsan Admin

Next, click on Volumes in your SAN Assets and then click on the plus sign (+) to create a new Volume.  At the Volume Name and Type Screen, enter the name you would like your volume to be called, customize the Volume Type and advanced fields for any performance tuning you would like to do and then click on the Continue button to proceed.

 

Xsan Volume Name and Type Screen
Xsan Volume Name and Type Screen

At the Configure Volume Affinities tab, drag your LUNs into the appropriate Storage Pools.  For this example we only have one storage pool so we won’t be needing the additional items listed here.

Xsan Configure Volume Affinities Screen
Xsan Configure Volume Affinities Screen

Next click Continue, assign the metadata controllers to your volume and then click Continue again.  Your volume will now mount on the desktop and be listed as can be seen below.

Xsan Volumes with iSCSI Storage
Xsan Volumes with iSCSI Storage

Once again, this article shows you how to do something that you should likely not put into production.  Having said this, iSCSI can be great for some uses, but when used in conjunction with Xsan and the apple clustered file system (acfs) you might be best off sticking with fiber channel…