RAIDZのディスク交換

ZFSでRAIDZを組んでいる場合の故障ディスクの交換手順です。

●故障状態の確認
この例ではc0d1が故障。

# zpool status
  pool: tt-data
 state: DEGRADED
status: One or more devices are faulted in response to persistent errors.
        Sufficient replicas exist for the pool to continue functioning in a
        degraded state.
action: Replace the faulted device, or use 'zpool clear' to mark the device
        repaired.
 scrub: none requested
config:

        NAME                     STATE     READ WRITE CKSUM
        tt-data                  DEGRADED     0     0     0
          raidz1                 DEGRADED     0     0     0
            c1d0                 ONLINE       0     0     0
            c1d1                 ONLINE       0     0     0
            c0d1                 FAULTED      0     0     0  too many errors
        cache
          /dev/ramdisk/ramdisk0  UNAVAIL      0     0     0  cannot open

errors: No known data errors

●ディスクを切り離す
# zpool offline tt-data c0d1

●HDDの特定
iostatでHDD情報を控えておくと、HDD交換作業の時に特定しやすくなります。

# iostat -En
c2d0             Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Model: ST3500630A      Revision:  Serial No:             5QG Size: 500.10GB <500101152768 bytes="">
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0
c0d0             Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Model: ST3500630AS     Revision:  Serial No:             5QG Size: 500.10GB <500101152768 bytes="">
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0
c0d1             Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Model: ST3750640AS     Revision:  Serial No:             3QD Size: 750.15GB <750147600384 bytes="">
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0
c1d0             Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Model: ST3750640AS     Revision:  Serial No:             3QD Size: 750.15GB <750147600384 bytes="">
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0
c1d1             Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Model: ST3750640AS     Revision:  Serial No:             3QD Size: 750.15GB <750147600384 bytes="">
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0
c5t0d0           Soft Errors: 2 Hard Errors: 0 Transport Errors: 0
Vendor: HL-DT-ST Product: DVD-RAM GH22NP20 Revision: 2.00 Serial No:
Size: 0.00GB <0 bytes="">
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 2 Predictive Failure Analysis: 0

●HDD交換後の作業
HDDをオンライン
# zpool online tt-data c0d1

データのリプレイス(リビルド)
# zpool replace tt-data c0d1

途中の状況

# zpool status
  pool: tt-data
 state: DEGRADED
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
 scrub: resilver in progress for 0h0m, 0.00% done, 1365h27m to go
config:

        NAME                     STATE     READ WRITE CKSUM
        tt-data                  DEGRADED     0     0     0
          raidz1                 DEGRADED     0     0     0
            c1d0                 ONLINE       0     0     0
            c1d1                 ONLINE       0     0     0
            replacing            DEGRADED     0     0   242
              c0d1s0/o           FAULTED      0     0     0  too many errors
              c0d1               ONLINE       0     0     0  1.00M resilvered
        cache
          /dev/ramdisk/ramdisk0  UNAVAIL      0     0     0  cannot open

errors: No known data errors
#

トラックバック(0)

トラックバックURL: http://kirihari.net/mt/mt-tb.cgi/135

コメントする