{"id":97,"date":"2016-04-24T21:49:15","date_gmt":"2016-04-25T02:49:15","guid":{"rendered":"https:\/\/servertricks.com\/?p=97"},"modified":"2016-05-09T15:57:41","modified_gmt":"2016-05-09T20:57:41","slug":"install-and-configure-zfs","status":"publish","type":"post","link":"https:\/\/servertricks.com\/index.php\/2016\/04\/24\/install-and-configure-zfs\/","title":{"rendered":"Install and Configure ZFS"},"content":{"rendered":"<p>I will try to keep this short and sweet, this process can be pretty lengthy depending on the complexity of the ZFS you want to setup. I will be demonstrating how to setup a RAIDZ2 the equivalent of RAID6. <\/p>\n<p>Start by install in the PPA and installing ZFS:<\/p>\n<p><code>$ sudo apt-get install software-properties-common<br \/>\n$ sudo add-apt-repository ppa:zfs-native\/stable<br \/>\n$ sudo apt-get update<br \/>\n$ sudo apt-get install -y ubuntu-zfs<\/code><\/p>\n<p>Now load the ZFS module:<\/p>\n<p><code>$ sudo modprobe zfs<br \/>\n$ lsmod | grep zfs<\/code><\/p>\n<p>That should give you the following output:<\/p>\n<pre>zfs                  1185541  0\r\nzunicode              331251  1 zfs\r\nzavl                   15010  1 zfs\r\nzcommon                51321  1 zfs\r\nznvpair                89166  2 zfs,zcommon\r\nspl                   175436  5 zfs,zavl,zunicode,zcommon,znvpair<\/pre>\n<p>Run the following to get a list of all available drives:<\/p>\n<p><code>lsblk<\/code><\/p>\n<p>Make sure you do not use your primary boot \/ swap drive in the next command or you will have issues. Now we need to create the RAID6 by using the following:<\/p>\n<p><code>sudo zpool create tank raidz2 sdb sdc sdd sde<\/code><\/p>\n<p>Note: you will need to change &#8220;sdb sdc sdd sde&#8221; to fit the drives that you want to use in the ZFS RAID. You can also change the work &#8220;tank&#8221; to whatever you would like to name your ZFS pool. <\/p>\n<p>To verify the command is working and did what you want you can run: <\/p>\n<p><code>df -h | grep tank<\/code><\/p>\n<p>This will list the ZFS pool &#8220;tank&#8221; and give you the amount of free space on the pool. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I will try to keep this short and sweet, this process can be pretty lengthy depending on the complexity of the ZFS you want to setup. I will be demonstrating how to setup a RAIDZ2 the equivalent of RAID6. Start by install in the PPA and installing ZFS: $ sudo apt-get install software-properties-common $ sudo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[11,10],"class_list":["post-97","post","type-post","status-publish","format-standard","hentry","category-ubuntu","tag-14-04","tag-16-04"],"_links":{"self":[{"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/posts\/97","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/comments?post=97"}],"version-history":[{"count":5,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/posts\/97\/revisions"}],"predecessor-version":[{"id":175,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/posts\/97\/revisions\/175"}],"wp:attachment":[{"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/media?parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/categories?post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/tags?post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}