Xsan

Xsan: Create a Volume

Once you have created your SAN you will want to build a volume. The volume is what is logically shown to end users running as Xsan clients and by default will automatically mount for them when they log into their computer. Creating the volume is a straight forward matter. To begin, open Xsan Admin and you will see a screen similar to the one below.

Xsan Admin

Click on Volumes in your SAN Assets side bar and you will see a blank listing of Volumes. Here, click on the + sign in the bottom right hand side of the screen. This will begin the volume creation wizard at the SAN Setup Screen.

SAN Setup Screen

Here, type the volume name and choose what type of data will reside on the volume. The options you choose here will directly impact the performance of the SAN in a variety of ways. You can click on the Advanced Settings… button to see the specific settings that will be applied based on your selection as can be seen below – and further customize them.

Advanced SAN Settings

The most import setting here is the Block Allocation size. Xsan uses the storage pool stripe breadth and volume block allocation size to decide how to write data to a volume and as writes typically impact performance more than reads, it is important to match these in a manner that makes sense given the type of data the SAN will be used to store. As of today Apple has not released an Xsan Tuning Guide for Xsan 2.x but the one for Xsan 1.x can be found at http://pdf.euro.apple.com/pdf/pn=Xsan_TuningGuide/Xsan_TuningGuide.pdf.

Per the setup Guide:

In general, smaller file system block sizes are best in cases where there are many small, random reads and writes, as when a volume is used for home directories or general file sharing. In cases such as these, the default 4 KB block size is best. If, however, the workflow supported by the volume consists mostly of sequential reads or writes, as is the case for audio or video streaming or capture, you can get better performance with a larger block size. Try a 64 KB block size in such cases.

Other options for this portion of the volume setup include:

  • Allocation Strategy – How data is written to the Affinity Tags (see below for more information on Affinity Tags). The Allocation Strategy of Round Robin is used by default and in most cases is recommended. You can use Balanced if you want to make sure that your Affinity Tags are written to in a consistent manner or Fill if you want to rotate between Affinity Tags in a manner where each is filled with data in sequence; however choosing either option will typically degrade performance.
  •  Spotlight – Use to enable and disable Spotlight for volumes (given that Spotlight is not currently working effectively in 2.x, this should typically be disabled)
  •  Access Control Lists – Use to enable and disable ACLs on the volume. This should typically be enabled
  •  Windows ID Mapping
  •  Allocation Settings – Always check with a technical project manager before customizing any of these settings.
  • File Expansion Min – Set the number of minimum blocks written to the SAN for each new file created. This can be customized to speed up writes for large files by increasing it or to speed up the writes for a large number of smaller files by decreasing it.
  • File Expansion Increment – The number of blocks used for each incremental size above the File Expansion Min.
  • File Expansion Max – The maximum number of blocks used for the file. Can help to reduce fragmentation on your volume
  • Cache Settings – Always check with a technical project manager before customizing any of these settings.
  • iNode Cache Size – an iNode is a data structure holding information about files in a Unix file system. There is an iNode for each file and a file is uniquely identified by the file system on which it resides and its iNode number on that system. Xsan is just a file system and uses iNodes to keep track of the data that resides on the file system.
  • Buffer Cache Size – the buffer cache is

Once you have the settings as required you can click OK and then Continue to start setting up your Affinity Tags (formerly referred to as Storage Groups in Xsan 1.x). When building your Affinity Tags it is important that each be similar in number of LUNs and expected performance as the others that are in the same volume with the exception of the metadata Affinity Tag. The metadata Affinity Tag should sit on its own RAID controller in order to keep from having any data writing while trying write metadata.

Typically there is one LUN per RAID controller. Since your Affinity Tags should be setup similar to one another in a volume your Affinity Tags need to contain similar data to one another. This means that if you have 12 data LUNs then you will typically want 3 data Affinity Tags, each with 4 LUNs. This would in actuality require 13 LUNs as you always want one LUN dedicated to metadata. If you choose to use an unbalanced setup then please consult a technical project manager prior to doing so.

The options for an Affinity Tag (as can be seen below) are:

  • Any Data – the Affinity Tag can be used to house metadata or User Data
  • Journaling and Metadata Only – the Affinity Tag can be used exclusively for metadata, or the data that keeps track of where the pieces of the user data resides on the SAN
  • User Data Only – the Affinity Tag can be used only for Data that is written to the volume
  • Only data with affinity – force data written to the Affinity Tag to a specified folder
  • Stripe Breadth – The size of each stripe of data (in blocks) written to one Affinity Tag before moving on to the next.

metadata

When setting up the stripe breadth the breadth times the Block Allocation assigned earlier in the process should alway equal 1 megabyte (MB). Per the setup guide:

The Mac OS X (or Mac OS X Server) operating system, which handles file data transfers for Xsan, performs 1 megabyte (MB) data transfers. As a result, Xsan gets maximum efficiency from the operating system when it transfers blocks of data that are a multiple of 1 MB. At the other end of the transfer, the LUN also works well when it receives 1 MB of data at a time. So, when data is written to a storage pool, you get the best performance if 1 MB of data is written to each LUN in the storage pool The amount of data Xsan writes

to a LUN is determined by the product of two values you specify when you set up a volume:

  • The volume’s block allocation size (in kilobytes)
  • The stripe breadth of the storage pools that make up the volume (in number of allocation blocks)

transfer size = block size x stripe breadth

For example, the default Xsan block size of 4 KB combines with the default storage pool stripe breadth of 256 blocks to produce a transfer size of 1 MB. If you increase the block size to 64 KB, for example, to suit data streaming, set the stripe breadth to 16 blocks, so the product of the two remains 1 MB.

Now it is time to setup your metadata controllers for your volume. Here you will see each system that is set as a Metadata controller. Typically 2 should suffice for any given volume or set of volumes. Each Metadata controller on a volume will appear in Activity Monitor as an instance of the fsm process and performance in terms of memory and processing required for the fsm process can be tracked as with any other service.

Failover

At the Volume Failover Priority screen you can customize the order of priority assigned to a metadata controller (MDC). Simply drag items higher or lower in the list to make them higher or lower priority. By default the top item in the list will always be the default MDC. More than 3 MDCs can cause unneeded latency on the volume, so feel free to deactivate any that are not needed.

When you click Continue you will now see your new Volume (as can be seen below). The Affinity Tags along with the percentage of each that is consumed with data will also appear along with the capacity of the pool (under the Size column), the Available disk space (under the Available column) and the active MDC (under the Hosted By column). The structure of the volume in terms of Affinity Tags and LUNs can also be seen here.

New Volume

Here you will have a number of options available (as can be seen below), by clicking on a Volume name and clicking on the Cog Wheel.

Volume Options

Use the Edit Notification Settings to assign email updates to administrators of the SAN. Use Edit Failover Priorty to add or remove MDCs or just change their priority. Use the Force failover to test failover between MDCs and use Start and Stop to Start and Stop the volume.

Your volume setup is now complete and you can move on to adding Computers that can see the volume.