修復zpool data errors錯誤

  • 2020 年 2 月 11 日
  • 筆記

故障資訊:

root@host1:/tank/new/ddd# zpool status -v tank

 pool: tank

state: ONLINE

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://illumos.org/msg/ZFS-8000-8A

 scan: scrub repaired 0 in 0h0m with 1161 errors on Thu Apr 17 10:02:52 2014

config:

       NAME                       STATE     READ WRITE CKSUM

       tank                       ONLINE       0     0 6.83K

         mirror-0                 ONLINE       0     0 13.7K

           c3t5000C5000B74F2DBd0  ONLINE       0     0 13.7K

           c3t5000C50043FFA61Fd0  ONLINE       0     0 13.7K

errors: Permanent errors have been detected in the following files:

       /tank/new/ddd/Oracle Solaris 11 11_11 .cn. E26926_01.zip

root@host1:/tank/new/ddd# zpool status  tank

 pool: tank

state: ONLINE

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://illumos.org/msg/ZFS-8000-8A

 scan: scrub repaired 0 in 0h0m with 1161 errors on Thu Apr 17 10:02:52 2014

config:

       NAME                       STATE     READ WRITE CKSUM

       tank                       ONLINE       0     0 6.83K

         mirror-0                 ONLINE       0     0 13.7K

           c3t5000C5000B74F2DBd0  ONLINE       0     0 13.7K

           c3t5000C50043FFA61Fd0  ONLINE       0     0 13.7K

errors: 1161 data errors, use '-v' for a list

修復方法:

root@host1:/tank/new/ddd# rm /tank/new/ddd/Oracle Solaris 11 11_11 .cn. E26926_01.zip

root@host1:/tank/new/ddd# zpool status -v tank

 pool: tank

state: ONLINE

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://illumos.org/msg/ZFS-8000-8A

 scan: scrub repaired 0 in 0h0m with 1161 errors on Thu Apr 17 10:02:52 2014

config:

       NAME                       STATE     READ WRITE CKSUM

       tank                       ONLINE       0     0 6.83K

         mirror-0                 ONLINE       0     0 13.7K

           c3t5000C5000B74F2DBd0  ONLINE       0     0 13.7K

           c3t5000C50043FFA61Fd0  ONLINE       0     0 13.7K

errors: Permanent errors have been detected in the following files:

       tank/new:<0x51b9>

檢測:

root@host1:/tank/new/ddd# zpool status  tank

 pool: tank

state: ONLINE

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://illumos.org/msg/ZFS-8000-8A

 scan: scrub repaired 0 in 0h0m with 1161 errors on Thu Apr 17 10:02:52 2014

config:

       NAME                       STATE     READ WRITE CKSUM

       tank                       ONLINE       0     0 6.83K

         mirror-0                 ONLINE       0     0 13.7K

           c3t5000C5000B74F2DBd0  ONLINE       0     0 13.7K

           c3t5000C50043FFA61Fd0  ONLINE       0     0 13.7K

errors: 1161 data errors, use '-v' for a list

結果:

 pool: tank

state: ONLINE

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://illumos.org/msg/ZFS-8000-8A

 scan: scrub in progress since Thu Apr 17 10:05:46 2014

   2.20G scanned out of 2.44G at 70.5M/s, 0h0m to go

   0 repaired, 90.38% done

config:

       NAME                       STATE     READ WRITE CKSUM

       tank                       ONLINE       0     0 6.83K

         mirror-0                 ONLINE       0     0 13.7K

           c3t5000C5000B74F2DBd0  ONLINE       0     0 13.7K

           c3t5000C50043FFA61Fd0  ONLINE       0     0 13.7K

errors: 1161 data errors, use '-v' for a list

 pool: tank

state: ONLINE

status: One or more devices has experienced an unrecoverable error.  An

       attempt was made to correct the error.  Applications are unaffected.

action: Determine if the device needs to be replaced, and clear the errors

       using 'zpool clear' or replace the device with 'zpool replace'.

  see: http://illumos.org/msg/ZFS-8000-9P

 scan: scrub repaired 0 in 0h0m with 0 errors on Thu Apr 17 10:06:22 2014

config:

       NAME                       STATE     READ WRITE CKSUM

       tank                       ONLINE       0     0 6.83K

         mirror-0                 ONLINE       0     0 13.7K

           c3t5000C5000B74F2DBd0  ONLINE       0     0 13.7K

           c3t5000C50043FFA61Fd0  ONLINE       0     0 13.7K

errors: No known data errors

總結:

   一個文件可以對應很多個數據塊錯誤,當發現數據有錯誤時,通過鏡像可以自動修復錯誤,如果沒有其他備份機制,數據塊的損壞將是永久的,數據無法恢復,只能通過清除損壞的文件來清理數據塊錯誤。