Warning: A non-numeric value encountered in /var/www/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118
Warning: A non-numeric value encountered in /var/www/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
Warning: A non-numeric value encountered in /var/www/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118
Warning: A non-numeric value encountered in /var/www/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
Warning: A non-numeric value encountered in /var/www/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118
Warning: A non-numeric value encountered in /var/www/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
Warning: A non-numeric value encountered in /var/www/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118
Warning: A non-numeric value encountered in /var/www/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
Warning: A non-numeric value encountered in /var/www/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118
Warning: A non-numeric value encountered in /var/www/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
Warning: A non-numeric value encountered in /var/www/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118
Warning: A non-numeric value encountered in /var/www/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
Warning: A non-numeric value encountered in /var/www/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118
Warning: A non-numeric value encountered in /var/www/blog/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119
I thought I’d give FreeNAS a whirl too, see how it goes. The partitioning commands are a little different, so this post describes what I did for partitioning the SSD.
I read here that the size of the L2ARC should be roughly 4:1 times the size of the level 1 ARC that resides in RAM. Since I only have a limited amount of ram (currently 10GiB), I decided 50GiB was a good starting point for the size of my L2ARC. Also I thought I would try creating a log device on the same SSD, although only a 10GiB partition for that.
First of all, we need to find which device the SSD is. That’s the easy part.
12345678 # camcontrol devlist<ATA WDC WD20EFRX-68A 0A80> at scbus0 target 9 lun 0 (da0,pass0)<ATA WDC WD20EFRX-68E 0A80> at scbus0 target 10 lun 0 (da1,pass1)<ATA WDC WD20EFRX-68A 0A80> at scbus0 target 11 lun 0 (da2,pass2)<ATA WDC WD20EFRX-68A 0A80> at scbus0 target 12 lun 0 (da3,pass3)<Fujitsu SSD256GB 5.0.B> at scbus6 target 0 lun 0 (pass4,ada0)<Optiarc DVD RW AD-7700S 1.03> at scbus9 target 0 lun 0 (pass5,cd0)<SMART\000\011 USB-IBM 0000> at scbus10 target 0 lun 0 (pass6,da4)
There it is, ada0. But I’ve already tried creating it as a cache device in the webgui of freenas, so we need to remove the existing partitions first.
12345 # gpart show ada0=> 34 500118125 ada0 GPT (238G)34 94 - free - (47k)128 500118024 1 freebsd-zfs (238G)500118152 7 - free - (3.5k)
First remove the partition, then the partition table.
1234 # gpart delete -i 1 ada0ada0p1 deleted# gpart destroy ada0ada0 destroyed
Now create the 10GiB partition for use with the log device.
12 # gpart add -t freebsd-zfs -s 10240M ada0ada0p1 added
and the partition for l2arc
12 # gpart add -t freebsd-zfs -s 50G ada0ada0p2 added
Add it to the zpool
1 # zpool add bsd_storage cache ada0p2
Finally, check it all looks correct:
1234567891011 # zpool list -vNAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOTbsd_storage 3.62T 1.90T 1.73T - 45% 52% 1.00x ONLINE /mntmirror 1.81T 971G 885G - 45% 52%gptid/46bf52cd-5bde-11e4-a01d-10604b929cb8 - - - - - -gptid/4784780a-5bde-11e4-a01d-10604b929cb8 - - - - - -mirror 1.81T 971G 885G - 45% 52%gptid/47f0aa33-5bde-11e4-a01d-10604b929cb8 - - - - - -gptid/485f58f6-5bde-11e4-a01d-10604b929cb8 - - - - - -cache - - - - - -ada0p2 50.0G 45.1G 4.85G - 0% 90%
Leave a Reply