# 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).
FormatはZFSで行う
ZFS は Sun が開発し,CDDL でオープンソースとして公開されているファイルシステム.特徴として,ストレージプールの概念があり,ディスクの違いを気にせずに管理できる事や,ZFS 自身で RAID をサポートしている。
ディスクの表示-> 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
新しいHDDを接続
リプレイス後
# zpool status
pool: data
state: DEGRADED
scrub: resilver completed after 0h0m with 0 errors on Mon Oct 10 21:34:14 2011
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
デタッチ後
しばらくするし 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:
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し直すと正常に表示される
再インストールして、以下のようにボリュームの自動インポートする
その後同じIDでユーザを作成し、ホームディレクトを同じように指定する。
CIFSの設定では「ホームディレクトリの有効化」をチェックすること
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の必要がある
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:
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
交換終了