{"id":103,"date":"2008-09-17T01:24:39","date_gmt":"2008-09-16T17:24:39","guid":{"rendered":"http:\/\/www.sysadmindayph.com\/blog\/?p=103"},"modified":"2008-09-17T01:24:39","modified_gmt":"2008-09-16T17:24:39","slug":"building-zfs-mirrored-file-system-example","status":"publish","type":"post","link":"https:\/\/www.sysadmindayph.com\/blog\/building-zfs-mirrored-file-system-example\/","title":{"rendered":"Building ZFS Mirrored File System Example"},"content":{"rendered":"<p>I&#8217;ve writted something about the Zeta file system before&#8230; It&#8217;s like some sort of an intro to the filesystem.<\/p>\n<p>This post will be the first of series of post in configuring ZFS on a test machine, a Sun-Fire-V240 running Solaris 10.<\/p>\n<blockquote><p># uname -a<br \/>\nSunOS sedm3205 5.10 Generic_137111-04 sun4u sparc SUNW,Sun-Fire-V240<\/p><\/blockquote>\n<p>Anyhow, first topic will be how to create\/build, test, destroy and recreate a mirrored ZFS disk (or file based). Most of the ZFS commands we&#8217;ll be using are:<\/p>\n<ul>\n<li>zpool<\/li>\n<li>zcreate<\/li>\n<\/ul>\n<p>That&#8217;s it!<\/p>\n<p><strong>Creating the ZFS Mirror<\/strong><\/p>\n<p>We&#8217;ll create two kinds of mirrored partition, one is file based and the other was is physical 175GB disk.<\/p>\n<p><!--more--><\/p>\n<p>Here&#8217;s for the file based&#8230; first create two 150M files:<\/p>\n<blockquote><p># mkfile 150m \/home\/elizar\/disk1 ; mkfile 150m \/home\/elizar\/disk2<\/p><\/blockquote>\n<p>Once that&#8217;s done, go ahead and create the Mirrored volume:<\/p>\n<blockquote><p># zpool create file-mirror mirror \/home\/elizar\/disk1 \/home\/elizar\/disk2<\/p><\/blockquote>\n<p>After that command you&#8217;ll now have a new mirrored disk\/partition mounted on the root called file-mirror<\/p>\n<p># zpool status file-mirror<br \/>\npool: file-mirror<br \/>\nstate: ONLINE<br \/>\nscrub: resilver completed with 0 errors on Tue Sep 16 17:04:13 2008<br \/>\nconfig:<\/p>\n<p>NAME\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 STATE\u00a0\u00a0\u00a0\u00a0 READ WRITE CKSUM<br \/>\nfile-mirror\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ONLINE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0\u00a0 0<br \/>\nmirror\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ONLINE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0\u00a0 0<br \/>\n\/export\/home\/x120008\/zfs-lab\/disk2\u00a0 ONLINE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0\u00a0 0<br \/>\n\/export\/home\/x120008\/zfs-lab\/disk1\u00a0 ONLINE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0\u00a0 0\u00a0\u00a0\u00a0\u00a0 0<\/p>\n<p>errors: No known data errors<br \/>\nWe&#8217;ll try and break the mirror the next time!<\/p>\n<p>http:\/\/flux.org.uk\/howto\/solaris\/zfs_tutorial_01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve writted something about the Zeta file system before&#8230; It&#8217;s like some sort of an intro to the filesystem. This post will be the first of series of post in configuring ZFS on a test &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,25,91],"tags":[93,387,92,94],"class_list":["post-103","post","type-post","status-publish","format-standard","hentry","category-operating-system","category-solaris-10","category-zfs","tag-create-mirror","tag-zfs","tag-zfs-build","tag-zfs-mirror-disk"],"_links":{"self":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts\/103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/comments?post=103"}],"version-history":[{"count":0,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts\/103\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/media?parent=103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/categories?post=103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/tags?post=103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}