今回はRAID-Z(RAID5)で運用しているFreeNASのディスクを交換します。最終的には4台交換して容量をアップさせる予定です。
コマンドでも確認
$ zpool status
pool: pool3
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://illumos.org/msg/ZFS-8000-2Q
scan: scrub repaired 0 in 0 days 02:51:16 with 0 errors on Tue Apr 21 03:18:03 2020
config:
NAME STATE READ WRITE CKSUM pool3 DEGRADED 0 0 0 raidz1-0 DEGRADED 0 0 0 gptid/30806caf-ce5d-11e9-9a7f-d8d385af77ab ONLINE 0 0 0 gptid/31ac9bac-ce5d-11e9-9a7f-d8d385af77ab ONLINE 0 0 0 gptid/329d48ef-ce5d-11e9-9a7f-d8d385af77ab ONLINE 0 0 0 7707862908047535771 UNAVAIL 0 0 0 was /dev/gptid/33a0a71d-ce5d-11e9-9a7f-d8d385af77ab
errors: No known data errors
念の為にsmartテストを行う
$ smartctl -t short /dev/ada3 SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error 1 Short offline Completed without error 00% 2410 -
問題ありませんのでリプレースさせます。
リプレース作業
念の為コマンドラインでも状況を確認しておきます。
$ zpool status
pool: pool3
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.
scan: resilver in progress since Thu Apr 23 00:29:54 2020
524G scanned at 3.09G/s, 408M issued at 5.51M/s, 1.74T total
0 resilvered, 0.02% done, no estimated completion time
config:
NAME STATE READ WRITE CKSUM pool3 DEGRADED 0 0 0 raidz1-0 DEGRADED 0 0 0 gptid/30806caf-ce5d-11e9-9a7f-d8d385af77ab ONLINE 0 0 0 gptid/31ac9bac-ce5d-11e9-9a7f-d8d385af77ab ONLINE 0 0 0 gptid/329d48ef-ce5d-11e9-9a7f-d8d385af77ab ONLINE 0 0 0 replacing-3 UNAVAIL 0 0 0 7707862908047535771 UNAVAIL 0 0 0 was /dev/gptid/33a0a71d-ce5d-11e9-9a7f-d8d385af77ab gptid/168768bd-84ae-11ea-8dbd-d8d385af77ab ONLINE 0 0 0
errors: No known data errors
しばらくすると完了予測時間が表示されます。約6時間と出てますが、このあと3時間程度と表示が変わりました。
pool: pool3 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. scan: resilver in progress since Thu Apr 23 00:29:54 2020 662G scanned at 516M/s, 12.5G issued at 87.1M/s, 1.74T total 2.89G resilvered, 0.70% done, 0 days 05:46:16 to go
一晩経って状態を確認する
zpoolコマンドでも正常性を確認
$ zpool status pool: pool3 state: ONLINE scan: resilvered 424G in 0 days 03:05:15 with 0 errors on Thu Apr 23 03:35:09 2020
念の為gpartでパーテーションも確認します。CLIで交換している人の記事では手動でパーテーション合わせている方もいらっしゃいますが、GUIからの交換ではSWAP領域も自動で取られているようで、問題ないと思います。
$ gpart show /dev/ada2 => 40 976773088 ada2 GPT (466G) 40 88 - free - (44K) 128 4194304 1 freebsd-swap (2.0G) 4194432 972578696 2 freebsd-zfs (464G) $ gpart show /dev/ada3 => 40 5860533088 ada3 GPT (2.7T) 40 88 - free - (44K) 128 4194304 1 freebsd-swap (2.0G) 4194432 5856338696 2 freebsd-zfs (2.7T)
同様の手順で4台交換すれば容量が増えるはず!ですが、別記事にて。