From owner-freebsd-virtualization@freebsd.org Mon Apr 25 19:14:39 2016 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B260B1C498 for ; Mon, 25 Apr 2016 19:14:39 +0000 (UTC) (envelope-from saper@saper.info) Received: from m.saper.info (m.saper.info [IPv6:2a01:4f8:a0:7383::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "m.saper.info", Issuer "Marcin Cieslak 2016" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 037761C6C for ; Mon, 25 Apr 2016 19:14:38 +0000 (UTC) (envelope-from saper@saper.info) Received: from m.saper.info (saper@m.saper.info [IPv6:2a01:4f8:a0:7383::]) by m.saper.info (8.15.2/8.15.2) with ESMTPS id u3PJERhB075874 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 25 Apr 2016 19:14:27 GMT (envelope-from saper@saper.info) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=saper.info; s=Sep2014; t=1461611667; bh=CdG8w9+CGEczMYhmpWL9i0tVuJZp+ECu3DvXRjiBgwI=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=TpoLSqgcdFTgmgRiWX5YLiAi9MWFH1ZgvVwAE2Jw5TuiKsDeD/a6VL8SzzIdPtQ2/ 1I5615hbqPvUWlj+Qbxcy+8lZYnl5RRtbWiJvRRg+mcfmfL+YWvw/0duMfX5p8yD97 2yzqAamO/NBIp5OB3fvH/Nft2pyrOauYPISx9abg= Received: from localhost (saper@localhost) by m.saper.info (8.15.2/8.15.2/Submit) with ESMTP id u3PJEP2s075871; Mon, 25 Apr 2016 19:14:25 GMT (envelope-from saper@saper.info) X-Authentication-Warning: m.saper.info: saper owned process doing -bs Date: Mon, 25 Apr 2016 19:14:25 +0000 From: Marcin Cieslak To: =?ISO-8859-15?Q?Roger_Pau_Monn=E9?= cc: freebsd-virtualization@freebsd.org Subject: Re: Booting r298488 as Xen Dom0 may break ZFS pool? In-Reply-To: <20160425084714.64ejioyqgquwu4gw@mac> Message-ID: References: <20160425084714.64ejioyqgquwu4gw@mac> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-15 Content-Transfer-Encoding: 8BIT X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2016 19:14:39 -0000 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