{"id":1023,"date":"2011-01-13T22:10:59","date_gmt":"2011-01-13T13:10:59","guid":{"rendered":"http:\/\/peta.okechan.net\/blog\/?p=1023"},"modified":"2016-03-02T22:32:02","modified_gmt":"2016-03-02T13:32:02","slug":"freebsd%e3%81%a7zfs-zpool-version-28%e3%82%92%e4%bd%bf%e3%81%86","status":"publish","type":"post","link":"https:\/\/peta.okechan.net\/blog\/archives\/1023","title":{"rendered":"FreeBSD\u3067ZFS pool version 28\u3092\u4f7f\u3046"},"content":{"rendered":"<p>\u8d70\u308a\u66f8\u304d\u7684\u30e1\u30e2\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306e\u305f\u3081\u3060\u3051\u306b\u65b0\u3057\u3044\u74b0\u5883\u3092\u7528\u610f\u3057\u305f\u3002<br \/>\n\u65e2\u5b58\u306e\u74b0\u5883\u3067\u3084\u308b\u306e\u306f\u304a\u3059\u3059\u3081\u3057\u306a\u3044\u3002<br \/>\n\u3042\u3068\u3001FreeBSD\u521d\u5fc3\u8005\u306a\u306e\u3067\u30de\u30ba\u30a4\u70b9\u304c\u591a\u3005\u3042\u308b\u304b\u3082\u3002<\/p>\n<h4>\u30fb9-CURRENT\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<p>Standard\u3067Developer, User\u5f8c\u306a\u3093\u3060\u3063\u3051\uff1f\u3068\u308a\u3042\u3048\u305a\u5168\u90e8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<br \/>\n\u3046\u3061\u306e\u74b0\u5883\u3067\u306fFTP\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3084\u305d\u308c\u306b\u6e96\u305a\u308b\u65b9\u6cd5\u304c\u30a8\u30e9\u30fc\u3067\u4f55\u6545\u304b\u4f7f\u3048\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30ebDVD\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3002<\/p>\n<h4>\u30fb\u30bd\u30fc\u30b9\u306e\u53d6\u5f97<\/h4>\n<p>2010\/12\/12\u306eZFS\u30d1\u30c3\u30c1\u3092\u4f7f\u3046\u306e\u3067\u305d\u306e\u65e5\u306e\u30bd\u30fc\u30b9\u3092\u53d6\u5f97\u3059\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cp \/usr\/share\/examples\/cvsup\/standard-supfile mysup101212\r\nvi mysup101212<\/pre>\n<p>mysup101212\u306e\u7de8\u96c6\u5185\u5bb9<br \/>\n1\u884c\u7f6e\u304d\u63db\u3048\u308b<br \/>\n*default host=CHANGE_THIS.jp.FreeBSD.org<br \/>\n\u2193<br \/>\n*default host=cvsup.jp.FreeBSD.org<\/p>\n<p>1\u884c\u3092\u9069\u5f53\u306a\u7b87\u6240\u306b\u8ffd\u52a0<br \/>\n*default date=2010.12.12.00.00.00<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">csup mysup101212<\/pre>\n<p># \u6642\u9593\u304c\u304b\u304b\u308b<\/p>\n<h4>\u30fbzpool v28\u3092\u6709\u52b9\u306b\u3059\u308b\u30d1\u30c3\u30c1\u3092\u5f53\u3066\u308b\uff08\u73fe\u6642\u70b9\u30679-CURRENT\u306e\u30c7\u30d5\u30a9\u306fv15\uff09<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cd \/usr\/src\r\nfetch http:\/\/people.freebsd.org\/~pjd\/patches\/zfs_20101212.patch.bz2\r\nbzip2 -d zfs_20101212.patch.bz2\r\npatch -E -p0 &lt; zfs_20101212.patch<\/pre>\n<h4>\u30fb\u30d9\u30fc\u30b9\u30b7\u30b9\u30c6\u30e0\u306e\u69cb\u7bc9\uff084\u30b3\u30a264bit\u306a\u306e\u3067\u3053\u3093\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\uff09<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">make -j8 buildworld TARGET_ARCH=amd64 <\/pre>\n<p># \u3081\u3063\u3061\u3083\u6642\u9593\u304c\u304b\u304b\u308b<\/p>\n<h4>\u30fb\u30ab\u30fc\u30cd\u30eb\u306e\u69cb\u7bc9<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cd \/usr\/src\/sys\/amd64\/conf\r\nmkdir \/root\/mykernels\r\ncp GENERIC \/root\/mykernels\/ZFSV28\r\nln -s \/root\/mykernels\/ZFSV28\r\nvi ZFSV28<\/pre>\n<p>\u4ee5\u4e0b\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u542b\u3080\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">options \tKDB\r\noptions \tDDB\r\noptions \tINVARIANTS\r\noptions \tINVARIANT_SUPPORT\r\noptions \tWITNESS\r\noptions \tWITNESS_SKIPSPIN\r\noptions \tDEBUG_LOCKS\r\noptions \tDEBUG_VFS_LOCKS<\/pre>\n<p>\u6700\u5f8c\u306e2\u3064\u4ee5\u5916\u306f\u3059\u3067\u306b\u5165\u3063\u3066\u308b\u306f\u305a\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cd \/usr\/src\r\nmake -j8 buildkernel TARGET_ARCH=amd64 KERNCONF=ZFSV28<\/pre>\n<p># \u307e\u3041\u307e\u3041\u6642\u9593\u304c\u304b\u304b\u308b<\/p>\n<h4>\u30fb\u30ab\u30fc\u30cd\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">make installkernel TARGET_ARCH=amd64 KERNCONF=ZFSV28<\/pre>\n<p>\u30fb\u518d\u8d77\u52d5\u3057\u3066\u30b7\u30f3\u30b0\u30eb\u30e6\u30fc\u30b6\u30fc\u30e2\u30fc\u30c9\u3067\u8d77\u52d5\u3057\u305f\u5f8c\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">fsck -p\r\nmount -u \/\r\nmount -a -t ufs\r\nswapon -a<\/pre>\n<h4>\u30fb\u65b0\u3057\u3044\u30b7\u30b9\u30c6\u30e0\u30d0\u30a4\u30ca\u30ea\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cd \/usr\/src\r\nmake installworld TARGET_ARCH=amd64 KERNCONF=ZFSV28<\/pre>\n<p># \u3061\u3087\u3063\u3068\u6642\u9593\u304c\u304b\u304b\u308b<\/p>\n<h4>\u30fb\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306a\u3069\u306e\u30de\u30fc\u30b8<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cp -Rp \/etc \/etc.old\r\nmergemaster<\/pre>\n<p>\u57fa\u672c\u7684\u306bi\u5fdc\u7b54\uff08\u65b0\u3057\u3044\u8a2d\u5b9a\u3092\u53cd\u6620\u3059\u308b\uff09\u3067\u3044\u3044\u3068\u601d\u3046\u3002<\/p>\n<h4>\u30fb\u518d\u8d77\u52d5<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">shutdown -r now<\/pre>\n<h4>\u30fbzpool\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u78ba\u8a8d<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">zpool upgrade -v<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">This system is currently running ZFS pool version 28.\r\n\r\nThe following versions are supported:\r\n\r\nVER  DESCRIPTION\r\n---  --------------------------------------------------------\r\n1   Initial ZFS version\r\n2   Ditto blocks (replicated metadata)\r\n3   Hot spares and double parity RAID-Z\r\n4   zpool history\r\n5   Compression using the gzip algorithm\r\n6   bootfs pool property\r\n7   Separate intent log devices\r\n8   Delegated administration\r\n9   refquota and refreservation properties\r\n10  Cache devices\r\n11  Improved scrub performance\r\n12  Snapshot properties\r\n13  snapused property\r\n14  passthrough-x aclinherit\r\n15  user\/group space accounting\r\n16  stmf property support\r\n17  Triple-parity RAID-Z\r\n18  Snapshot user holds\r\n19  Log device removal\r\n20  Compression using zle (zero-length encoding)\r\n21  Deduplication\r\n22  Received properties\r\n23  Slim ZIL\r\n24  System attributes\r\n25  Improved scrub stats\r\n26  Improved snapshot deletion performance\r\n27  Improved snapshot creation performance\r\n28  Multiple vdev replacements\r\n\r\nFor more information on a particular version, including supported releases,\r\nsee the ZFS Administration Guide.<\/pre>\n<h4>\u30fbdeduplication\u306e\u30c6\u30b9\u30c8\uff08\u305d\u3082\u305d\u3082\u30b3\u30ec\u304c\u76ee\u7684\uff09<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">mkdir \/usr\/zfstest<\/pre>\n<p># \u30c7\u30d5\u30a9\u306e\u307e\u307e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3089\/usr\u304c\u4e00\u756a\u5bb9\u91cf\u304c\u5927\u304d\u304b\u3063\u305f\u305f\u3081\/usr\u306b\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u7f6e\u304f\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cd \/usr\/zfstest<\/pre>\n<p>1GB\u306e\u30c7\u30a3\u30b9\u30af\u30a4\u30e1\u30fc\u30b8\u30924\u3064\u7528\u610f\u3059\u308b<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">dd if=\/dev\/zero of=disk1.img bs=1m count=1k\r\ndd if=\/dev\/zero of=disk2.img bs=1m count=1k\r\ndd if=\/dev\/zero of=disk3.img bs=1m count=1k\r\ndd if=\/dev\/zero of=disk4.img bs=1m count=1k<\/pre>\n<p>raidz2\u306e\u30d7\u30fc\u30eb\u3092\u4f5c\u6210<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">zpool create mypool raidz2 \/usr\/zfstest\/disk1.img \/usr\/zfstest\/disk2.img \/usr\/zfstest\/disk3.img \/usr\/zfstest\/disk4.img\r\nzfs set dedup=on mypool<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">zfs list<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">NAME     USED  AVAIL  REFER  MOUNTPOINT\r\nmypool   128K  1.95G  44.8K  \/mypool<\/pre>\n<p>\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u3044\u3066\u307f\u308b<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">dd if=\/dev\/urandom of=\/mypool\/test.dat bs=1k count=100k<\/pre>\n<p># \u9045\u3044\u7269\u7406\u30c7\u30a3\u30b9\u30af\u4e0a\u306b\u30a4\u30e1\u30fc\u30b84\u3064\u3082\u306e\u305b\u3066\u308b\u304b\u3089\u6fc0\u9045\uff08\u6c57<br \/>\n# 256KB\/s\u3050\u3089\u3044\u3002\u3084\u3079\u3047w<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">zfs list<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">NAME     USED  AVAIL  REFER  MOUNTPOINT\r\nmypool   101M  1.85G  99.9M  \/mypool<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cp \/mypool\/test.dat \/mypool\/test.dat.copy\r\nzfs list<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">NAME     USED  AVAIL  REFER  MOUNTPOINT\r\nmypool   201M  1.84G   200M  \/mypool<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cp \/mypool\/test.dat \/mypool\/test.dat.copy2\r\nzfs list<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">NAME     USED  AVAIL  REFER  MOUNTPOINT\r\nmypool   301M  1.84G   300M  \/mypool\r\n<\/pre>\n<p>AVAIL\u304c\u6e1b\u3089\u306a\u3044\u3000\uff77\uff80\u2501(\uff9f\u2200\uff9f)\u2501!<\/p>\n<p>\u3082\u3057dedup\u304c\u306a\u304b\u3063\u305f\u3089\u300c\u30c7\u30a3\u30b9\u30af\u5bb9\u91cf\u304c\u8db3\u308a\u306a\u304f\u306a\u3063\u3061\u3083\u3046\uff01\u300d\u3063\u3066\u3068\u3053\u308d\u307e\u3067\u3084\u3063\u3066\u307f\u3088\u3046<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cp \/mypool\/test.dat \/mypool\/test.dat.copy3\r\n(\u7565)\r\ncp \/mypool\/test.dat \/mypool\/test.dat.copy21<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">zfs list<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">NAME     USED  AVAIL  REFER  MOUNTPOINT\r\nmypool  2.15G  1.81G  2.15G  \/mypool<\/pre>\n<p>\u5143\u3005\u306eAVAIL\u304c1.85G\u3001\u305d\u3057\u3066\u73fe\u5728\u306eUSED\u304c2.15G\u30fb\u30fb\u30fb<br \/>\n\u30e0\u30d5\u30d5w<\/p>\n<p>dedup on\u3068off\u306e\u6027\u80fd\u5dee\u3082\u8abf\u3079\u305f\u3044\u304c\u3001\u3084\u308b\u306a\u3089\u5b9f\u904b\u7528\u3067\u4f7f\u3048\u308b\u3088\u3046\u306a\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u3092\u624b\u306b\u5165\u308c\u3066\u304b\u3089\u3060\u306a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8d70\u308a\u66f8\u304d\u7684\u30e1\u30e2\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306e\u305f\u3081\u3060\u3051\u306b\u65b0\u3057\u3044\u74b0\u5883\u3092\u7528\u610f\u3057\u305f\u3002<br \/>\n\u65e2\u5b58\u306e\u74b0\u5883\u3067\u3084\u308b\u306e\u306f\u304a\u3059\u3059\u3081\u3057\u306a\u3044\u3002<br \/>\n\u3042\u3068\u3001FreeBSD\u521d\u5fc3\u8005\u306a\u306e\u3067\u30de\u30ba\u30a4\u70b9\u304c\u591a\u3005\u3042\u308b\u304b\u3082\u3002<\/p>\n<h4>\u30fb9-CURRENT\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<p>Standard\u3067Developer, User\u5f8c\u306a\u3093\u3060\u3063\u3051\uff1f\u3068\u308a\u3042\u3048\u305a\u5168\u90e8\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<br \/>\n\u3046\u3061\u306e\u74b0\u5883\u3067\u306fFTP\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3084\u305d\u308c\u306b\u6e96\u305a\u308b\u65b9\u6cd5\u304c\u30a8\u30e9\u30fc\u3067\u4f55\u6545\u304b\u4f7f\u3048\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30ebDVD\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3002<\/p>\n<h4>\u30fb\u30bd\u30fc\u30b9\u306e\u53d6\u5f97<\/h4>\n<p>2010\/12\/12\u306eZFS\u30d1\u30c3\u30c1\u3092\u4f7f\u3046\u306e\u3067\u305d\u306e\u65e5\u306e\u30bd\u30fc\u30b9\u3092\u53d6\u5f97\u3059\u308b\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cp \/usr\/share\/examples\/cvsup\/standard-supfile mysup101212\r\nvi mysup101212<\/pre>\n<p>mysup101212\u306e\u7de8\u96c6\u5185\u5bb9<br \/>\n1\u884c\u7f6e\u304d\u63db\u3048\u308b<br \/>\n*default host=CHANGE_THIS.jp.FreeBSD.org<br \/>\n\u2193<br \/>\n*default host=cvsup.jp.FreeBSD.org<\/p>\n<p>1\u884c\u3092\u9069\u5f53\u306a\u7b87\u6240\u306b\u8ffd\u52a0<br \/>\n*default date=2010.12.12.00.00.00<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">csup mysup101212<\/pre>\n<p># \u6642\u9593\u304c\u304b\u304b\u308b<\/p>\n<h4>\u30fbzpool v28\u3092\u6709\u52b9\u306b\u3059\u308b\u30d1\u30c3\u30c1\u3092\u5f53\u3066\u308b\uff08\u73fe\u6642\u70b9\u30679-CURRENT\u306e\u30c7\u30d5\u30a9\u306fv15\uff09<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cd \/usr\/src\r\nfetch http:\/\/people.freebsd.org\/~pjd\/patches\/zfs_20101212.patch.bz2\r\nbzip2 -d zfs_20101212.patch.bz2\r\npatch -E -p0 &lt; zfs_20101212.patch<\/pre>\n<h4>\u30fb\u30d9\u30fc\u30b9\u30b7\u30b9\u30c6\u30e0\u306e\u69cb\u7bc9\uff084\u30b3\u30a264bit\u306a\u306e\u3067\u3053\u3093\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\uff09<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">make -j8 buildworld TARGET_ARCH=amd64 <\/pre>\n<p># \u3081\u3063\u3061\u3083\u6642\u9593\u304c\u304b\u304b\u308b<\/p>\n<h4>\u30fb\u30ab\u30fc\u30cd\u30eb\u306e\u69cb\u7bc9<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cd \/usr\/src\/sys\/amd64\/conf\r\nmkdir \/root\/mykernels\r\ncp GENERIC \/root\/mykernels\/ZFSV28\r\nln -s \/root\/mykernels\/ZFSV28\r\nvi ZFSV28<\/pre>\n<p>\u4ee5\u4e0b\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u542b\u3080\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">options \tKDB\r\noptions \tDDB\r\noptions \tINVARIANTS\r\noptions \tINVARIANT_SUPPORT\r\noptions \tWITNESS\r\noptions \tWITNESS_SKIPSPIN\r\noptions \tDEBUG_LOCKS\r\noptions \tDEBUG_VFS_LOCKS<\/pre>\n<p>\u6700\u5f8c\u306e2\u3064\u4ee5\u5916\u306f\u3059\u3067\u306b\u5165\u3063\u3066\u308b\u306f\u305a\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cd \/usr\/src\r\nmake -j8 buildkernel TARGET_ARCH=amd64 KERNCONF=ZFSV28<\/pre>\n<p># \u307e\u3041\u307e\u3041\u6642\u9593\u304c\u304b\u304b\u308b<\/p>\n<h4>\u30fb\u30ab\u30fc\u30cd\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">make installkernel TARGET_ARCH=amd64 KERNCONF=ZFSV28<\/pre>\n<p>\u30fb\u518d\u8d77\u52d5\u3057\u3066\u30b7\u30f3\u30b0\u30eb\u30e6\u30fc\u30b6\u30fc\u30e2\u30fc\u30c9\u3067\u8d77\u52d5\u3057\u305f\u5f8c\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">fsck -p\r\nmount -u \/\r\nmount -a -t ufs\r\nswapon -a<\/pre>\n<h4>\u30fb\u65b0\u3057\u3044\u30b7\u30b9\u30c6\u30e0\u30d0\u30a4\u30ca\u30ea\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cd \/usr\/src\r\nmake installworld TARGET_ARCH=amd64 KERNCONF=ZFSV28<\/pre>\n<p># \u3061\u3087\u3063\u3068\u6642\u9593\u304c\u304b\u304b\u308b<\/p>\n<h4>\u30fb\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306a\u3069\u306e\u30de\u30fc\u30b8<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cp -Rp \/etc \/etc.old\r\nmergemaster<\/pre>\n<p>\u57fa\u672c\u7684\u306bi\u5fdc\u7b54\uff08\u65b0\u3057\u3044\u8a2d\u5b9a\u3092\u53cd\u6620\u3059\u308b\uff09\u3067\u3044\u3044\u3068\u601d\u3046\u3002<\/p>\n<h4>\u30fb\u518d\u8d77\u52d5<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">shutdown -r now<\/pre>\n<h4>\u30fbzpool\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u78ba\u8a8d<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">zpool upgrade -v<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">This system is currently running ZFS pool version 28.\r\n\r\nThe following versions are supported:\r\n\r\nVER  DESCRIPTION\r\n---  --------------------------------------------------------\r\n1   Initial ZFS version\r\n2   Ditto blocks (replicated metadata)\r\n3   Hot spares and double parity RAID-Z\r\n4   zpool history\r\n5   Compression using the gzip algorithm\r\n6   bootfs pool property\r\n7   Separate intent log devices\r\n8   Delegated administration\r\n9   refquota and refreservation properties\r\n10  Cache devices\r\n11  Improved scrub performance\r\n12  Snapshot properties\r\n13  snapused property\r\n14  passthrough-x aclinherit\r\n15  user\/group space accounting\r\n16  stmf property support\r\n17  Triple-parity RAID-Z\r\n18  Snapshot user holds\r\n19  Log device removal\r\n20  Compression using zle (zero-length encoding)\r\n21  Deduplication\r\n22  Received properties\r\n23  Slim ZIL\r\n24  System attributes\r\n25  Improved scrub stats\r\n26  Improved snapshot deletion performance\r\n27  Improved snapshot creation performance\r\n28  Multiple vdev replacements\r\n\r\nFor more information on a particular version, including supported releases,\r\nsee the ZFS Administration Guide.<\/pre>\n<h4>\u30fbdeduplication\u306e\u30c6\u30b9\u30c8\uff08\u305d\u3082\u305d\u3082\u30b3\u30ec\u304c\u76ee\u7684\uff09<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">mkdir \/usr\/zfstest<\/pre>\n<p># \u30c7\u30d5\u30a9\u306e\u307e\u307e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3089\/usr\u304c\u4e00\u756a\u5bb9\u91cf\u304c\u5927\u304d\u304b\u3063\u305f\u305f\u3081\/usr\u306b\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u7f6e\u304f\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cd \/usr\/zfstest<\/pre>\n<p>1GB\u306e\u30c7\u30a3\u30b9\u30af\u30a4\u30e1\u30fc\u30b8\u30924\u3064\u7528\u610f\u3059\u308b<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">dd if=\/dev\/zero of=disk1.img bs=1m count=1k\r\ndd if=\/dev\/zero of=disk2.img bs=1m count=1k\r\ndd if=\/dev\/zero of=disk3.img bs=1m count=1k\r\ndd if=\/dev\/zero of=disk4.img bs=1m count=1k<\/pre>\n<p>raidz2\u306e\u30d7\u30fc\u30eb\u3092\u4f5c\u6210<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">zpool create mypool raidz2 \/usr\/zfstest\/disk1.img \/usr\/zfstest\/disk2.img \/usr\/zfstest\/disk3.img \/usr\/zfstest\/disk4.img\r\nzfs set dedup=on mypool<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">zfs list<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">NAME     USED  AVAIL  REFER  MOUNTPOINT\r\nmypool   128K  1.95G  44.8K  \/mypool<\/pre>\n<p>\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u3044\u3066\u307f\u308b<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">dd if=\/dev\/urandom of=\/mypool\/test.dat bs=1k count=100k<\/pre>\n<p># \u9045\u3044\u7269\u7406\u30c7\u30a3\u30b9\u30af\u4e0a\u306b\u30a4\u30e1\u30fc\u30b84\u3064\u3082\u306e\u305b\u3066\u308b\u304b\u3089\u6fc0\u9045\uff08\u6c57<br \/>\n# 256KB\/s\u3050\u3089\u3044\u3002\u3084\u3079\u3047w<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">zfs list<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">NAME     USED  AVAIL  REFER  MOUNTPOINT\r\nmypool   101M  1.85G  99.9M  \/mypool<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cp \/mypool\/test.dat \/mypool\/test.dat.copy\r\nzfs list<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">NAME     USED  AVAIL  REFER  MOUNTPOINT\r\nmypool   201M  1.84G   200M  \/mypool<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cp \/mypool\/test.dat \/mypool\/test.dat.copy2\r\nzfs list<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">NAME     USED  AVAIL  REFER  MOUNTPOINT\r\nmypool   301M  1.84G   300M  \/mypool\r\n<\/pre>\n<p>AVAIL\u304c\u6e1b\u3089\u306a\u3044\u3000\uff77\uff80\u2501(\uff9f\u2200\uff9f)\u2501!<\/p>\n<p>\u3082\u3057dedup\u304c\u306a\u304b\u3063\u305f\u3089\u300c\u30c7\u30a3\u30b9\u30af\u5bb9\u91cf\u304c\u8db3\u308a\u306a\u304f\u306a\u3063\u3061\u3083\u3046\uff01\u300d\u3063\u3066\u3068\u3053\u308d\u307e\u3067\u3084\u3063\u3066\u307f\u3088\u3046<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cp \/mypool\/test.dat \/mypool\/test.dat.copy3\r\n(\u7565)\r\ncp \/mypool\/test.dat \/mypool\/test.dat.copy21<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">zfs list<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">NAME     USED  AVAIL  REFER  MOUNTPOINT\r\nmypool  2.15G  1.81G  2.15G  \/mypool<\/pre>\n<p>\u5143\u3005\u306eAVAIL\u304c1.85G\u3001\u305d\u3057\u3066\u73fe\u5728\u306eUSED\u304c2.15G\u30fb\u30fb\u30fb<br \/>\n\u30e0\u30d5\u30d5w<\/p>\n<p>dedup on\u3068off\u306e\u6027\u80fd\u5dee\u3082\u8abf\u3079\u305f\u3044\u304c\u3001\u3084\u308b\u306a\u3089\u5b9f\u904b\u7528\u3067\u4f7f\u3048\u308b\u3088\u3046\u306a\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u3092\u624b\u306b\u5165\u308c\u3066\u304b\u3089\u3060\u306a\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[293,368],"class_list":["post-1023","post","type-post","status-publish","format-standard","hentry","category-tech","tag-freebsd","tag-zfs"],"_links":{"self":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts\/1023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/comments?post=1023"}],"version-history":[{"count":0,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/posts\/1023\/revisions"}],"wp:attachment":[{"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/media?parent=1023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/categories?post=1023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peta.okechan.net\/blog\/wp-json\/wp\/v2\/tags?post=1023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}