
我在更換 x86 處理器上執行 Solaris 10 的系統上現有 zpool 上的磁碟時遇到問題。 zpool 最初是用兩個鏡像切片建立的。其中一個驅動器出現故障,因此我將其物理更換為新驅動器。我運行 prvtoc 和 fmthard 將磁碟標籤從工作磁碟機複製到新磁碟機:
prtvtoc /dev/rdsk/c1t0d0s2 >/tmp/c1t0d0s2.out
fmthard -s /tmp/c1t0d0s2.out >/dev/rdsk/c1t1d0s2
然後我嘗試將新驅動器聯機,並收到有關設備仍然故障的警告:
$ zpool online pool c1t1d0s6
warning: device 'c1t1d0s6' onlined, but remains in faulted state
zpool status -v 的輸出是:
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 是替換的驅動器。)
然後我再次使 c1t1d0 離線並嘗試執行 zpool Replace 命令,但這也不起作用:
$ zpool replace pool c1t1d0s6
invalid vdev specification
use '-f' to override the following errors:
/dev/dsk/c1t1d0s6 overlaps with /dev/dsk/c1t1d0s2
有人知道發生了什麼事嗎?使用“-f”標誌安全嗎?
編輯:運行 zpool Replace -f 後,我得到:
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
我在 iostat -e 輸出中看到新驅動器上的錯誤。我猜新驅動器也可能很糟糕?
編輯2: 不知道怎麼回事。我用相同的過程嘗試了不同的驅動器。執行 zpool Replace -f 後,zfs 池運行清理,但狀態輸出為:
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
下線 c1t1d0s6 後,zpool status 輸出為:
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
我不明白。系統不應該能夠使用 c1t0d0s6 上的鏡像來取代 c1t1d0s6 嗎?
答案1
您清除了警報嗎fmadm
?而且zpool clear
...使用開關運行 zpool Replace 是安全的-f
,但我認為你的陳述是錯誤的,除非你已經刪除了壞磁碟。
http://docs.oracle.com/cd/E19253-01/819-5461/gbcet/index.html
答案2
檢查電纜或驅動器底座和插槽。吵雜的 SATA 連線會產生錯誤,fmadm 使用該資訊來確定裝置何時發生故障。我曾經有過一些我認為是壞的驅動器,但只是 ZFS 注意到它無法可靠地獲取有效數據。我注意到 SATA 電纜被擠壓,將其更換並運行zpool clear
,zpool scrub
沒有更多錯誤。