Hetzner - DokuWiki
OpenSolaris Festplattenfehler erkennen
Da ZFS für alle Daten Checksummen vorhält, können Festplattenfehler frühzeitig erkannt werden. ZFS erkennt hierbei selbstständig, ob Fehler aufgetreten sind. Falls erwünscht, so kann mit folgendem Befehl eine manuelle Überprüfung der Checksummen gestartet werden:
$ pfexec zpool scrub <POOLNAME>
Mit Hilfe des Befehls "zpool list" sehen Sie den Status Ihrer ZPools auf den ersten Blick:
$ zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT rpool 49.8G 8.33G 41.4G 16% DEGRADED -
In diesem Fall ist beim ZPool "rpool" eine Platte ausgefallen. Detaillierte Informationen sehen Sie mit "zpool status <POOLNAME>":
$ zpool status rpool pool: rpool 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. see: http://www.sun.com/msg/ZFS-8000-K4 scrub: none requested config: NAME STATE READ WRITE CKSUM storage DEGRADED 0 0 0 mirror DEGRADED 0 0 0 c7d0s0 ONLINE 0 0 0 c7d1s0 FAULTED 15 1.48M 0 too many errors errors: No known data errors
Lassen Sie sich nach erfolgtem Austausch der defekten Festplatte nochmals den Status anzeigen:
$ zpool status rpool pool: rpool 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. see: http://www.sun.com/msg/ZFS-8000-K4 scrub: none requested config: NAME STATE READ WRITE CKSUM storage DEGRADED 0 0 0 mirror DEGRADED 0 0 0 c7d0s0 ONLINE 0 0 0 2023851856823179688 FAULTED 15 1.48M 0 was /dev/dsk/c7d1s0 errors: No known data errors
Den Rebuild-Vorgang können Sie anschließend wie folgt starten:
$ pfexec zpool replace rpool 2023851856823179688 c7d1s0 $ zpool status rpool pool: rpool 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 0h07m, 31.40% done, 0h21m to go config: NAME STATE READ WRITE CKSUM storage DEGRADED 0 0 0 mirror DEGRADED 0 0 0 c7d0s0 ONLINE 0 0 0 replacing DEGRADED 0 0 0 2023851856823179688 FAULTED 15 1.48M 0 was /dev/dsk/c7d1s0 c7d1s0 ONLINE 0 0 0 2.3G resilvered errors: No known data errors
Falls es sich bei dem Pool um Ihren Root-Pool ("rpool") handelt, müssen Sie noch, wie unter OpenSolaris RAID einrichten beschrieben, GRUB auf die ausgewechselte Festplatte installieren.

