Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Apr 2016 19:14:25 +0000
From:      Marcin Cieslak <saper@saper.info>
To:        =?ISO-8859-15?Q?Roger_Pau_Monn=E9?= <roger.pau@citrix.com>
Cc:        freebsd-virtualization@freebsd.org
Subject:   Re: Booting r298488 as Xen Dom0 may break ZFS pool?
Message-ID:  <alpine.BSF.2.11.1604251906400.1768@z.fncre.vasb>
In-Reply-To: <20160425084714.64ejioyqgquwu4gw@mac>
References:  <alpine.BSF.2.11.1604232216330.1768@z.fncre.vasb> <20160425084714.64ejioyqgquwu4gw@mac>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 25 Apr 2016, Roger Pau Monné wrote:

> > I have managed to make zpool boot again by doing voodoo
> > similar to this one:
> > 
> > [root@rescue ~]# zpool import -R /mnt zroot
> > [root@rescue ~]# mount -t devfs devfs /mnt/dev
> > [root@rescue ~]# chroot /mnt /bin/tcsh
> > 
> > (... Running make install in /usr/src/sys/boot ...)
> > 
> > root@rescue:/ # gpart bootcode -p /boot/gptzfsboot -i 1 ada0
> > partcode written to ada0p1
> > root@rescue:/ # gpart bootcode -p /boot/gptzfsboot -i 1 ada1
> > partcode written to ada1p1
> > root@rescue:/ # exit
> > [root@rescue ~]# umount /mnt/dev
> > [root@rescue ~]# zpool export zroot
> > [root@rescue ~]# reboot
> > 
> > Why zpool metadata get corrupted?
> 
> TBH, I have no idea. Can you also paste the log of the system (Xen + 
> FreeBSD) when it fails to boot? If that's not possible, can you at least 
> paste the output of `xl dmesg` when booted correctly under Xen?

I am using a VGA-emulating console attached by my friendly hosting
provider (Hetzner) and it does not give me the terminal-like output,
only VGA. From the quickly scrolling Xen kernel messages
I am getting to the stage where it is "scrubbing" and hands over
to the kernel.

> What operations did you perform when the system booted correctly using 
> FreeBSD/Xen?

Nothing in particular. It seems it succeeds every other time.

> Does the disk get corrupted even if the system fails to boot? AFAICT, it 
> seems like it's only the bootcode that gets corrupted, is that right?

I am not sure what really gets corrupted - once I noticed that
just rewriting bootcode (without "make install") didn't help (at least once).

Maybe this is some leftover from the 10.3 -> 11 upgrade? It's hard
to install 11 clean on the rented server.... But no idea how would *that*
affect booting.

I also have two drives on the controller, maybe something is not in sync there?

Marcin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.11.1604251906400.1768>