{"id":267,"date":"2009-07-22T11:47:01","date_gmt":"2009-07-22T03:47:01","guid":{"rendered":"http:\/\/www.yaoge123.com\/blog\/?p=267"},"modified":"2009-07-22T11:47:01","modified_gmt":"2009-07-22T03:47:01","slug":"freebsd%e4%b8%8bzfs-raidz%e7%a1%ac%e7%9b%98%e6%9b%bf%e6%8d%a2%e6%89%a9%e5%ae%b9%e5%ae%9e%e8%b7%b5","status":"publish","type":"post","link":"https:\/\/www.yaoge123.com\/blog\/archives\/267","title":{"rendered":"FreeBSD\u4e0bZFS RaidZ\u786c\u76d8\u66ff\u6362\u6269\u5bb9\u5b9e\u8df5"},"content":{"rendered":"<p>\u521b\u5efa\u4e00\u4e2araidz1\u7684ZFS pool<br \/>\ntest# zpool create zfspool raidz da1 da2 da3<br \/>\ntest# zpool list<br \/>\nNAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT<br \/>\nzfspool                23.9G    192K   23.9G     0%  ONLINE     &#8211;<br \/>\ntest# zpool status<br \/>\n  pool: zfspool<br \/>\n state: ONLINE<br \/>\n scrub: none requested<br \/>\nconfig:<\/p>\n<p>        NAME        STATE     READ WRITE CKSUM<br \/>\n        zfspool     ONLINE       0     0     0<br \/>\n          raidz1    ONLINE       0     0     0<br \/>\n            da1     ONLINE       0     0     0<br \/>\n            da2     ONLINE       0     0     0<br \/>\n            da3     ONLINE       0     0     0<\/p>\n<p>errors: No known data errors<\/p>\n<p>\u7528\u66f4\u5927\u7684da4\u3001da5\u3001da6\u66ff\u6362\u539f\u6765\u5c0f\u7684da1\u3001da2\u3001da3<!--more--><br \/>\ntest# zpool replace zfspool da1 da4<br \/>\ntest# zpool replace zfspool da2 da5<br \/>\ntest# zpool replace zfspool da3 da6<br \/>\ntest# zpool list<br \/>\nNAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT<br \/>\nzfspool                23.9G    198K   23.9G     0%  ONLINE     &#8211;<br \/>\ntest# zpool status<br \/>\n  pool: zfspool<br \/>\n state: ONLINE<br \/>\n scrub: resilver completed with 0 errors on Wed Jul 22 11:10:58 2009<br \/>\nconfig:<\/p>\n<p>        NAME        STATE     READ WRITE CKSUM<br \/>\n        zfspool     ONLINE       0     0     0<br \/>\n          raidz1    ONLINE       0     0     0<br \/>\n            da4     ONLINE       0     0     0<br \/>\n            da5     ONLINE       0     0     0<br \/>\n            da6     ONLINE       0     0     0<\/p>\n<p>errors: No known data errors<\/p>\n<p>\u5bfc\u5165\u5bfc\u51fapool\u540e\u5c31\u80fd\u770b\u5230\u548c\u4f7f\u7528\u65b0\u589e\u52a0\u7684\u5bb9\u91cf\u4e86<br \/>\ntest# zpool export zfspool<br \/>\ntest# zpool import zfspool<br \/>\ntest# zpool list<br \/>\nNAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT<br \/>\nzfspool                29.9G    192K   29.9G     0%  ONLINE     &#8211;<\/p>\n<p>\u89e3\u91ca\u4e00\u4e0braidz\u7684\u78c1\u76d8\u5bb9\u91cf\u663e\u793a\uff0czpool list\u662f\u628a\u5197\u4f59\u6570\u636e\u4e5f\u7b97\u8fdb\u53bb\u4e86\uff0cdf\/du\u5219\u663e\u793a\u5b9e\u9645\u4f7f\u7528\u5bb9\u91cf<br \/>\ntest# zpool list<br \/>\nNAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT<br \/>\nzfspool                1.48G   1.35G    141M    90%  ONLINE     &#8211;<br \/>\ntest# df -h<br \/>\nFilesystem     Size    Used   Avail Capacity  Mounted on<br \/>\nzfspool        980M    918M     62M    94%    \/zfspool<br \/>\ntest# du -h \/zfspool\/<br \/>\n918M    \/zfspool\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u521b\u5efa\u4e00\u4e2araidz1\u7684ZFS pool test# zpool create zfspool raidz da [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[15],"tags":[210,69],"class_list":["post-267","post","type-post","status-publish","format-standard","hentry","category-freebsd","tag-freebsd","tag-zfs"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paOwEq-4j","_links":{"self":[{"href":"https:\/\/www.yaoge123.com\/blog\/wp-json\/wp\/v2\/posts\/267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yaoge123.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yaoge123.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yaoge123.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yaoge123.com\/blog\/wp-json\/wp\/v2\/comments?post=267"}],"version-history":[{"count":0,"href":"https:\/\/www.yaoge123.com\/blog\/wp-json\/wp\/v2\/posts\/267\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yaoge123.com\/blog\/wp-json\/wp\/v2\/media?parent=267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yaoge123.com\/blog\/wp-json\/wp\/v2\/categories?post=267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yaoge123.com\/blog\/wp-json\/wp\/v2\/tags?post=267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}