Michiel Boland
2005-Jul-11  12:17 UTC
5.4-RELEASE-p4: shutdown hangs after rebuiding gmirror
Hi. I am running FreeBSD 5.4-RELEASE-p4 on a sun V20Z. It has two seagate 
ST373307LC disks. The disks are mirrored with gmirror:
         Name    Status  Components
mirror/raid1  COMPLETE  da0
                         da1
I unplugged one of the disks, then rebooted to see if it would boot from 
just the one disk. Of course there was no problem there.
I then inserted the other disk back in, followed by
  camcontrol rescan all
  gmirror forget raid1
  gmirror insert raid1 da1
After a while the mirror was OK again. I then rebooted for a second time. 
But the machine would not come up. The last lines printed on the console 
were
Syncing disks, vnodes remaining...1 1 0 1 1 0 0 0 done
No buffers busy after final sync
Uptime: 55m39s
GEOM_MIRROR: Device raid1: provider mirror/raid1 destroyed.
GEOM_MIRROR: Device raid1 destroyed.
So it was stuck somewhere in the shutdown sequence between the gmirror 
destruction and the "Shutting down ACPI" bit. Sending a break to the 
console did not produce a DDB prompt, whereas during normal operation it 
would.
I had to power-cycle to get the boot to work again.
If I leave the disks alone, rebooting does not hang the machine.
This is a bit of a nuisance. Who has any idea where to look to 
troubleshoot this?
Cheers
Michiel
Michiel Boland
2005-Jul-19  07:17 UTC
5.4-RELEASE-p4: shutdown hangs after rebuiding gmirror
[recap: machine hangs on shutdown - see original message for more details]> Syncing disks, vnodes remaining...1 1 0 1 1 0 0 0 done > No buffers busy after final sync > Uptime: 55m39s > GEOM_MIRROR: Device raid1: provider mirror/raid1 destroyed. > GEOM_MIRROR: Device raid1 destroyed.FWIW the hangs occur regardless of whether I rebuild a mirror. The problem is that the box sometimes hangs and sometimes not. Of course this makes the whole gmirror totally useless (as opposed to a bit of a nuisance) It appears that the hang occurs somewhere between destruction of raid1 and 'raid1.sync'. (whatever that is) Does anyone have any clue as to what is going on or how I can debug this further? Please don't make me put solaris on this box. :) Cheers Michiel