Bizarre SVM Issue


I had a disk drive fail in one of my machines this week, and used the typical drive replacement procedure (cfgadm / metadevadm / devfsadm) to replace the physical disk. Once the drive was replaced, I attempted to run metareplace to re-synchronize the two sub-mirrors:

$ metareplace -e d0 c0t1d0s0
d0: device c0t1d0s0 is enabled

$ metastat d0

d0: Mirror
Submirror 0: d10
State: Okay
Submirror 1: d20
State: Unavailable
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 8391880 blocks (4.0 GB)

d10: Submirror of d0
State: Okay
Size: 8391880 blocks (4.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s0 0 No Okay Yes


d20: Submirror of d0
State: Unavailable
Size: 8391880 blocks (4.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t1d0s0 0 No - Yes

Eh? For some reason d20 refused to re-synchronize and enter the Okay state, and repeated attempts to use metareplace led to the same behavior. This seemed odd, so I decided to detach d20 and re-attach it with metadetach and metattach:

$ metadetach d0 d20
d0: submirror d20 is detached

$ metattach d0 d20
d0: submirror d20 is attached

These operations completed successfully, and once the re-synchronization completed, the sub-mirror entered the “Okay” state:

$ metastat d0

d0: Mirror
Submirror 0: d10
State: Okay
Submirror 1: d20
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 8391880 blocks (4.0 GB)

d10: Submirror of d0
State: Okay
Size: 8391880 blocks (4.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s0 0 No Okay Yes


d20: Submirror of d0
State: Okay
Size: 8391880 blocks (4.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t1d0s0 0 No Okay Yes

I am starting to speculate that this is a bug in metareplace, but wasn’t able to pinpoint anything specific on sunsolve. The moral of the story is use metattach/metadetach if you don’t want to waste lots of time. :)

This article was posted by Matty on 2005-12-21 20:46:00 -0400 -0400