본문 바로가기
FreeBSD

ZFS 디스크 복구방법 (FreeBSD)

by 이르가체페 2013. 9. 11.


* 디스크 교체 개요
 1. 시스템 정보 확인, 정상작동중인 디스크와 고장난 디스크의 모델명, 시리얼넘버 확보, 인쇄
    find /dev -name ada* -exec smartctl -i {} \; | egrep -i "serial|Model"

 2. /etc/rc.conf 의 zfs 시작옵션 주석처리, 원하는 구성대로 정확히 디스크가 인식 및 작동할때 부팅스크립트 적용
    #zfs_enable="YES"

 3. 셧다운 후 고장난 디스크 교체
    shutdown -p now

 4. 부팅 후 dmesg 명령으로 해당 디스크가 OS에서 정상적으로 잘 인식하였는지 확인
    dmesg | grep ada

 5. 문제 없다면 zpool로 디스크 교체 실행 (ada5가 고장났을경우)
    service zfs start   
    zpool offline ZFS /dev/ada5
    zpool replace ZFS /dev/ada5
    zpool online ZFS /dev/ada5
    /etc/rc.conf 에서 zfs_enable 주석 해제


* 디스크 교체전 사전 정보조사

 - 2TB 6개를 raidz2 로 구성한 볼륨에서 디스크 두개가 불량인 상태

 - ZFS 상태 확인, ada4, ada5 두개가 볼륨에서 빠져있는것 확인
