From owner-freebsd-stable@FreeBSD.ORG Thu Jul 25 20:23:49 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A4F77490 for ; Thu, 25 Jul 2013 20:23:49 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 179872DED for ; Thu, 25 Jul 2013 20:23:48 +0000 (UTC) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.14.7/8.14.7) with ESMTP id r6PKNiDL047295 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 25 Jul 2013 22:23:44 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.14.7/8.14.7/Submit) with ESMTP id r6PKNiQh047292; Thu, 25 Jul 2013 22:23:44 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Thu, 25 Jul 2013 22:23:44 +0200 (CEST) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: =?UTF-8?Q?=C5=81ukasz_W=C4=85sikowski?= Subject: Re: ZFS: can't read MOS of pool In-Reply-To: <51F17233.4080903@wasikowski.net> Message-ID: References: <51ED5B69.8050200@wasikowski.net> <51F17233.4080903@wasikowski.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="2055831798-1228286545-1374783824=:35028" X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.fig.ol.no Cc: FreeBSD stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jul 2013 20:23:49 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --2055831798-1228286545-1374783824=:35028 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT On Thu, 25 Jul 2013 20:45+0200, ?ukasz W?sikowski wrote: > W dniu 2013-07-25 18:40, Trond Endrestøl pisze: > > >> Any hints how to go from here? > > > > I'm only subscribed to freebsd-stable@, but as far as I can tell, no > > one from freebsd-fs@ nor freebsd-stable@ has yet replied. I'm only > > replying to freebsd-stable@. > > > > First, just some quick questions: > > > > Have you by chance upgraded the pool format without upgrading the boot > > blocks? Or was the pool already at 5000? > > > > You didn't mention if you have made any attempt at updating the boot > > blocks after playing with ezjail-admin. > > > > Perhaps you should consider updating the boot blocks once more: > > > > 1. Boot from the live CD. > > > > 2. Import the pool read-only without mounting any fs: > > > > zpool import -f -N -o readonly=on klawisz > > > > 3. Mount the root fs read-only: > > > > mount -r -t zfs klawisz/ROOTFS /tmp/zroot > > > > 4. Update the boot blocks from the files stored in the root fs: > > > > gpart bootcode -b /tmp/zroot/boot/pmbr -p /tmp/zroot/boot/gptzfsboot -i 1 ada0 > > > > 5. Unmount the root fs: > > > > umount /tmp/zroot > > > > 6. Reboot the system, do NOT export the pool. > > > > Hopefully, the updated gptzfsboot stored in ada0p1 will be able to > > read the MOS. > > > > That's all I can think of at the moment. > > > > Best of luck. > > Thank you for your reply. The pool was created with version 5000. I have > updated the boot blocks before (but with exporting pool after). I don't > think that ezjail-admin has anything to do with booting. Never ever leave a pool you intend to boot from in the exported state. Period. ;-) At least that was a big no-no when I started using ZFS a couple of years ago. Maybe this has changed since FreeBSD no longer relies on the zpool.cache file. > I did as you suggested and it didn't help, still MOS can't be read. I'm > pretty sure I can reproduce this problem. I will try to do detailed > guide and post it here. Reading through your post once more, http://pastie.org/private/mtfhkx0wx0vve29xn0plw , I noticed the following: 1. The bootfs property is set to klawisz/ROOTFS for the klawisz pool. 2. The mountpoint property is set to / for the klawisz filesystem. 3. The mountpoint property is set to legacy for the klawisz/ROOTFS filesystem. Maybe item 2 is the cause of all this confusion. I see nothing wrong with items 1 and 3. Perhaps you should reset the mountpoint property for klawisz, using: zfs set mountpoint=legacy klawisz At the same time you may let klawisz/ROOTFS inherit the mountpoint property from klawisz by running: zfs inherit mountpoint klawisz/ROOTFS You should also check the mountpoint properties of all the other filesystems you intend to mount automatically. -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+ --2055831798-1228286545-1374783824=:35028--