
Ich habe Probleme, eine Festplatte in einem vorhandenen Zpool auf einem System mit Solaris 10 auf einem x86-Prozessor zu ersetzen. Der Zpool wurde ursprünglich mit zwei gespiegelten Slices erstellt. Eine der Festplatten ist ausgefallen, also habe ich sie physisch durch eine neue Festplatte ersetzt. Ich habe prvtoc und fmthard ausgeführt, um die Festplattenbezeichnung von der funktionierenden Festplatte auf die neue Festplatte zu kopieren:
prtvtoc /dev/rdsk/c1t0d0s2 >/tmp/c1t0d0s2.out
fmthard -s /tmp/c1t0d0s2.out >/dev/rdsk/c1t1d0s2
Dann habe ich versucht, das neue Laufwerk online zu bringen und habe eine Warnung erhalten, dass das Gerät immer noch fehlerhaft sei:
$ zpool online pool c1t1d0s6
warning: device 'c1t1d0s6' onlined, but remains in faulted state
Die Ausgabe von zpool status -v lautet:
NAME STATE READ WRITE CKSUM
pool DEGRADED 0 0 0
mirror-0 DEGRADED 0 0 0
c1t0d0s6 ONLINE 0 0 0
c1t1d0s6 UNAVAIL 0 0 0 corrupted data
(c1t1d0 ist das ersetzte Laufwerk.)
Dann habe ich c1t1d0 wieder offline genommen und versucht, den Befehl „zpool replace“ auszuführen, aber auch das hat nicht funktioniert:
$ zpool replace pool c1t1d0s6
invalid vdev specification
use '-f' to override the following errors:
/dev/dsk/c1t1d0s6 overlaps with /dev/dsk/c1t1d0s2
Weiß jemand, was los ist? Ist es sicher, das Flag „-f“ zu verwenden?
Bearbeiten:Nach dem Ausführen von zpool replace -f erhalte ich:
pool: pool
state: DEGRADED
status: The pool is formatted using an older on-disk format. The pool can
still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'. Once this is done, the
pool will no longer be accessible on older software versions.
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
pool DEGRADED 0 0 0
mirror-0 DEGRADED 0 0 0
c1t0d0s6 ONLINE 0 0 0
replacing-1 UNAVAIL 0 0 0 insufficient replicas
c1t1d0s6/old OFFLINE 0 0 0
c1t1d0s6 UNAVAIL 0 342 0 experienced I/O failures
Ich sehe Fehler auf dem neuen Laufwerk in der Ausgabe von iostat -e. Ich vermute, das neue Laufwerk könnte auch defekt sein?
Bearbeiten 2: Ich weiß nicht, was los ist. Ich habe es mit demselben Verfahren auf einem anderen Laufwerk versucht. Nach dem Ausführen von zpool replace -f hat der ZFS-Pool einen Scrub ausgeführt, aber die Statusausgabe lautet:
pool: pool
state: ONLINE
status: The pool is formatted using an older on-disk format. The pool can
still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'. Once this is done, the
pool will no longer be accessible on older software versions.
scrub: scrub completed after 12h56m with 0 errors on Wed Aug 29 06:49:16 2012
config:
NAME STATE READ WRITE CKSUM
pool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
c1t0d0s6 ONLINE 0 0 0
replacing-1 ONLINE 5.54M 19.9M 0
c1t1d0s6/old UNAVAIL 0 0 0 corrupted data
c1t1d0s6 UNAVAIL 0 0 0 corrupted data
Nach dem Offlineschalten von c1t1d0s6 lautet die Zpool-Statusausgabe:
pool: pool
state: ONLINE
status: The pool is formatted using an older on-disk format. The pool can
still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'. Once this is done, the
pool will no longer be accessible on older software versions.
scrub: scrub completed after 12h56m with 0 errors on Wed Aug 29 06:49:16 2012
config:
NAME STATE READ WRITE CKSUM
pool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
c1t0d0s6 ONLINE 0 0 0
replacing-1 ONLINE 5.54M 19.9M 0
c1t1d0s6/old UNAVAIL 0 0 0 corrupted data
c1t1d0s6 UNAVAIL 0 0 0 corrupted data
Ich verstehe es nicht. Sollte das System nicht in der Lage sein, c1t1d0s6 durch den Spiegel auf c1t0d0s6 zu ersetzen?
Antwort1
Haben Sie die Warnungen in gelöscht fmadm
? Und das zpool clear
... Es ist sicher, zpool replace mit dem Switch auszuführen -f
, aber ich denke, Ihre Aussage ist falsch, es sei denn, Sie haben die fehlerhafte Festplatte bereits entfernt.
http://docs.oracle.com/cd/E19253-01/819-5461/gbcet/index.html
Antwort2
Überprüfen Sie die Kabel oder den Laufwerksschlitten und -steckplatz. Eine laute SATA-Verbindung führt zu Fehlern und fmadm verwendet diese Informationen, um festzustellen, wann ein Gerät fehlerhaft ist. Ich hatte Laufwerke, von denen ich dachte, sie seien defekt, aber es war nur ZFS, das bemerkte, dass es keine gültigen Daten zuverlässig erhielt. Ich bemerkte ein eingeklemmtes SATA-Kabel, ersetzte es und lief zpool clear
und zpool scrub
keine Fehler mehr.