[ ys  ~ # ] zpool status
  pool: ZFS
 state: DEGRADED
status: One or more devices has experienced an error resulting in data
    corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
    entire pool from backup.
   see: http://www.sun.com/msg/ZFS-8000-8A
  scan: scrub in progress since Wed Sep 11 08:44:11 2013
        68.3M scanned out of 9.74T at 1.34M/s, (scan is slow, no estimated time)
        0 repaired, 0.00% done
config:

    NAME                      STATE     READ WRITE CKSUM
    ZFS                       DEGRADED     0     0     0
      raidz2-0                DEGRADED     0     0     0
        ada0                  ONLINE       0     0     0
        ada1                  ONLINE       0     0     0
        ada2                  ONLINE       0     0     0
        ada3                  ONLINE       0     0     0
        7498011779426547916   OFFLINE      0     0     0  was /dev/ada4
        14751361412168645189  OFFLINE      0     0     0  was /dev/ada5

 - 부팅시 인식된 장치 확인
[ ys  ~ # ] dmesg | grep ada | grep SATA | grep device
ada0: <ST2000DM001-9YN164 CC4C> ATA-8 SATA 3.x device
ada1: <ST2000DM001-9YN164 CC4C> ATA-8 SATA 3.x device
ada2: <ST2000DM001-9YN164 CC4C> ATA-8 SATA 3.x device
ada3: <ST2000DM001-9YN164 CC4C> ATA-8 SATA 3.x device
ada4: <ST2000DM001-9YN164 CC4C> ATA-8 SATA 3.x device
ada5: <ST2000DM001-9YN164 CC4C> ATA-8 SATA 3.x device

 - 장치별 모델명 및 시리얼넘버 확보, 인쇄하여 디스크교체시 참조
[ ys  ~ # ] find /dev -name ada* -exec smartctl -i {} \; | egrep -i "serial|Model"
Device Model:     ST2000DM001-9YN164
Serial Number:    W2409AAB
Device Model:     ST2000DM001-9YN164
Serial Number:    W2409AAA
Device Model:     ST2000DM001-9YN164
Serial Number:    W1E07KAA
Device Model:     ST2000DM001-9YN164
Serial Number:    W2F094AA

 - 작업 전 smartctl 정보 저장 스크립트

[ ys  ~ # ] cat get_smartinfo.sh
#!/bin/sh
filename="result_smartctl_"`date "+%Y%m%d_%H%M%S"`
echo ""  > $filename
for i in ada0 ada1 ada2 ada3 ada4 ada5 ada6 ada7 ada8 ada9 ada10
do
echo "" >> $filename
echo "============= $i smartctl START ===================" >> $filename
smartctl -a /dev/$i >> $filename
echo "" >> $filename
done


[ ys  ~ # ] dmidecode  -t system | head -n 7
# dmidecode 2.11
SMBIOS 2.7 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
    Manufacturer: Supermicro
    Product Name: X9SCI/X9SCA

[ ys  ~ # ] uname -a
FreeBSD  ys .test.co.kr 9.0-STABLE FreeBSD 9.0-STABLE #0: Fri Jul 20 22:46:45 KST 2012     root@gw.test.co.kr:/usr/obj/usr/src/sys/YS  amd64

[ ys  ~ # ] dmesg  | egrep -i  "cpu|memory"  | head -n 2
CPU: Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz (3292.59-MHz K8-class CPU)
real memory  = 17179869184 (16384 MB)



* ZFS 복구과정
 - 디스크 교체 후 장치 확인
[ ys  ~ # ] dmesg | grep ada | grep SATA | grep device
ada0: <ST2000DM001-9YN164 CC4C> ATA-8 SATA 3.x device
ada1: <ST2000DM001-9YN164 CC4C> ATA-8 SATA 3.x device
ada2: <ST2000DM001-9YN164 CC4C> ATA-8 SATA 3.x device
ada3: <ST2000DM001-9YN164 CC4C> ATA-8 SATA 3.x device
ada4: <ST2000DM001-1CH164 CC27> ATA-9 SATA 3.x device
ada5: <Hitachi HDS723020BLA642 MN6OA800> ATA-8 SATA 3.x device

[ ys  ~ # ] find /dev -name ada* -exec smartctl -i {} \; | egrep -i "serial|Model"
Device Model:     ST2000DM001-9YN164
Serial Number:    Z1E059H
Device Model:     ST2000DM001-9YN164
Serial Number:    W2409AZ
Device Model:     ST2000DM001-9YN164
Serial Number:    W1E07K2
Device Model:     ST2000DM001-9YN164
Serial Number:    W2F0941
Device Model:     ST2000DM001-1CH164
Serial Number:    W1E45DZ
Model Family:     Hitachi Deskstar 7K3000
Device Model:     Hitachi HDS723020BLA642
Serial Number:    MN1220F33L2B

(smartctl -a /dev/ada4  추가된 디스크 개별 확인 가능)

 - 두개의 디스크 교체 후 잘 인식되었으므로 복구 진행
ysadmin@ ys  ~ $ zpool offline ZFS /dev/ada4
ysadmin@ ys  ~ $ zpool offline ZFS /dev/ada5
ysadmin@ ys  ~ $ zpool replace ZFS /dev/ada4
ysadmin@ ys  ~ $ zpool status
  pool: ZFS
 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 Wed Sep 11 08:45:27 2013
        73.3M scanned out of 9.74T at 4.07M/s, 697h12m to go
        10.9M resilvered, 0.00% done
config:

    NAME                       STATE     READ WRITE CKSUM
    ZFS                        DEGRADED     0     0     0
      raidz2-0                 DEGRADED     0     0     0
        ada0                   ONLINE       0     0     0
        ada1                   ONLINE       0     0     0
        ada2                   ONLINE       0     0     0
        ada3                   ONLINE       0     0     0
        replacing-4            OFFLINE      0     0     0
          7498011779426547916  OFFLINE      0     0     0  was /dev/ada4/old
          ada4                 ONLINE       0     0     0  (resilvering)
        14751361412168645189   OFFLINE      0     0     0  was /dev/ada5

errors: No known data errors

ysadmin@ ys  ~ $ zpool online ZFS /dev/ada4
ysadmin@ ys  ~ $ zpool status
  pool: ZFS
 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 Wed Sep 11 08:46:14 2013
        38.2M scanned out of 9.74T at 3.47M/s, (scan is slow, no estimated time)
        5.69M resilvered, 0.00% done
config:

    NAME                       STATE     READ WRITE CKSUM
    ZFS                        DEGRADED     0     0     0
      raidz2-0                 DEGRADED     0     0     0
        ada0                   ONLINE       0     0     0
        ada1                   ONLINE       0     0     0
        ada2                   ONLINE       0     0     0
        ada3                   ONLINE       0     0     0
        replacing-4            DEGRADED     0     0     0
          7498011779426547916  OFFLINE      0     0     0  was /dev/ada4/old
          ada4                 ONLINE       0     0     0  (resilvering)
        14751361412168645189   OFFLINE      0     0     0  was /dev/ada5

errors: No known data errors
ysadmin@ ys  ~ $


ysadmin@ ys  ~ $ zpool replace ZFS /dev/ada5
ysadmin@ ys  ~ $ zpool status
  pool: ZFS
 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 Wed Sep 11 08:47:12 2013
        9.33M scanned out of 9.74T at 1.87M/s, (scan is slow, no estimated time)
        2.72M resilvered, 0.00% done
config:

    NAME                        STATE     READ WRITE CKSUM
    ZFS                         DEGRADED     0     0     0
      raidz2-0                  DEGRADED     0     0     0
        ada0                    ONLINE       0     0     0
        ada1                    ONLINE       0     0     0
        ada2                    ONLINE       0     0     0
        ada3                    ONLINE       0     0     0
        replacing-4             DEGRADED     0     0     0
          7498011779426547916   OFFLINE      0     0     0  was /dev/ada4/old
          ada4                  ONLINE       0     0     0  (resilvering)
        replacing-5             OFFLINE      0     0     0
          14751361412168645189  OFFLINE      0     0     0  was /dev/ada5/old
          ada5                  ONLINE       0     0     0  (resilvering)

errors: No known data errors

ysadmin@ ys  ~ $ zpool online ZFS /dev/ada5
ysadmin@ ys  ~ $ zpool status
  pool: ZFS
 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 Wed Sep 11 08:47:44 2013
        29.4M scanned out of 9.74T at 1.34M/s, (scan is slow, no estimated time)
        8.89M resilvered, 0.00% done
config:

    NAME                        STATE     READ WRITE CKSUM
    ZFS                         DEGRADED     0     0     0
      raidz2-0                  DEGRADED     0     0     0
        ada0                    ONLINE       0     0     0
        ada1                    ONLINE       0     0     0
        ada2                    ONLINE       0     0     0
        ada3                    ONLINE       0     0     0
        replacing-4             DEGRADED     0     0     0
          7498011779426547916   OFFLINE      0     0     0  was /dev/ada4/old
          ada4                  ONLINE       0     0     0  (resilvering)
        replacing-5             DEGRADED     0     0     0
          14751361412168645189  OFFLINE      0     0     0  was /dev/ada5/old
          ada5                  ONLINE       0     0     0  (resilvering)

errors: No known data errors
ysadmin@ ys  ~ $



* 볼륨 리빌딩작업중 시스템 상태

[ ys  ~ # ] top
 755 root            0      0      0      0      0      0   0.00% moused
last pid:  2883;  load averages:  0.87,  0.85,  0.57                                                       up 0+00:29:05  09:04:17
71 processes:  2 running, 68 sleeping, 1 waiting
CPU:  0.0% user,  0.0% nice, 19.7% system,  1.1% interrupt, 79.2% idle
Mem: 85M Active, 41M Inact, 552M Wired, 796K Cache, 46M Buf, 15G Free
Swap: 4737M Total, 4737M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME    CPU COMMAND
    0 root        160  -8    0     0K  2560K -       2   8:08 50.10% kernel
   36 root          4  -8    -     0K    80K spa->s  3   0:35  3.37% zfskern
   12 root         22 -76    -     0K   352K WAIT    0   0:31  2.88% intr
   13 root          3  -8    -     0K    48K -       3   0:18  0.88% geom

[ ys  ~ # ] vmstat 1
 procs      memory      page                    disks     faults         cpu
 r b w     avm    fre   flt  re  pi  po    fr  sr ad0 ad1   in   sy   cs us sy id
 0 0 0   1620M    12G   318   0   0   0 66299   0   0   0 4302  833 30818  0 13 87
 0 0 0   1620M    12G     1   0   0   0  1629   0  80  82  572  344 4380  0  2 98
 0 0 0   1620M    12G     2   0   0   0 84706   0 1117 868 6261  181 49247  0 14 86
 0 0 0   1620M    12G     0   0   0   0 68141   0 627 511 3726  132 29721  0 10 90
 0 0 0   1620M    12G     0   0   0   0 134502   0 1036 1083 6283  128 38937  0 30 70
 0 0 0   1620M    12G    46   0   0   0 124509   0 1179 1123 7014  297 47951  0 24 76
 0 0 0   1620M    12G     2   0   0   0 27780   0 333 367 2222  163 17307  0  7 93
 0 0 0   1620M    12G     2   0   0   0 135698   0 1129 1111 6827  419 45130  0 30 70
 0 0 0   1620M    12G     0   0   0   0 67111   0 827 793 4842  146 37276  0 10 90
 0 0 0   1651M    14G  8588   0   0   0 53117   0 858 832 4519 4198 37205  7  9 84
^C

[ ys  ~ # ] iostat ada0 ada1 ada2 ada3 ada4 ada5 1
       tty            ada0             ada1             ada2             ada3             ada4             ada5             cpu
 tin  tout  KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s  us ni sy in id
   1    76 32.18 425 13.35  32.74 418 13.35  33.30 411 13.36  33.59 408 13.37  51.17 264 13.19  37.92 356 13.16   0  0  7  0 92
   0   387 34.58 1145 38.66  34.35 1149 38.53  37.09 1072 38.81  38.60 1026 38.66  75.29 524 38.51  41.81 946 38.61   0  0  8  2 90
   0  1050 33.05 1076 34.72  34.99 1018 34.79  33.73 1055 34.75  34.19 1040 34.72  74.10 494 35.71  37.13 958 34.74   0  0  9  1 90
   0   133 33.92 425 14.06  44.83 323 14.13  41.84 340 13.88  38.75 372 14.06  43.77 306 13.07  52.61 257 13.19   0  0  3  0 97
   0   551 34.30 2192 73.42  35.37 2135 73.73  34.05 2214 73.61  34.58 2178 73.55  62.25 1209 73.48  49.33 1539 74.17   0  0 14  2 84
   0   135 37.54 920 33.73  41.35 839 33.89  40.48 857 33.89  40.37 858 33.83  64.72 530 33.53  39.00 885 33.71   0  0 25  1 74
^C

[ ys  ~ # ] iostat ada3 ada4 1
       tty            ada3             ada4             cpu
 tin  tout  KB/t tps  MB/s   KB/t tps  MB/s  us ni sy in id
   0    60 36.70 698 25.01  58.79 433 24.85   0  0 12  1 87
   0   183 33.09 1064 34.38  80.60 437 34.39   0  0  8  1 91
   0    62 32.12 529 16.61  71.10 254 17.62   0  0  5  0 95
   0    61 34.87 922 31.40  54.42 570 30.32   0  0  6  0 94
   0    61 36.29 1197 42.41  70.28 615 42.24   0  0 22  3 75
   0    62 43.20 765 32.29  59.86 549 32.12   0  0 21  1 78
   0    61 45.51 644 28.64  60.92 481 28.59   0  0 20  1 79
   0    61 33.48 1285 42.00  92.15 465 41.80   0  0 10  1 89
   0    62 34.07 1133 37.70  83.13 465 37.71   0  0  8  1 91
   0    62 32.53 599 19.04  70.05 293 20.02   0  0  6  1 93

[ ys  ~ # ] bonnie -s 1000 -d /ZFS
File '/ZFS/Bonnie.6744', size: 1048576000
Writing with putc()...done
Rewriting...done
Writing intelligently...done
Reading with getc()...done
Reading intelligently...done
Seeker 1...Seeker 2...Seeker 3...start 'em...done...done...done...
              -------Sequential Output-------- ---Sequential Input-- --Random--
              -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
Machine    MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU  /sec %CPU
         1000 357404 94.6 1019680 99.0 918862 99.8 283720 93.7 3010498 98.2 161225.3 169.3




* 소요시간 확인
[ ys  ~ # ] zpool status ; date
  pool: ZFS
 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 Wed Sep 11 08:47:44 2013
        106G scanned out of 9.74T at 145M/s, 19h18m to go
        35.3G resilvered, 1.06% done
config:

    NAME                        STATE     READ WRITE CKSUM
    ZFS                         DEGRADED     0     0     0
      raidz2-0                  DEGRADED     0     0     0
        ada0                    ONLINE       0     0     0
        ada1                    ONLINE       0     0     0
        ada2                    ONLINE       0     0     0
        ada3                    ONLINE       0     0     0
        replacing-4             DEGRADED     0     0     0
          7498011779426547916   OFFLINE      0     0     0  was /dev/ada4/old
          ada4                  ONLINE       0     0     0  (resilvering)
        replacing-5             DEGRADED     0     0     0
          14751361412168645189  OFFLINE      0     0     0  was /dev/ada5/old
          ada5                  ONLINE       0     0     0  (resilvering)

errors: No known data errors
2013년  9월 11일 수요일 09시 00분 10초 KST


[ ys  ~ # ] zpool status ; date
  pool: ZFS
 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 Wed Sep 11 08:47:44 2013
        504G scanned out of 9.74T at 171M/s, 15h44m to go
        168G resilvered, 5.05% done
config:

    NAME                        STATE     READ WRITE CKSUM
    ZFS                         DEGRADED     0     0     0
      raidz2-0                  DEGRADED     0     0     0
        ada0                    ONLINE       0     0     0
        ada1                    ONLINE       0     0     0
        ada2                    ONLINE       0     0     0
        ada3                    ONLINE       0     0     0
        replacing-4             DEGRADED     0     0     0
          7498011779426547916   OFFLINE      0     0     0  was /dev/ada4/old
          ada4                  ONLINE       0     0     0  (resilvering)
        replacing-5             DEGRADED     0     0     0
          14751361412168645189  OFFLINE      0     0     0  was /dev/ada5/old
          ada5                  ONLINE       0     0     0  (resilvering)

errors: No known data errors
2013년  9월 11일 수요일 09시 37분 58초 KST

40여분동안 4%정도 복구하였으니 대략 1%에 10분이라 생각하면 되겠습니다.

계산기 돌려보면...

(37*60+48)/(5.05-1.06) = 568.421초
사용중인 볼륨이라 IO성능이 계속 변하니 정확하지는 않지만 1% 리실버링하는데 568초,

(37*60+48)/(5.05-1.06)*100/3600 = 15.789시간
100% 리빌딩 하는데에는 16시간정도 소요될것으로 보입니다.

하지만 리빌드가 디스크의 외곽부터 진행되어 디스크 안쪽으로 들어갈수록 속도가 느려집니다.

그래서 실제로 리빌드에 소요된 시간은 30시간정도 됩니다.

데이터의 양이나 디스크의 속도에 따라 다르기도 한데, 리빌드초기의 예상시간보다 1.5~2배정도 추가해서 시간을 산정하면 적당할듯합니다.


마지막으로 리빌딩이 완료된 이후의 모습입니다.

[ ys  ~ # ]   zpool status ;
  pool: ZFS
 state: ONLINE
  scan: resilvered 3.25T in 29h4m with 0 errors on Thr Sep 12 14:46:41 2013
config:

    NAME        STATE     READ WRITE CKSUM
    ZFS         ONLINE       0     0     0
      raidz2-0  ONLINE       0     0     0
        ada0    ONLINE       0     0     0
        ada1    ONLINE       0     0     0
        ada2    ONLINE       0     0     0
        ada3    ONLINE       0     0     0
        ada4    ONLINE       0     0     0
        ada5    ONLINE       0     0     0

errors: No known data errors

[ ys  ~ # ]   df -k
Filesystem 1024-blocks       Used     Avail Capacity  Mounted on
/dev/da0p2    56754908    8049872  44164644    15%    /
devfs                1          1         0   100%    /dev
ZFS         7655437549 6964939448 690498101    91%    /ZFS
devfs                1          1         0   100%    /var/named/dev





# 디스크 교체 (2013.0930 추가)

 - ST2000DM001 디스크가 또 한개 죽음

- messages smartd 로그지

Aug 26 21:00:43 netfs smartd[1157]: Device: /dev/ada3, 8 Currently unreadable (pending) sectors
Aug 26 21:00:43 netfs smartd[1157]: Device: /dev/ada3, 8 Offline uncorrectable sectors

Sep 23 16:24:34 netfs kernel: ahcich3: Timeout on slot 10 port 0
Sep 23 16:24:34 netfs kernel: ahcich3: is 00000000 cs 00000400 ss 00000000 rs 00000400 tfd c0 serr 00000000 cmd 0000ca17
Sep 23 16:25:05 netfs kernel: ahcich3: AHCI reset: device not ready after 31000ms (tfd = 00000080)
Sep 23 16:25:35 netfs kernel: ahcich3: Timeout on slot 10 port 0
Sep 23 16:25:35 netfs kernel: ahcich3: is 00000000 cs 00000400 ss 00000000 rs 00000400 tfd 80 serr 00000000 cmd 0000ca17
Sep 23 16:26:07 netfs kernel: ahcich3: AHCI reset: device not ready after 31000ms (tfd = 00000080)
Sep 23 16:26:37 netfs kernel: ahcich3: Timeout on slot 10 port 0
Sep 23 16:26:37 netfs kernel: ahcich3: is 00000000 cs 00000400 ss 00000000 rs 00000400 tfd 80 serr 00000000 cmd 0000ca17
Sep 23 16:26:37 netfs kernel: (ada3:ahcich3:0:0:0): lost device
Sep 23 16:27:08 netfs kernel: ahcich3: AHCI reset: device not ready after 31000ms (tfd = 00000080)
Sep 23 16:27:38 netfs kernel: ahcich3: Timeout on slot 10 port 0
Sep 23 16:27:38 netfs kernel: ahcich3: is 00000000 cs 00000400 ss 00000000 rs 00000400 tfd 80 serr 00000000 cmd 0000ca17
Sep 23 16:27:38 netfs kernel: (ada3:ahcich3:0:0:0): removing device entry
Sep 23 16:27:38 netfs kernel: Closed disk ada3 -> 6
Sep 23 16:28:27 netfs kernel: ahcich3: AHCI reset: device not ready after 31000ms (tfd = 00000080)
Sep 23 16:28:27 netfs kernel: ahcich3: Poll timeout on slot 10 port 0
Sep 23 16:28:27 netfs kernel: ahcich3: is 00000000 cs 00000400 ss 00000000 rs 00000400 tfd 80 serr 00000000 cmd 0000ca17
-





[ ys  ~ # ] zpool status
  pool: ZFS
 state: DEGRADED
status: One or more devices has been removed by the administrator.
    Sufficient replicas exist for the pool to continue functioning in a
    degraded state.
action: Online the device using 'zpool online' or replace the device with
    'zpool replace'.
  scan: resilvered 3.25T in 29h4m with 0 errors on Fri Sep 13 18:46:41 2013
config:

    NAME                     STATE     READ WRITE CKSUM
    ZFS                      DEGRADED     0     0     0
      raidz2-0               DEGRADED     0     0     0
        ada0                 ONLINE       0     0     0
        ada1                 ONLINE       0     0     0
        ada2                 ONLINE       0     0     0
        6411220363152792400  REMOVED      0     0     0  was /dev/ada3
        ada4                 ONLINE       0     0     0
        ada5                 ONLINE       0     0     0

errors: No known data errors
[ ys  ~ # ] zpool offline ZFS  /dev/ada3 ; zpool status
  pool: ZFS
 state: DEGRADED
status: One or more devices has been taken offline by the administrator.
    Sufficient replicas exist for the pool to continue functioning in a
    degraded state.
action: Online the device using 'zpool online' or replace the device with
    'zpool replace'.
  scan: resilvered 3.25T in 29h4m with 0 errors on Fri Sep 13 18:46:41 2013
config:

    NAME                     STATE     READ WRITE CKSUM
    ZFS                      DEGRADED     0     0     0
      raidz2-0               DEGRADED     0     0     0
        ada0                 ONLINE       0     0     0
        ada1                 ONLINE       0     0     0
        ada2                 ONLINE       0     0     0
        6411220363152792400  OFFLINE      0     0     0  was /dev/ada3
        ada4                 ONLINE       0     0     0
        ada5                 ONLINE       0     0     0

errors: No known data errors
[ ys  ~ # ] zpool replace ZFS  /dev/ada3 ; zpool status
  pool: ZFS
 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 Mon Sep 30 09:09:02 2013
        4.72M scanned out of 9.78T at 967K/s, (scan is slow, no estimated time)
        654K resilvered, 0.00% done
config:

    NAME                       STATE     READ WRITE CKSUM
    ZFS                        DEGRADED     0     0     0
      raidz2-0                 DEGRADED     0     0     0
        ada0                   ONLINE       0     0     0
        ada1                   ONLINE       0     0     0
        ada2                   ONLINE       0     0     0
        replacing-3            OFFLINE      0     0     0
          6411220363152792400  OFFLINE      0     0     0  was /dev/ada3/old
          ada3                 ONLINE       0     0     0  (resilvering)
        ada4                   ONLINE       0     0     0
        ada5                   ONLINE       0     0     0

errors: No known data errors
[ ys  ~ # ] zpool online  ZFS  /dev/ada3 ; zpool status
  pool: ZFS
 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 Mon Sep 30 09:10:00 2013
        15.1M scanned out of 9.78T at 1.25M/s, (scan is slow, no estimated time)
        2.30M resilvered, 0.00% done
config:

    NAME                       STATE     READ WRITE CKSUM
    ZFS                        DEGRADED     0     0     0
      raidz2-0                 DEGRADED     0     0     0
        ada0                   ONLINE       0     0     0
        ada1                   ONLINE       0     0     0
        ada2                   ONLINE       0     0     0
        replacing-3            DEGRADED     0     0     0
          6411220363152792400  OFFLINE      0     0     0  was /dev/ada3/old
          ada3                 ONLINE       0     0     0  (resilvering)
        ada4                   ONLINE       0     0     0
        ada5                   ONLINE       0     0     0

errors: No known data errors
[ ys  ~ # ]  date
2013년  9월 30일 월요일 09시 12분 15초 KST


[ ys  ~ # ] zpool status;date
  pool: ZFS
 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 Mon Sep 30 09:10:00 2013
        5.26T scanned out of 9.78T at 394M/s, 3h20m to go
        898G resilvered, 53.84% done
config:

    NAME                       STATE     READ WRITE CKSUM
    ZFS                        DEGRADED     0     0     0
      raidz2-0                 DEGRADED     0     0     0
        ada0                   ONLINE       0     0     0
        ada1                   ONLINE       0     0     0
        ada2                   ONLINE       0     0     0
        replacing-3            DEGRADED     0     0     0
          6411220363152792400  OFFLINE      0     0     0  was /dev/ada3/old
          ada3                 ONLINE       0     0     0  (resilvering)
        ada4                   ONLINE       0     0     0
        ada5                   ONLINE       0     0     0

errors: No known data errors
2013년  9월 30일 월요일 13시 03분 18초 KST

[netfs /var/mail # ] zpool status ; date
  pool: ZFS
 state: ONLINE
  scan: resilvered 1.63T in 12h48m with 0 errors on Mon Sep 30 21:58:44 2013
config:

    NAME        STATE     READ WRITE CKSUM
    ZFS         ONLINE       0     0     0
      raidz2-0  ONLINE       0     0     0
        ada0    ONLINE       0     0     0
        ada1    ONLINE       0     0     0
        ada2    ONLINE       0     0     0
        ada3    ONLINE       0     0     0
        ada4    ONLINE       0     0     0
        ada5    ONLINE       0     0     0

errors: No known data errors
2013년  9월 30일 월요일 23시 05분 58초 KST


[ ys  ~ # ]  find /dev -name ada* -exec smartctl -i {} \; | egrep -i "serial|Model"
Device Model:     ST2000DM001-9YN164
Serial Number:    Z1E$$9HS
Device Model:     ST2000DM001-9YN164
Serial Number:    W24$$AZM
Device Model:     ST2000DM001-9YN164
Serial Number:    W1E$$K2H
Model Family:     Hitachi Deskstar 7K3000
Device Model:     Hitachi HDS723020BLA642
Serial Number:    MN1220F33$$USD
Device Model:     ST2000DM001-1CH164
Serial Number:    W1E$$DZF
Model Family:     Hitachi Deskstar 7K3000
Device Model:     Hitachi HDS723020BLA642
Serial Number:    MN1220F33$$BGD

Device Model:     ST2000DM001-9YN164
Device Model:     ST2000DM001-9YN164
Device Model:     ST2000DM001-9YN164
Device Model:     Hitachi HDS723020BLA642
Device Model:     ST2000DM001-1CH164
Device Model:     Hitachi HDS723020BLA642

Serial Number:    Z1E059HS
Serial Number:    W2409AZM
Serial Number:    W1E07K2H
Serial Number:    MN1220F33TPUSD
Serial Number:    W1E45DZF
Serial Number:    MN1220F33L2BGD


반응형

'FreeBSD' 카테고리의 다른 글

freebsd 서버(파티션)이전  (0) 2014.11.07
V2P/P2V 시 파티션 크기조절  (0) 2014.09.12
FreeBSD 10.0, MariaDB 10.0 컴파일  (0) 2014.08.05
FreeBSD 시스템정보 확인  (0) 2014.02.11
ZFS Tuning Guide  (0) 2013.08.30

댓글