{"id":690,"date":"2011-06-28T19:05:09","date_gmt":"2011-06-28T10:05:09","guid":{"rendered":"http:\/\/unos.biz\/blog\/?p=690"},"modified":"2011-06-28T19:09:35","modified_gmt":"2011-06-28T10:09:35","slug":"zfs%e4%b9%85%e3%80%85%e3%81%ab%e8%a9%a6%e3%81%99","status":"publish","type":"post","link":"http:\/\/unos.biz\/blog\/archives\/690","title":{"rendered":"zfs\u4e45\u3005\u306b\u8a66\u3059"},"content":{"rendered":"<p>\u524d\u304b\u3089\u3069\u3046\u3057\u3088\u3046\u3068\u601d\u3063\u3066\u3044\u305fNAS\u306e\u30ea\u30d7\u30ec\u30a4\u30b9\u306e\u305f\u3081\u3001\u3044\u304f\u3064\u304b\u8a66\u9a13\u3057\u3066\u307f\u305f\u306e\u3067\u30e1\u30e2\u3002\u74b0\u5883\u306f\u3055\u3063\u304d\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304d\u305fOpenIndiana(io_148) x86\/64bit\u3092VMWare\u4e0a\u3067\u52d5\u304b\u3057\u305f\u7269\u3002c2t0d0\u304c\u8d77\u52d5\u30c7\u30a3\u30b9\u30af\u3067\u3001c2t1d0, c2t2d0, c2t5d0\u304c200MB\u306e\u7389\u3001c2t3d0, c2t4d0, c2t6d0\u304c400MB\u306e\u7389\u3002\u9023\u756a\u3058\u3083\u306a\u3044\u306e\u306f\u3061\u3087\u3063\u3068\u30df\u30b9\u3057\u305f\u304b\u3089\u3067\u4ed6\u610f\u306f\u306a\u3044\u3002<\/p>\n<h3>\u5bb9\u91cf\u5236\u9650\u3057\u305f\u30b9\u30e9\u30a4\u30b9\u3067pool<\/h3>\n<p>\u5e02\u8ca9\u3055\u308c\u3066\u3044\u308bHDD\u306f\u30011TB\u3068\u66f8\u3044\u3066\u3042\u3063\u3066\u30821TB(1 * 1000 * 1000 * 1000 * 1000 bytes)\u3067\u306f\u306a\u304f\u3066\u305d\u308c\u3088\u308a\u3044\u304f\u3089\u304b\u591a\u3044\u306e\u304c\u666e\u901a\u3060\u3002\u305d\u306e\u305f\u3081\u3001HDD\u3092\u305d\u306e\u307e\u307e\u5168\u5bb9\u91cf\u3067\u3064\u304b\u3063\u3066\u3044\u308b\u3068\u3001\u6545\u969c\u306a\u3069\u306e\u969b\u306b\u7c21\u5358\u306b\u5165\u308c\u66ff\u3048\u3089\u308c\u306a\u304f\u306a\u308b\u3002\u305d\u308c\u3069\u3053\u308d\u304b\u9055\u3046\u30a4\u30f3\u30bf\u30d5\u30a7\u30a4\u30b9\u306b\u7e4b\u3044\u3060\u3060\u3051\u3067\u305d\u3046\u306a\u308b\u3053\u3068\u3082\u3042\u308b\u306e\u3067(\u306a\u3063\u3066\u3044\u308b\u306e\u3067)\u3001\u305d\u3046\u306a\u3089\u306a\u3044\u3088\u3046\u306b\u5bb9\u91cf\u5236\u9650\u3057\u305f\u30b9\u30e9\u30a4\u30b9\u3092\u5207\u3063\u3066\u3001\u30b9\u30e9\u30a4\u30b9\u3067RAIDZ1\u3092\u7d44\u3093\u3067\u307f\u308b\u3002<\/p>\n<p><!--more--><\/p>\n<h4>format\u3059\u308b<\/h4>\n<pre>root@solaris:~# format\r\nSearching for disks...done\r\n\r\n\r\nAVAILABLE DISK SELECTIONS:\r\n       0. c2t0d0 <VMware,-VMware Virtual -1.0  cyl 4093 alt 2 hd 128 sec 32>\r\n          \/pci@0,0\/pci15ad,1976@10\/sd@0,0\r\n       1. c2t1d0 <VMware,-VMware Virtual S-1.0-204.80MB>\r\n          \/pci@0,0\/pci15ad,1976@10\/sd@1,0\r\n       2. c2t2d0 <VMware,-VMware Virtual S-1.0-204.80MB>\r\n          \/pci@0,0\/pci15ad,1976@10\/sd@2,0\r\n       3. c2t3d0 <VMware,-VMware Virtual S-1.0-409.60MB>\r\n          \/pci@0,0\/pci15ad,1976@10\/sd@3,0\r\n       4. c2t4d0 <VMware,-VMware Virtual S-1.0-409.60MB>\r\n          \/pci@0,0\/pci15ad,1976@10\/sd@4,0\r\n       5. c2t5d0 <VMware,-VMware Virtual S-1.0-204.80MB>\r\n          \/pci@0,0\/pci15ad,1976@10\/sd@5,0\r\n       6. c2t6d0 <VMware,-VMware Virtual S-1.0-409.60MB>\r\n          \/pci@0,0\/pci15ad,1976@10\/sd@6,0\r\nSpecify disk (enter its number): 1\r\nselecting c2t1d0\r\n[disk formatted]\r\n\r\n\r\nFORMAT MENU:\r\n        disk       - select a disk\r\n        type       - select (define) a disk type\r\n        partition  - select (define) a partition table\r\n        current    - describe the current disk\r\n        format     - format and analyze the disk\r\n        fdisk      - run the fdisk program\r\n        repair     - repair a defective sector\r\n        label      - write label to the disk\r\n        analyze    - surface analysis\r\n        defect     - defect list management\r\n        backup     - search for backup labels\r\n        verify     - read and display labels\r\n        inquiry    - show vendor, product and revision\r\n        volname    - set 8-character volume name\r\n        !<cmd>     - execute <cmd>, then return\r\n        quit\r\nformat> p\r\n\r\n\r\nPARTITION MENU:\r\n        0      - change `0' partition\r\n        1      - change `1' partition\r\n        2      - change `2' partition\r\n        3      - change `3' partition\r\n        4      - change `4' partition\r\n        5      - change `5' partition\r\n        6      - change `6' partition\r\n        expand - expand label to use whole disk\r\n        select - select a predefined table\r\n        modify - modify a predefined partition table\r\n        name   - name the current table\r\n        print  - display the current table\r\n        label  - write partition map and label to the disk\r\n        !<cmd> - execute <cmd>, then return\r\n        quit\r\npartition> print\r\nCurrent partition table (original):\r\nTotal disk sectors available: 402979 + 16384 (reserved sectors)\r\n\r\nPart      Tag    Flag     First Sector      Size      Last Sector\r\n  0        usr    wm               256   196.66MB       403012    \r\n  1 unassigned    wm                 0        0            0    \r\n  2 unassigned    wm                 0        0            0    \r\n  3 unassigned    wm                 0        0            0    \r\n  4 unassigned    wm                 0        0            0    \r\n  5 unassigned    wm                 0        0            0    \r\n  6 unassigned    wm                 0        0            0    \r\n  8   reserved    wm            403013     8.00MB       419396    \r\n\r\npartition> 0\r\nPart      Tag    Flag     First Sector      Size      Last Sector\r\n  0        usr    wm               256   196.66MB       403012    \r\n\r\nEnter partition id tag[usr]: \r\nEnter partition permission flags[wm]: \r\nEnter new starting Sector[256]: \r\nEnter partition size[402757b, 403012e, 196mb, 0gb, 0tb]: 150mb\r\npartition> print\r\nCurrent partition table (unnamed):\r\nTotal disk sectors available: 402979 + 16384 (reserved sectors)\r\n\r\nPart      Tag    Flag     First Sector      Size      Last Sector\r\n  0        usr    wm               256   150.00MB       307455    \r\n  1 unassigned    wm                 0        0            0    \r\n  2 unassigned    wm                 0        0            0    \r\n  3 unassigned    wm                 0        0            0    \r\n  4 unassigned    wm                 0        0            0    \r\n  5 unassigned    wm                 0        0            0    \r\n  6 unassigned    wm                 0        0            0    \r\n  8   reserved    wm            403013     8.00MB       419396    \r\n\r\npartition> label\r\nReady to label disk, continue? y\r\n\r\npartition> quit\r\n<\/pre>\n<p>\u4ee5\u4e0b\u7701\u7565\u3002\u3068\u308a\u3042\u3048\u305a200MB\u306e\u7389\u306e\u306a\u304b\u306b150MB\u306es0\u30b9\u30e9\u30a4\u30b9\u3092\u4f5c\u3063\u305f\u3002<\/p>\n<h4>zpool\u4f5c\u6210<\/h4>\n<p>\u4e0a\u8a18\u306e\u73893\u672c\u3067raidz1\u3092\u4f5c\u308b<\/p>\n<pre>root@solaris:~# zpool create tank raidz1 c2t1d0s0 c2t2d0s0 c2t5d0s0\r\nroot@solaris:~# zpool status tank\r\n  pool: tank\r\n state: ONLINE\r\n scan: none requested\r\nconfig:\r\n\r\n        NAME        STATE     READ WRITE CKSUM\r\n        tank          ONLINE       0     0     0\r\n          raidz1-0    ONLINE       0     0     0\r\n            c2t1d0s0  ONLINE       0     0     0\r\n            c2t2d0s0  ONLINE       0     0     0\r\n            c2t5d0s0  ONLINE       0     0     0\r\n\r\nerrors: No known data errors\r\nroot@solaris:~# zfs list tank\r\nNAME                     USED  AVAIL  REFER  MOUNTPOINT\r\ntank                     144K   258M  40.0K  \/tank\r\n<\/pre>\n<p>\u7279\u306b\u554f\u984c\u306a\u304f\u4f5c\u308c\u305f\u3088\u3046\u3060\u3002150MB*3\u3067\u3046\u30611\u672c\u304c\u30d1\u30ea\u30c6\u30a3\u306a\u306e\u3067300MB\u5f31\u7a0b\u5ea6\u3042\u308c\u3070\u3044\u3044\u306f\u305a\u306a\u306e\u3067\u82e5\u5e72\u5bb9\u91cf\u304c\u5c11\u306a\u3044\u304c\u7ba1\u7406\u30c7\u30fc\u30bf\u3060\u308d\u3046\u3068\u601d\u3063\u3066\u304a\u304f\u3002<\/p>\n<h4>\u30c7\u30a3\u30b9\u30af\u4e38\u3054\u3068\u4f7f\u3063\u305f\u30c7\u30a3\u30b9\u30af\u3092\u30b9\u30e9\u30a4\u30b9\u306breplace<\/h4>\n<p>zfs\u3067\u306f\u69cb\u6210\u3057\u3066\u3044\u308b\u30c7\u30a3\u30b9\u30af\u3092\u5165\u308c\u66ff\u3048(replace)\u304c\u51fa\u6765\u308b\u3002\u6761\u4ef6\u306f\u5bb9\u91cf\u304c\u7b49\u3057\u3044\u304b\u5927\u304d\u3044\u304b\u3002\u5143\u3005\u4e38\u3054\u3068\u30c7\u30a3\u30b9\u30af\u3067\u5b9a\u7fa9\u3057\u3066\u3042\u3063\u305f\u3082\u306e\u3092\u30b9\u30e9\u30a4\u30b9\u306b\u6301\u3063\u3066\u884c\u3051\u308c\u3070\u81ea\u5b85NAS\u306e\u30ea\u30d7\u30ec\u30a4\u30b9\u304c\u7c21\u5358\u306b\u306a\u308b\u3002\u65e9\u901f\u8a66\u3059\u3002<br \/>\n\u4e0b\u8a18\u4f5c\u696d\u306e\u524d\u306bc2t3d0, c2t4d0, c2t6d0\u306es0\u306f\u3059\u3079\u3066350MB\u306b\u3057\u3066\u4f5c\u3063\u3066\u304a\u3044\u3066\u3042\u308b\u3002\u9577\u3044\u306e\u3067\u7701\u7565\u3002<\/p>\n<pre>root@solaris:~# zpool create tank raidz1 c2t1d0 c2t2d0 c2t5d0\r\nroot@solaris:~# zpool status tank\r\n  pool: tank\r\n state: ONLINE\r\n scan: none requested\r\nconfig:\r\n\r\n        NAME        STATE     READ WRITE CKSUM\r\n        tank        ONLINE       0     0     0\r\n          raidz1-0  ONLINE       0     0     0\r\n            c2t1d0  ONLINE       0     0     0\r\n            c2t2d0  ONLINE       0     0     0\r\n            c2t5d0  ONLINE       0     0     0\r\n\r\nerrors: No known data errors\r\nroot@solaris:~# zfs list tank\r\nNAME   USED  AVAIL  REFER  MOUNTPOINT\r\ntank   120K   352M  40.0K  \/tank<\/pre>\n<p>\u3053\u308c\u3067200MB*3\u306eraidz1\u304c\u3067\u304d\u308b\u3002\u4e38\u3054\u3068HDD\u3067\u69cb\u6210\u3057\u305f\u666e\u901a\u306e\u4f5c\u308a\u3002\u3053\u308c\u3092\u305d\u308c\u305e\u308cc2t[3,4,6]d0s0\u306breplace\u3057\u3066\u3044\u304f\u3002<\/p>\n<pre>root@solaris:~# zpool replace tank c2t1d0 c2t3d0s0\r\nroot@solaris:~# zpool status tank\r\n  pool: tank\r\n state: ONLINE\r\n scan: resilvered 55K in 0h0m with 0 errors on Tue Jun 28 18:54:39 2011\r\nconfig:\r\n\r\n        NAME          STATE     READ WRITE CKSUM\r\n        tank          ONLINE       0     0     0\r\n          raidz1-0    ONLINE       0     0     0\r\n            c2t3d0s0  ONLINE       0     0     0\r\n            c2t2d0    ONLINE       0     0     0\r\n            c2t5d0    ONLINE       0     0     0\r\n\r\nerrors: No known data errors\r\nroot@solaris:~# zpool replace tank c2t2d0 c2t4d0s0\r\nroot@solaris:~# zpool replace tank c2t5d0 c2t6d0s0\r\nroot@solaris:~# zpool status tank\r\n  pool: tank\r\n state: ONLINE\r\n scan: resilvered 63K in 0h0m with 0 errors on Tue Jun 28 18:55:01 2011\r\nconfig:\r\n\r\n        NAME          STATE     READ WRITE CKSUM\r\n        tank          ONLINE       0     0     0\r\n          raidz1-0    ONLINE       0     0     0\r\n            c2t3d0s0  ONLINE       0     0     0\r\n            c2t4d0s0  ONLINE       0     0     0\r\n            c2t6d0s0  ONLINE       0     0     0\r\n\r\nerrors: No known data errors\r\nroot@solaris:~# zfs list tank\r\nNAME   USED  AVAIL  REFER  MOUNTPOINT\r\ntank   138K   351M  40.0K  \/tank<\/pre>\n<p>\u3053\u308c\u3067\u5165\u308c\u66ff\u3048\u306f\u51fa\u6765\u305f\u304c\u5bb9\u91cf\u304c\u5909\u308f\u3089\u306a\u3044\u3002zpool\u306eautoexpand(\u81ea\u52d5\u5bb9\u91cf\u62e1\u5f35)\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4e00\u5ea6ON\u306b\u3057\u3066\u3084\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u306foff\u306b\u3057\u3066\u304a\u3044\u305f\u307b\u3046\u304c\u52dd\u624b\u306b\u5bb9\u91cf\u304c\u5909\u308f\u3089\u306a\u3044\u306e\u3067\u4e0d\u616e\u306e\u4e8b\u6545\u3092\u9632\u3052\u308b\u3060\u308d\u3046\u3002<\/p>\n<pre>root@solaris:~# zpool set autoexpand=on tank\r\nroot@solaris:~# zfs list tank\r\nNAME   USED  AVAIL  REFER  MOUNTPOINT\r\ntank   158K   658M  40.0K  \/tank\r\nroot@solaris:~# zpool set autoexpand=off tank\r\nroot@solaris:~# zpool status tank\r\n  pool: tank\r\n state: ONLINE\r\n scan: resilvered 63K in 0h0m with 0 errors on Tue Jun 28 18:55:01 2011\r\nconfig:\r\n\r\n        NAME          STATE     READ WRITE CKSUM\r\n        tank          ONLINE       0     0     0\r\n          raidz1-0    ONLINE       0     0     0\r\n            c2t3d0s0  ONLINE       0     0     0\r\n            c2t4d0s0  ONLINE       0     0     0\r\n            c2t6d0s0  ONLINE       0     0     0\r\n\r\nerrors: No known data errors<\/pre>\n<p>\u3053\u308c\u3067\u82e5\u5e72\u306eresilver\u3068\u3068\u3082\u306b\u79fb\u884c\u304c\u5b8c\u4e86\u3057\u305f\u3002<\/p>\n<h4>\u672c\u756a\u3067\u306e\u9069\u7528<\/h4>\n<p>\u3053\u306e\u691c\u8a3c\u7d50\u679c\u3092\u9069\u7528\u3057\u305f\u3044\u672c\u756a\u30b5\u30fc\u30d0\u306f1TB\u306eHDD(WD10EADS)\u304c10\u672c\u3055\u3055\u3063\u3066\u3044\u3066\u3001\u3046\u30618\u672c\u3067raidz2\u69cb\u6210\u306b\u306a\u3063\u3066\u3044\u308b\u30b5\u30fc\u30d0\u3060\u304c\u3001\u3053\u306e\u691c\u8a3c\u3067\u5b89\u5fc3\u3057\u3066\u30c7\u30a3\u30b9\u30af\u30ea\u30d7\u30ec\u30a4\u30b9\u304c\u53ef\u80fd\u306b\u306a\u3063\u305f\u3002<br \/>\n\u3072\u3068\u307e\u305a\u30ea\u30d7\u30ec\u30a4\u30b9\u6642\u306b\u306f3TB\u30af\u30e9\u30b9\u306eHDD\u3092\u8cfc\u5165\u306e\u4e0a\u3001\u30b9\u30e9\u30a4\u30b9\u30923*10^12bytes\u306b\u5207\u3063\u3066replace\u3057\u3066\u3044\u304f\u3068\u826f\u3055\u305d\u3046\u3060\u3002Oracle\u306b\u8cb7\u53ce\u3055\u308c\u3066\u4eca\u5f8c\u306ezfs\u958b\u767a\u304c\u3069\u3046\u306a\u308b\u304b\u308f\u304b\u3089\u306a\u3044\u304c\u3001\u4ed6\u306b\u4ee3\u66ff\u306e\u306a\u3044\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3067\u3042\u308b\u4ee5\u4e0a\u4eca\u5f8c\u3082\u4f7f\u3063\u3066\u3044\u304f\u3053\u3068\u306b\u306a\u308b\u3060\u308d\u3046\u3002\u4eca\u5f8c\u3082zfs\u304c\u6d88\u3048\u306a\u3044\u3067\u7121\u511f\u3067\u63d0\u4f9b\u3055\u308c\u7d9a\u3051\u308b\u3053\u3068\u3092\u671f\u5f85\u3057\u305f\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u304b\u3089\u3069\u3046\u3057\u3088\u3046\u3068\u601d\u3063\u3066\u3044\u305fNAS\u306e\u30ea\u30d7\u30ec\u30a4\u30b9\u306e\u305f\u3081\u3001\u3044\u304f\u3064\u304b\u8a66\u9a13\u3057\u3066\u307f\u305f\u306e\u3067\u30e1\u30e2\u3002\u74b0\u5883\u306f\u3055\u3063\u304d\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304d\u305fOpenIndiana(io_148) x86\/64bit\u3092VMWare\u4e0a\u3067\u52d5\u304b\u3057\u305f\u7269\u3002c2t0d0\u304c\u8d77 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[35,36],"tags":[],"_links":{"self":[{"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/posts\/690"}],"collection":[{"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/comments?post=690"}],"version-history":[{"count":6,"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/posts\/690\/revisions"}],"predecessor-version":[{"id":696,"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/posts\/690\/revisions\/696"}],"wp:attachment":[{"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/media?parent=690"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/categories?post=690"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/unos.biz\/blog\/wp-json\/wp\/v2\/tags?post=690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}