
/dev/sde /dev/sdf 풀에 2개의 디스크가 있습니다.
/dev/sde 디스크가 손상되어 풀에서 제외하고 새 디스크로 교체했습니다. 습격이 저하되었습니다.
풀에 새 /dev/sde 디스크를 추가한 후 다음 구성을 얻었습니다.
zpool status
pool: rpool
state: DEGRADED
status: One or more devices could not be used because the label is missing or
invalid. Sufficient replicas exist for the pool to continue
functioning in a degraded state.
action: Replace the device using 'zpool replace'.
see: http://zfsonlinux.org/msg/ZFS-8000-4J
scan: scrub repaired 0B in 0h25m with 0 errors on Wed Sep 2 18:32:39 2020
config:
NAME STATE READ WRITE CKSUM
rpool DEGRADED 0 0 0
mirror-0 DEGRADED 0 0 0
old UNAVAIL 0 0 0
sdf2 ONLINE 0 0 0
sde2 ONLINE 0 0 0
교체, 오프라인, "이전" 삭제 시 항상 오류가 발생합니다.
zpool replace rpool old
cannot open 'old': no such device in /dev
must be a full path or shorthand device name
/etc/zfs/zpool.cache 파일에 /dev/sde2/old 드라이브가 있습니다.
서버를 다시 시작하고 어레이(어레이는 /)를 삭제하지 않고 기존 디스크를 어떻게 제거합니까?
root@v05:/# zpool replace rpool old sde2
invalid vdev specification
use '-f' to override the following errors:
/dev/sde2 is part of active pool 'rpool'
root@v05:/# zpool replace -f rpool old sde2
invalid vdev specification
the following errors must be manually repaired:
/dev/sde2 is part of active pool 'rpool'
sde는 이미 rpool 구성원입니다.
풀에서 오래된(/dev/sde/old) 디스크를 제거해야 합니다.
새 디스크를 추가할 때 오류가 발생하지 않았으며 모든 작업을 작성한 대로 정확하게 수행했습니다.
답변1
문제 해결됨.
zdb
/dev/sde/old 장치에 대한 ID 15497986214547762579를 찾아 제거합니다.
zpool 오프라인 -f rpool 15497986214547762579
zpool rpool 분리 15497986214547762579
답변2
새 디스크를 추가할 때 오류가 발생했을 수 있습니다. 발행했지만 zpool add rpool <newdisk>
을(를) 수행해야 했습니다.바꾸다실패한 디스크. 즉, 다음 중 하나를 수행해야 했습니다.
zpool replace rpool <olddisk> <newdisk>
zpool detach rpool <olddisk>; zpool attach rpool sdf
(sdf
다른 거울 다리임).
내가 어떻게 썼는지 주목하세요 attach
. 아마도 add
zpool 명령에서 사용했을 것입니다.
문제를 어떻게 해결할 수 있나요? ZFS 0.7.x에서는 데이터 vdev를 추가한 후 제거할 수 없으므로 운이 좋지 않습니다. 와 함께ZFS 0.8.x 제거 가능따라서 ZFS 0.7.x를 실행 중인 경우 첫 번째 단계로 0.8.x로 업데이트해야 합니다. 그런 다음 위 명령을 실행하여 실패한 디스크를 교체해야 합니다.
답변3
오라클 문서에 따라 디스크 교체를 진행했습니다. 이제 다음 명령이 출력됩니다.
root@v05:/# zpool은 rpool 이전 sde2 잘못된 vdev 사양을 대체합니다. '-f'를 사용하여 다음 오류를 재정의합니다. /dev/sde2는 활성 풀 'rpool'의 일부입니다.
root@v05:/# zpool 대체 -f rpool old sde2 잘못된 vdev 사양 다음 오류는 수동으로 복구해야 합니다. /dev/sde2는 활성 풀 'rpool'의 일부입니다.