{"id":10369,"date":"2013-12-22T23:57:09","date_gmt":"2013-12-22T14:57:09","guid":{"rendered":"http:\/\/oichinote.com\/plus\/?p=10369"},"modified":"2014-04-09T00:13:53","modified_gmt":"2014-04-08T15:13:53","slug":"set-up-hdds-as-zfs-pool","status":"publish","type":"post","link":"https:\/\/oichinote.com\/plus\/2013\/12\/set-up-hdds-as-zfs-pool.html","title":{"rendered":"\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u7528\u30c7\u30a3\u30b9\u30af\u3092ZFS\u30d7\u30fc\u30eb\u3068\u3057\u3066\u8a2d\u5b9a"},"content":{"rendered":"<p>HDD\u30922\u53f0\u5897\u8a2d\u3057\u307e\u3057\u305f\u304c\u3001\u7269\u7406\u7684\u306b\u63a5\u7d9a\u3057\u305f\u3060\u3051\u3067\u3001FreeBSD\u304b\u3089\u306f\u4f7f\u3048\u308b\u69d8\u306b\u306a\u3063\u3066\u3044\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/oichinote.com\/plus\/2013\/12\/added-two-500gb-hdd.html\" rel=\"_RAclick\">\u30c7\u30a3\u30b9\u30af\u30c9\u30e9\u30a4\u30d6\u30922\u53f0\u5897\u8a2d: \u30d7\u30e9\u30b9\u03b1\u7a7a\u9593<\/a> <em>(2013\u5e7412\u670821\u65e5)<\/em><\/li>\n<\/ul>\n[amazonjs asin=\"B0089APU1W\" locale=\"JP\"]\n<p>\u305d\u308c\u3092\u3001ZFS\u306e\u4e00\u3064\u306e\u30d7\u30fc\u30eb\u3068\u3057\u3066\u4f7f\u3048\u308b\u69d8\u306b\u3057\u307e\u3059\u30022\u53f0\u306fmirroring\u30c7\u30a3\u30b9\u30af\u3068\u3057\u307e\u3059\u3002\u8cfc\u5165\u3057\u305f\u30c7\u30a3\u30b9\u30af\u306f\u30014kiB\u30bb\u30af\u30bf\u30fc\u306eAFT\u30c7\u30a3\u30b9\u30af\u3067\u3057\u305f\u3002<\/p>\n<pre># diskinfo -v ada0\r\nada0\r\n    512             # sectorsize\r\n    500107862016    # mediasize in bytes (465G)\r\n    976773168       # mediasize in sectors\r\n    4096            # stripesize\r\n    0               # stripeoffset\r\n    969021          # Cylinders according to firmware.\r\n    16              # Heads according to firmware.\r\n    63              # Sectors according to firmware.\r\n    X3TST8EBT       # Disk ident.<\/pre>\n<p>\u30a4\u30de\u30a4\u30c1\u8abf\u3079\u304d\u308c\u3066\u3044\u306a\u3044\u306e\u3067\u3059\u304c\u3001&#8221;stripesize&#8221;\u304c4096\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u8a00\u3046\u306e\u304c\u30014096\u30d0\u30a4\u30c8(4kiB)\u30bb\u30af\u30bf\u3068\u8a00\u3046\u4e8b\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306e\u69d8\u306bGPT\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u5207\u308a\u307e\u3059\u3002<\/p>\n<pre># gpart create -s gpt ada0\r\n# gpart add -a 4k -t freebsd-zfs -l bkup0 ada0\r\n# gnop create -S 4096 ada0<\/pre>\n<p>\u6b21\u306e\u30a6\u30a7\u30d6\u30da\u30fc\u30b8\u3092\u53c2\u8003\u306b\u3057\u3066\u3044\u307e\u3059\u3002Thank you!<\/p>\n<ul>\n<li><a href=\"https:\/\/forums.freebsd.org\/viewtopic.php?&amp;t=30877\" target=\"_blank\">The FreeBSD Forums \u2022 View topic &#8211; Does gpart -a 4096 improve performance on a WD 4k sector disk?<\/a><\/li>\n<\/ul>\n<p>ada1\u306b\u5bfe\u3057\u3066\u3082\u3001\u540c\u69d8\u306e\u51e6\u7406\u3092\u3057\u307e\u3059\u3002<\/p>\n<pre># gpart create -s gpt ada1\r\n# gpart add -a 4k -t freebsd-zfs -l bkup1 ada1\r\n# gnop create -S 4096 ada1<\/pre>\n<p>\u6b21\u306b\u3001zfs\u306epool\u3092\u4f5c\u308a\u307e\u3059\u3002<\/p>\n<pre># zpool create bpool mirror gpt\/bkup0 gpt\/bkup1\r\n# zfs list\r\nNAME                             USED  AVAIL  REFER  MOUNTPOINT\r\nbpool                             91K   457G    31K  \/bpool\r\n# zfs set mountpoint=none bpool\r\n# zfs create bpool\/backup\r\n# zfs list\r\nNAME                             USED  AVAIL  REFER  MOUNTPOINT\r\nbpool                            142K   457G    31K  none\r\nbpool\/backup                      31K   457G    31K  none\r\n# zfs set mountpoint=\/backup bpool\/backup\r\n# zfs list\r\nNAME                             USED  AVAIL  REFER  MOUNTPOINT\r\nbpool                            150K   457G    31K  none\r\nbpool\/backup                      31K   457G    31K  \/backup\r\n# df\r\nbpool\/backup                    478936968        31  478936937     0%    \/backup<\/pre>\n<p>zfs list, df\u306e\u90e8\u5206\u306f\u3001\u629c\u7c8b\u8868\u793a\u3067\u3059\u3002\u65b0\u3057\u304f\u4f5c\u3063\u305f\u3001bpool\/backup\u304c\u3001\/backup\u306b\u30de\u30a6\u30f3\u30c8\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/oichinote.com\/plus\/files\/2013\/12\/20131220freebsd-zfs.png\" alt=\"ZFS\u69cb\u6210\" width=\"480\" height=\"180\" class=\"alignnone size-full wp-image-10353\" srcset=\"https:\/\/oichinote.com\/plus\/files\/2013\/12\/20131220freebsd-zfs.png 480w, https:\/\/oichinote.com\/plus\/files\/2013\/12\/20131220freebsd-zfs-150x56.png 150w\" sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>\u6b21\u306f\u3001\u3053\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u30c7\u30a3\u30b9\u30af\u306e\u904b\u7528\u65b9\u6cd5\u3092\u6c7a\u3081\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>HDD\u30922\u53f0\u5897\u8a2d\u3057\u307e\u3057\u305f\u304c\u3001\u7269\u7406\u7684\u306b\u63a5\u7d9a\u3057\u305f\u3060\u3051\u3067\u3001FreeBSD\u304b\u3089\u306f\u4f7f\u3048\u308b\u69d8\u306b\u306a\u3063\u3066\u3044\u307e\u305b\u3093\u3067\u3057\u305f\u3002 \u30c7\u30a3\u30b9\u30af\u30c9\u30e9\u30a4\u30d6\u30922\u53f0\u5897\u8a2d: \u30d7\u30e9\u30b9\u03b1\u7a7a\u9593 (2013\u5e7412\u670821\u65e5) \u305d\u308c\u3092\u3001ZFS\u306e\u4e00\u3064\u306e\u30d7\u30fc\u30eb\u3068\u3057\u3066\u4f7f\u3048\u308b\u69d8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":10353,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"\u65b0\u3057\u3044\u8a18\u4e8b\u300e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u7528\u30c7\u30a3\u30b9\u30af\u3092ZFS\u30d7\u30fc\u30eb\u3068\u3057\u3066\u8a2d\u5b9a\u300f\u3092\u6295\u7a3f\u3057\u307e\u3057\u305f\u3002\u8aad\u3093\u3067\u3044\u305f\u3060\u3051\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\u3002","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[59],"tags":[],"class_list":["post-10369","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nas"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/oichinote.com\/plus\/files\/2013\/12\/20131220freebsd-zfs.png","jetpack-related-posts":[{"id":11051,"url":"https:\/\/oichinote.com\/plus\/2014\/03\/cannot-recover-from-zfs-error.html","url_meta":{"origin":10369,"position":0},"title":"ZFS\u3067\u306e\u30c7\u30a3\u30b9\u30af\u30a8\u30e9\u30fc\u3001\u56de\u5fa9\u3067\u304d\u307e\u305b\u3093","author":"\u304a\u5e02\u306e\u304b\u305f","date":"2014\u5e743\u67087\u65e5","format":false,"excerpt":"\u3057\u3070\u3089\u304f\u524d\u304b\u3089\u3001\u30d5\u30a1\u30a4\u30eb\u30b5\u30fc\u30d0\u306b\u3057\u3066\u3044\u308bFreeBSD\u306e\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0(ZFS\u4f7f\u7528)\u3067\u3001\u30a8\u30e9\u30fc\u304c\u8d77\u2026","rel":"","context":"FreeBSD","block_context":{"text":"FreeBSD","link":"https:\/\/oichinote.com\/plus\/category\/freebsd"},"img":{"alt_text":"ZFS mirror","src":"https:\/\/i0.wp.com\/oichinote.com\/plus\/files\/2014\/03\/20140307zfs-mirror3.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":20201,"url":"https:\/\/oichinote.com\/plus\/2017\/06\/moving-zpool-data-to-another-drive.html","url_meta":{"origin":10369,"position":1},"title":"\ufeffZFS\u306e\u30c7\u30fc\u30bf\u30d7\u30fc\u30eb\u306e\u5f15\u8d8a\u3057","author":"\u304a\u5e02\u306e\u304b\u305f","date":"2017\u5e746\u670821\u65e5","format":false,"excerpt":"\u30b7\u30b9\u30c6\u30e0\u30d7\u30fc\u30eb\u306e\u79fb\u884c\u306f\u7d50\u69cb\u9762\u5012\u3067\u3057\u305f\u3002 AFT\u306a\u306e\u306b\u30d6\u30ed\u30c3\u30af\u30b5\u30a4\u30ba\u304c512B \u30c7\u30fc\u30bf\u30d7\u30fc\u30eb\u3082\u79fb\u884c\u3057\u307e\u2026","rel":"","context":"FreeBSD","block_context":{"text":"FreeBSD","link":"https:\/\/oichinote.com\/plus\/category\/freebsd"},"img":{"alt_text":"GW3.5AA-SUP3","src":"https:\/\/i0.wp.com\/oichinote.com\/plus\/files\/2017\/06\/20170621gw3.5aa-sup3.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":10146,"url":"https:\/\/oichinote.com\/plus\/2013\/11\/add-mirroring-disks-to-existed-zfs-pool.html","url_meta":{"origin":10369,"position":2},"title":"ZFS\u3067\u65e2\u5b58\u30d7\u30fc\u30eb\u306b\u30df\u30e9\u30fc\u30c7\u30a3\u30b9\u30af\u3092\u8ffd\u52a0\u3059\u308b","author":"\u304a\u5e02\u306e\u304b\u305f","date":"2013\u5e7411\u670821\u65e5","format":false,"excerpt":"FreeBSD 9.1\u3092\u30b5\u30fc\u30d0\u306b\u3057\u3066\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002 FreeBSD\u306b\u30b5\u30fc\u30d0\u7528\u30bd\u30d5\u30c8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u2026","rel":"","context":"NAS","block_context":{"text":"NAS","link":"https:\/\/oichinote.com\/plus\/category\/nas"},"img":{"alt_text":"ZFS\u69cb\u6210","src":"https:\/\/i0.wp.com\/oichinote.com\/plus\/files\/2013\/11\/20131121freebsd-zfs.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":9613,"url":"https:\/\/oichinote.com\/plus\/2013\/09\/attach-disk-for-mirroring-on-zfs.html","url_meta":{"origin":10369,"position":3},"title":"ZFS\u3067\u65e2\u5b58\u30c7\u30a3\u30b9\u30af\u3092\u30df\u30e9\u30fc\u5316\u3059\u308b","author":"\u304a\u5e02\u306e\u304b\u305f","date":"2013\u5e749\u670826\u65e5","format":false,"excerpt":"FreeBSD 9.1\u642d\u8f09\u306ePC\u3092\u3001\u30b5\u30fc\u30d0\u6a5f\u3068\u3057\u3066\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002 FreeBSD\u306b\u30b5\u30fc\u30d0\u7528\u30bd\u30d5\u30c8\u3092\u2026","rel":"","context":"NAS","block_context":{"text":"NAS","link":"https:\/\/oichinote.com\/plus\/category\/nas"},"img":{"alt_text":"ZFS\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0","src":"https:\/\/i0.wp.com\/oichinote.com\/plus\/files\/2013\/09\/20130926freebsd-zfs.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":20013,"url":"https:\/\/oichinote.com\/plus\/2017\/04\/replace-a-mirror-disk-of-zfs.html","url_meta":{"origin":10369,"position":4},"title":"ZFS\u306e\u30df\u30e9\u30fc\u30c7\u30a3\u30b9\u30af\u4ea4\u63db","author":"\u304a\u5e02\u306e\u304b\u305f","date":"2017\u5e744\u670829\u65e5","format":false,"excerpt":"FreeBSD\u306e\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306bZFS\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002Mirror\u3057\u305fHDD\u30922\u30bb\u30c3\u30c8\u9023\u7d50\u3057\u3066\u3001\u5927\u2026","rel":"","context":"FreeBSD","block_context":{"text":"FreeBSD","link":"https:\/\/oichinote.com\/plus\/category\/freebsd"},"img":{"alt_text":"ZFS\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0","src":"https:\/\/i0.wp.com\/oichinote.com\/plus\/files\/2013\/09\/20130926freebsd-zfs.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":7985,"url":"https:\/\/oichinote.com\/plus\/2013\/04\/install-freebsd-with-full-zfs.html","url_meta":{"origin":10369,"position":5},"title":"FreeBSD9\u3067Full ZFS\u30b7\u30b9\u30c6\u30e0\u4f5c\u6210\u306e\u5b9f\u9a13[\u8ffd\u8a18\u3042\u308a]","author":"\u304a\u5e02\u306e\u304b\u305f","date":"2013\u5e744\u670829\u65e5","format":false,"excerpt":"FreeBSD\u52c9\u5f37\u30b7\u30ea\u30fc\u30ba\u306e\u4e00\u74b0\u3067\u3059\u3002 FreeBSD\u306e\u52c9\u5f37\u4e2d: \u30d7\u30e9\u30b9\u03b1\u7a7a\u9593 (2012\u5e7411\u67083\u2026","rel":"","context":"NAS","block_context":{"text":"NAS","link":"https:\/\/oichinote.com\/plus\/category\/nas"},"img":{"alt_text":"\u30b7\u30b9\u30c6\u30e0\u7528\u30d7\u30fc\u30eb","src":"https:\/\/i0.wp.com\/oichinote.com\/plus\/files\/2013\/04\/20130428zfs_rpool.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/posts\/10369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/comments?post=10369"}],"version-history":[{"count":4,"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/posts\/10369\/revisions"}],"predecessor-version":[{"id":11432,"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/posts\/10369\/revisions\/11432"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/media\/10353"}],"wp:attachment":[{"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/media?parent=10369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/categories?post=10369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oichinote.com\/plus\/wp-json\/wp\/v2\/tags?post=10369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}