*Raidリカバリ(FreeNAS) [#nf566ae9]

RIGHT:更新日&lastmod();

**接続HDDの確認 [#g1318a11]

# egrep 'da[0-9]' /var/run/dmesg.boot
da0 at mpt0 bus 0 scbus2 target 0 lun 0
da0: <VMware, VMware Virtual S 1.0> Fixed Direct Access SCSI-2 device
da0: 320.000MB/s transfers (160.000MHz, offset 127, 16bit)
da0: Command Queueing enabled
da0: 16384MB (33554432 512 byte sectors: 255H 63S/T 2088C)
da1 at mpt0 bus 0 scbus2 target 1 lun 0
da1: <VMware, VMware Virtual S 1.0> Fixed Direct Access SCSI-2 device
da1: 320.000MB/s transfers (160.000MHz, offset 127, 16bit)
da1: Command Queueing enabled
da1: 143360MB (293601280 512 byte sectors: 255H 63S/T 18275C)
da2 at mpt0 bus 0 scbus2 target 2 lun 0
da2: <VMware, VMware Virtual S 1.0> Fixed Direct Access SCSI-2 device
da2: 320.000MB/s transfers (160.000MHz, offset 127, 16bit)
da2: Command Queueing enabled
da2: 122880MB (251658240 512 byte sectors: 255H 63S/T 15665C)
GEOM: da0s1: geometry does not match label (16h,63s != 255h,63s).
 # egrep 'da[0-9]' /var/run/dmesg.boot
 da0 at mpt0 bus 0 scbus2 target 0 lun 0
 da0: <VMware, VMware Virtual S 1.0> Fixed Direct Access SCSI-2 device
 da0: 320.000MB/s transfers (160.000MHz, offset 127, 16bit)
 da0: Command Queueing enabled
 da0: 16384MB (33554432 512 byte sectors: 255H 63S/T 2088C)
 da1 at mpt0 bus 0 scbus2 target 1 lun 0
 da1: <VMware, VMware Virtual S 1.0> Fixed Direct Access SCSI-2 device
 da1: 320.000MB/s transfers (160.000MHz, offset 127, 16bit)
 da1: Command Queueing enabled
 da1: 143360MB (293601280 512 byte sectors: 255H 63S/T 18275C)
 da2 at mpt0 bus 0 scbus2 target 2 lun 0
 da2: <VMware, VMware Virtual S 1.0> Fixed Direct Access SCSI-2 device
 da2: 320.000MB/s transfers (160.000MHz, offset 127, 16bit)
 da2: Command Queueing enabled
 da2: 122880MB (251658240 512 byte sectors: 255H 63S/T 15665C)
 GEOM: da0s1: geometry does not match label (16h,63s != 255h,63s).


---------


**FreeNAS 8 [#xce624a3]

FormatはZFSで行う~
ZFS は Sun が開発し,CDDL でオープンソースとして公開されているファイルシステム.特徴として,ストレージプールの概念があり,ディスクの違いを気にせずに管理できる事や,ZFS 自身で RAID をサポートしている。


***ZFSをミラーで作成 [#mc408e04]

&ref("./FreeNAS0.png");

***HDDの修復 [#na3f8acf]

ディスクの表示-> Erorr Disk を「リプレイス」し、 Error Diskを「デタッチ」
すればOKなようだ。すべてWebからできそう。

''正常時''

 # zpool status
   pool: data
  state: ONLINE
  scrub: none requested
 config:
 
         NAME        STATE     READ WRITE CKSUM
         data        ONLINE       0     0     0
           mirror    ONLINE       0     0     0
             da1p2   ONLINE       0     0     0
             da2p2   ONLINE       0     0     0
 
 errors: No known data errors


''HDDが不良時(HDDを取出した状態)''

 # zpool status
   pool: data
  state: DEGRADED
 status: One or more devices could not be opened.  Sufficient replicas exist for
         the pool to continue functioning in a degraded state.
 action: Attach the missing device and online it using 'zpool online'.
    see: http://www.sun.com/msg/ZFS-8000-2Q
  scrub: none requested
 config:
 
         NAME                     STATE     READ WRITE CKSUM
         data                     DEGRADED     0     0     0
           mirror                 DEGRADED     0     0     0
             5104904834384771331  UNAVAIL      0     0     0  was /dev/da1p2
             da1p2                ONLINE       0     0     0
 
 errors: No known data errors

&ref("./FreeNAS1.png");

''新しいHDDを接続''

&ref("./FreeNAS2.png");

リプレイス後
''リプレイス後''

 # zpool status
   pool: data
  state: DEGRADED
  scrub: resilver completed after 0h0m with 0 errors on Mon Oct 10 21:34:14 2011
config:
 config:
 
         NAME                        STATE     READ WRITE CKSUM
         data                        DEGRADED     0     0     0
           mirror                    DEGRADED     0     0     0
             replacing               DEGRADED     0     0     0
               14784743390809234066  UNAVAIL      0     0     0  was /dev/da1p2/old
               da1p2                 ONLINE       0     0     0  87K resilvered
             da2p2                   ONLINE       0     0     0
 
 errors: No known data errors

errors: No known data errors

&ref("./FreeNAS3.png");


''デタッチ後''

&ref("./FreeNAS4.png");

しばらくするし AlertをクリックするとOKになるが、表示は赤で、ステータスも「DEGARDED」のままだ。 shellで確認すると

 # zpool status
   pool: data
  state: ONLINE
  scrub: resilver completed after 0h0m with 0 errors on Mon Oct 10 21:34:14 2011
config:

 config:
 
         NAME        STATE     READ WRITE CKSUM
         data        ONLINE       0     0     0
           mirror    ONLINE       0     0     0
             da1p2   ONLINE       0     0     0  87K resilvered
             da2p2   ONLINE       0     0     0

 
 errors: No known data errors

Webも一度Logoutし、Loginし直すと正常に表示される

-----------
***システム側のHDDの復旧 [#o80501c9]

再インストールして、以下のようにボリュームの自動インポートする

-----------
&ref("./FreeNAS5.png");

その後同じIDでユーザを作成し、ホームディレクトを同じように指定する。

CIFSの設定では「ホームディレクトリの有効化」をチェックすること

**FreeNAS 7 [#p7b38685]

CIFS/SMB の設定は 認証はローカルユーザにする


RaidはソフトRaidではなくZFSでMirrorを作成

ZFSで仮想デバイス作成時 名前が(1)になる

 # zpool status
   pool: test  ----  (1)
  state: ONLINE
  scrub: none requested
 config:
 
         NAME        STATE     READ WRITE CKSUM
         test        ONLINE       0     0     0
           mirror    ONLINE       0     0     0
             da1     ONLINE       0     0     0
             da2     ONLINE       0     0     0
 
 errors: No known data errors

''一台のHDDが不良時''

 # zpool status
   pool: test
  state: DEGRADED
 status: One or more devices could not be used because the label is missing or
         invalid.  Sufficient replicas exist for the pool to continue
         functioning in a degraded state.
 action: Replace the device using 'zpool replace'.
    see: http://www.sun.com/msg/ZFS-8000-4J
  scrub: none requested
 config:
 
         NAME                     STATE     READ WRITE CKSUM
         test                     DEGRADED     0     0     0
           mirror                 DEGRADED     0     0     0
             7142271095653032901  UNAVAIL      0     0     0  was /dev/da1
             da2                  ONLINE       0     0     0
 
 errors: No known data errors

''HDDを追加し修復''

このとき 交換するにはSTATEが UNAVAILの必要がある

-ディスク -> マネージメント

-交換するディスクを削除(上記の場合は da1)

-再起動

-ディスク -> マネージメント

-新しい HDDをZFSで追加

Shellで

 # zpool replace test /dev/da1 /dev/da1
 
 # zpool status
   pool: test
  state: ONLINE
  scrub: scrub completed after 0h0m with 0 errors on Mon Oct 10 10:26:44 2011
config:
 config:
 
         NAME        STATE     READ WRITE CKSUM
         test        ONLINE       0     0     0
           mirror    ONLINE       0     0     0
             da1     ONLINE       0     0     0
             da2     ONLINE       0     0     0
 
 errors: No known data errors

交換終了

**参考 [#b916ba66]

-http://xmms.jp/blog/index.php?entry=entry110424-030854

-http://vor-net.com/2011/05/freenas%E3%81%A7zfsraidz1%E3%81%AEaft%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E4%BA%A4%E6%8F%9B/



トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS