Make The Most Of Your SSD With ZFS

<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-12162483-1"); pageTracker._trackPageview(); } catch(err) {}</script>

Rationale

 If you're anything like me, you're lucky if you have a single SSD in your workstation or server. I had a dilemma in the past, I couldn't quite find a way to make the most of my one flash drive: I had to chose between making it a ZIL or use it as L2ARC. I dreaded having to make a definitive choice for one or the other. When I installed my workstation with OpenSolaris 2009.06, I had an idea in mind, so I installed the system on the SSD in a small partition (10GB) and left the rest of the drive unallocated if you catch my drift...

Bird's Eye View

Simple! Just partition the SSD to be able to use it as both L2ARC and ZIL in whatever proportions you think is going to suit  your needs. Note however that the IOs are shared between your partitions on the same drive. From my testing though, I can tell you that with this setupu you're still coming out on top in most situations.

The Meat

It's all pretty simple really, when you install solaris, you have a choice of installing on "whole disk" or to use the tool to make a smaller custom partition. I cut out a 36GB partition which allows ample room for the system and swap. The rest of my 64GB SSD is left unallocated at install time, we'll take care of everything later.

The second disk in my system is a 300GB 10,000 rpm SATA drive which, being fast but small, I wanted to leave whole for my data pool (keep in mind that the rpool is a little different than your regular pool, so make sure to treat it accordingly). That is why I decided to compromise and use some of the SSD space for the system. You don't have, you could partition your spindle and have the system on there.

Now, that you have opensolaris up and running, install GParted to be able to edit your disks partitions. You can either use the opensolaris package manager or

pfexec pkg install SUNWGParted

It's all downhill from here. Open GParted. If you just installed it, you will need to log out and back in to see in the GNnome menu. It will be in Applications->System tools->GParted Partition Editor

Select your flash drive and carve out a 2GB partition for your ZIL and assign the remaining space for L2ARC. Apply the changes and keep the window open.


Note the two devices path in /dev/dsk because that's what we'll use to add these two SSD partitions as performance enhancing tools in our existing pool.

arnaud@ioexception:/data/dsee7.0/instances$ pfexec zpool add data log /dev/dsk/c9d0p2 cache /dev/dsk/c9d0p3

Let's check how our pool looks now...

arnaud@ioexception:/data/dsee7.0/instances$ zpool status data
  pool: data
 state: ONLINE
 scrub: none requested
config:

    NAME        STATE     READ WRITE CKSUM
    data        ONLINE       0     0     0
      c8d0      ONLINE       0     0     0
    logs
      c9d0p2    ONLINE       0     0     0
    cache
      c9d0p3    ONLINE       0     0     0

errors: No known data errors

Et voila!

You've got the best of both worlds, making the absolute most of whatever little hardware you had at your disposal!

Enjoy!

Comments:

I've looked in the default, contrib and extras repository's and I can't see SUNWGParted available in any of them.

Is there another repo?

Pete

Posted by Pete on December 14, 2009 at 08:28 PM MST #

It's in OpenSolaris.org but it has only been introduced starting with OpenSolaris build 125 on October, 17th 2009.
See here http://www.ramoonus.nl/2009/10/17/opensolaris-2010-02-build-125-released/

To bring your operating system up to date, simply do pfexec pkg image-update and everything will be taken of for you.

regards
-=arnaud=-

Posted by arnaud on December 15, 2009 at 01:42 AM MST #

Would it make sense to put the boot volume on a USB - Flash drive and then put the LARC and ZIL on an SSD?

Posted by bozon on December 16, 2009 at 01:00 AM MST #

You could.
I have done it, so it works ok.
Your system will however not be as responsive if you use Gnome because there are frequent touches in your home directory...or mount export/home to your spindle
While it works I wouldn't go down that path since we are trying to make the system as fast as possible, putting your rpool on a USB key will slow things down a bit. You'll still be better off compromising with installing on a partition on the SSD or on the spindle.

Note as well that once you installed on the USB key, you'll have to plug your key in the same USB port every time or your key's device ID will change and opensolaris won't boot.

hope this helps
-=arnaud=-

Posted by arnaud on December 16, 2009 at 02:41 AM MST #

I was thinking in terms of a NAS so I wouldn't be running Gnome. I was going to leave the usb drive plugged in because the mini-itx card that I am using has 4 sata, one ata/ide, and 6 usb2 ports. (only 2 USB2 internally though)

Posted by bozon on December 17, 2009 at 04:21 AM MST #

Sure!
You'll be fine then. It won't as fast as it could, but I've done exactly what you describe on a small Intel Atom based system with 8 500GB 2.5" drives that I wanted to be able to mirror 2 by 2 without taking any space from the drives for the system. I felt it would have been a waste to use 500GB for the rpool.
I installed opensolaris on a 16GB usb key.
Works like a champ for me.

good luck with you project and enjoy!

Posted by arnaud on December 17, 2009 at 04:57 AM MST #

This is clearly replica watches the job for our legal fraternity to engage the establishment to necessary breitling watches steps by filing petitions in various courts. IF one fails another should be cartier watches filed taking every one to task. It is rolex watches useless to suggest ways and means to solve tag heuer watches the day to day problem to well paid employees tissot watches of government controlled establishments. Only active omega watches judiciary will resolve this problem.
http://www.watchvisa.com
http://www.watchvisa.com/breitling-watches.html
http://www.watchvisa.com/cartier-watches.html
http://www.watchvisa.com/movado-watches.html
http://www.watchvisa.com/omega-watches.html
http://www.watchvisa.com/rolex-watches.html
http://www.watchvisa.com/tag_heuer-watches.html
http://www.watchvisa.com/tissot-watches.html

Posted by jiangfan on February 26, 2010 at 03:52 PM MST #

This looks awesome! Thank you for your information!

Posted by prescription glasses on March 10, 2010 at 03:27 PM MST #

This looks awesome! Thank you for your information!

Posted by prescription eyeglasses on March 10, 2010 at 03:28 PM MST #

Awsome! I'll give at a try over here!
Can't wait to see the preformance benefit it could offer.

M.

Posted by Mario on November 07, 2010 at 07:21 AM MST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Directory Services Tutorials, Utilities, Tips and Tricks

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today