Veranstaltungen/2009-12-04 ZFS-Workshop/Szenario: Ausfall einer Festplatte: Unterschied zwischen den Versionen

Aus UUGRN
(Navigation eingebaut)
(rewrite - diesmal mit Hilfe.)
Zeile 1: Zeile 1:
Ausgangslage:
+
<pre>zpool status
<pre>shl@sonnenkind:/testpool$ zpool status testpool
+
  pool: tank
   pool: testpool
+
state: DEGRADED
 +
scrub: resilver completed after 0h0m with 0 errors on Tue Apr 22 14:54:50 2008
 +
config:
 +
 
 +
        NAME          STATE    READ WRITE CKSUM
 +
        tank          DEGRADED    0    0    0
 +
          mirror      ONLINE      0    0    0
 +
            c0t1d0    ONLINE      0    0    0
 +
            c1t1d0    ONLINE      0    0    0
 +
          mirror      ONLINE      0    0    0
 +
            c0t2d0    ONLINE      0    0    0
 +
            c1t2d0    ONLINE      0    0    0
 +
          mirror      DEGRADED    0    0    0
 +
            c0t3d0    ONLINE      0    0    0
 +
            c1t3d0    OFFLINE      0    0    0
 +
 
 +
errors: No known data errors</pre>
 +
 
 +
Das Device wird vom Pool entfernt...
 +
<pre>zpool offline tank c1t3d0</pre>
 +
 
 +
...die Festplatte ausgetauscht...
 +
<pre>zpool online tank c1t3d0
 +
zpool replace tank c1t3d0</pre>
 +
... und wieder in den Pool aufgenommen.
 +
 
 +
<pre>zpool status
 +
   pool: tank
 
  state: ONLINE
 
  state: ONLINE
  scrub: none requested
+
  scrub: resilver completed after 0h0m with 0 errors on Tue Apr 22 14:44:46 2008
 
config:
 
config:
  
         NAME                       STATE    READ WRITE CKSUM
+
         NAME       STATE    READ WRITE CKSUM
         testpool                  ONLINE      0    0    0
+
         tank        ONLINE      0    0    0
           raidz2-0                ONLINE      0    0    0
+
           mirror    ONLINE      0    0    0
             /export/home/shl/HDD0 ONLINE      0    0    0
+
             c0t1d0 ONLINE      0    0    0
             /export/home/shl/HDD1 ONLINE      0    0    0
+
             c1t1d0 ONLINE      0    0    0
            /export/home/shl/HDD2  ONLINE      0    0    0
+
          mirror    ONLINE      0    0    0
             /export/home/shl/HDD3 ONLINE      0    0    0
+
             c0t2d0 ONLINE      0    0    0
             /export/home/shl/HDD4 ONLINE      0    0    0
+
             c1t2d0 ONLINE      0    0    0
           raidz2-1                ONLINE      0    0    0
+
           mirror    ONLINE      0    0    0
            /export/home/shl/HDD5  ONLINE      0    0    0
+
             c0t3d0 ONLINE      0    0    0
            /export/home/shl/HDD6  ONLINE      0    0    0
+
             c1t3d0 ONLINE      0    0    0
            /export/home/shl/HDD7  ONLINE      0    0    0
 
             /export/home/shl/HDD8 ONLINE      0    0    0
 
             /export/home/shl/HDD9 ONLINE      0    0    0
 
  
 
errors: No known data errors</pre>
 
errors: No known data errors</pre>
  
Wir legen Daten im Pool ab...
+
Der Rest geschieht durch Magie.
<pre>shl@sonnenkind:~$ pfexec cp -R /opt/DTT/ /testpool/
+
 
shl@sonnenkind:~$ ls -la
+
Wenn wir glücklich sind:
total 5
+
<pre>zpool clear tank</pre>
drwxr-xr-x  3 root root  3 2009-11-26 20:19 .
+
(Setzt den Fehler-Counter zurück und markiert den Pool als "OK")
drwxr-xr-x 27 root root 28 2009-11-26 20:14 ..
+
 
drwxr-xr-x 31 root root 50 2009-11-26 20:19 DTT
+
----
</pre>
+
''Quellen:''
 +
* http://docs.sun.com/app/docs/doc/820-2313/gbcet?a=view
 +
 
  
 
[[Kategorie:ZFS]]
 
[[Kategorie:ZFS]]

Version vom 4. Dezember 2009, 10:27 Uhr

zpool status
  pool: tank
 state: DEGRADED
 scrub: resilver completed after 0h0m with 0 errors on Tue Apr 22 14:54:50 2008
config:

        NAME           STATE     READ WRITE CKSUM
        tank           DEGRADED     0     0     0
          mirror       ONLINE       0     0     0
            c0t1d0     ONLINE       0     0     0
            c1t1d0     ONLINE       0     0     0
          mirror       ONLINE       0     0     0
            c0t2d0     ONLINE       0     0     0
            c1t2d0     ONLINE       0     0     0
          mirror       DEGRADED     0     0     0
            c0t3d0     ONLINE       0     0     0
            c1t3d0     OFFLINE      0     0     0

errors: No known data errors

Das Device wird vom Pool entfernt...

zpool offline tank c1t3d0

...die Festplatte ausgetauscht...

zpool online tank c1t3d0
zpool replace tank c1t3d0

... und wieder in den Pool aufgenommen.

zpool status
  pool: tank
 state: ONLINE
 scrub: resilver completed after 0h0m with 0 errors on Tue Apr 22 14:44:46 2008
config:

        NAME        STATE     READ WRITE CKSUM
        tank        ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            c0t1d0  ONLINE       0     0     0
            c1t1d0  ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            c0t2d0  ONLINE       0     0     0
            c1t2d0  ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            c0t3d0  ONLINE       0     0     0
            c1t3d0  ONLINE       0     0     0

errors: No known data errors

Der Rest geschieht durch Magie.

Wenn wir glücklich sind:

zpool clear tank

(Setzt den Fehler-Counter zurück und markiert den Pool als "OK")


Quellen: