ZFS - how to partition SSD for ZIL or L2ARC use?

I'm working with a Sun x4540 unit with two pools and newly-installed ZIL (OCZ Vertex 2 Pro) and L2ARC (Intel X25-M) devices. Since I need to keep these two pools in the near-term, I'd like to know how to partition these devices to serve both pools of data. I've tried format, parted and fdisk and can't quite seem to get the right combination to generate recognizable partitions for zpool add. The OS in this case is NexentaStor, but I will also need this for general OpenSolaris solutions.


It's not a good idea to share an SSD between pools for reasons of data integrity and performance.

First, ZFS needs to be able to trigger the device's onboard cache to flush when a synchronous write is requested, to ensure that the write is really on stable storage before returning to the application. It can only do this if it controls the whole device. If using a slice, ZFS cannot issue the cache flush and you risk losing data during an unexpected shutdown.

Second, the SSD, while very fast, is still a finite resource. Sharing that resource between pools means that the expected performance of the device from either pool's perspective could be vastly different if the drive is busy serving IOPS from the other pool. The end result is that you could have worse performance than if you didn't use the SSD at all.

Dedicated ZIL and L2ARC devices per pool is the way to go.


According to this it should be fairly straightforward. I don't think the partitions themselves matter as much, but your I think disk label needs to be SMI.


You don't need to partition the devices. ZFS can use slices, fdisk or GPT partitions but doesn't require any of them. Using the unpartitioned whole device is actually the recommended way when possible.