I recently acquired a Gen8 HP Microserver for use as a new NAS.  My existing NAS’ run variants of OpenSolaris (ie, NexentaStor community edition), but I wanted to get away from using Nexenta’s products for various reasons.  I chose OmniOS because it’s based on Illumos, which NexentaStor is also based on, and because it has drivers for the BCM5720 on-board NICs.

One of the things I wanted to do with this nas was to use an SSD for both rpool and l2arc.  I only have room for one SSD, and since the rpool gets very little I/O I thought I would add the L2ARC to the same SSD.  This turned out to be fairly challenging, since I couldn’t find many instances of people doing it, and even less information on actually how to do it.  I thought I’d share what I did, in the hopes it will benefit someone else.

After installing OmniOS, and specifying that rpool should consume 40GB of my 256GB SSD, the real fun began.  Here are the steps to performing this task.

Run the format command, to change the partition size via fdisk (select the disk, in my case 4, then type fdisk).  Originally it looked like this:

But we need to change that so the partition uses 100% of the disk instead of 17%.  So delete the partition and then create a new one.  Note that this doesn’t remove any data, we’re only changing the partition table. Just make sure the starting cylinder is the same, and the new partition is larger than the old one.  Now it will look like this:

Our next step is to update the slices within this partition.  Enter 6 in the fdisk menu to update disk configuration and exit, then enter the partition menu by typing p, and then p again to print the current table.  You’ll see something like this:

Notice that the second slice or partition has changed size already, but we’ve lost our root slice.  Recreate it using the same starting cylinder it had before:

Next we can create a slice to use for our l2arc.  Any of the partition numbers between 3 and 7 can be used, but I chose 5, with a starting cylinder after our root slice.  I also decided to give it to partition tag of var.  There’s a limited set of partition tags one can use.  It’s probably not the way an experienced Solaris sysadmin would do it, but it’s how I’ve done it.

Note that I wanted to only use 100GB of the SSD for the L2ARC. This leaves a number of unused blocks on the SSD, which will hopefully limit the performance drop when the L2ARC partition fills up.

Finally, save the changes with the label command, press y to continue.

Now we can specify this slice in our zpool add command.  It will give us a warning that the partition overlaps with the backup partition, but partitions with the backup tag are required to specify the full disk capacity so I couldn’t see a way around that.

Job is done! I’m currently running some load tests to ensure that everything works as expected, but so far, so good!