# 8.2 -> 8.3 upgrade + gmirror = kernel panic



## romeor (May 15, 2012)

Hello,

Just got to my workplace (it*'*s midnight in Europe) because of a remote upgrade failed: after I upgraded my 8.2 to 8.3, my server didn't come back after reboot. So I'm here, messing around and I now see a situation, where my router falls in continuous reboots as soon as I use gmirror (the line in loader.conf). I can't even take a picture of the kernel panic message, but I can see it for 1-2 seconds. If I remove it (comment) and set booting directly from disk drive in fstab, system boots up normally.

What can I do? Any help is welcomed, as this is production router


----------



## romeor (May 15, 2012)

Oh, a bit other situation: as soon as I add any drive to the mirror and reboot, it reboots right when it should load kernel from mirror. So commands that make it happen:
[CMD=]#sysctl kern.geom.debugflags=17[/CMD]
[CMD=]#gmirror label -vb round-robin gm0 /dev/ad4[/CMD]
[CMD=]#gmirror load[/CMD]

And after I add the 
[CMD=]#echo 'geom_mirror_load="YES"' >> /boot/loader.conf[/CMD]
change the fstab and reboot, it does not ever come up. Just keeps rebooting with kernel panic.

And this should add some light:

```
[root@gw ~]# gmirror label -vb round-robin gm3 /dev/ad4
Metadata value stored on /dev/ad4.
Done.
[root@gw ~]# ls -l /dev/mirror/
total 0
```
Nothing happens.

Ideas?


----------



## romeor (May 15, 2012)

Okay, solved.
For those, who will have similar situation, some hints can be found from this post:
1. Boot with FreeBSD USB, mount any of providers:

```
mount /dev/ad4s1b /mnt
```
Next edit the /mnt/etc/fstab file to boot from this provider, save and reboot.
After system is up, check the mirror:

```
gmirror status
```
and

```
gmirror remove gm0 ad4
gmirror stop gm0 - just to be sure.
```
then reboot and boot again from FreeBSD USB, mount another provider,  edit the fstab file again to boot from this provider, save, reboot.
After system is up and running, repeat steps for removing the gmirror drive.
From this moment its up to you to decide, which will be the primary provider. You cant reboot with memstick, mount the first one and edit fstab to reboot with this single drive, or you can continue from this moment ahead - update ports and create new mirror. I used new drive name also (gm3) just to be sure it won't mess something again. Don't forget to edit /etc/fstab again to set it to boot from /dev/*mirror*/gmX
I don't really know, why it happened, but it seems to me, it was like i had two different instances of gm0 on each drive after update. Kind of bug or something else. It is solved.


----------

