From owner-freebsd-fs@FreeBSD.ORG Wed Jan 11 18:51:01 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A58910656D0 for ; Wed, 11 Jan 2012 18:51:01 +0000 (UTC) (envelope-from kraduk@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 477A48FC20 for ; Wed, 11 Jan 2012 18:51:01 +0000 (UTC) Received: by ghrr16 with SMTP id r16so555988ghr.13 for ; Wed, 11 Jan 2012 10:51:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=dcJt3C+DNhnktmEZA0GGXHFf0vGY11VUFc5hB1MKPpc=; b=E9KzMmak0pdclnuFfOcGzpERkwpE/8hpn0gEbNnQauzfcPMalG9brP5dXerbu9Y6NE BK/BpbQqDsVjENsvoQHoQ8yrz8V7O7tbGYayIcKmox9FREc1FZFBHktCfZiOeTMooRNz KF/cr7WQDUhhtgXVZP9n29zmGe317H3AmXvkE= MIME-Version: 1.0 Received: by 10.236.91.84 with SMTP id g60mr50231yhf.90.1326307860645; Wed, 11 Jan 2012 10:51:00 -0800 (PST) Received: by 10.236.139.193 with HTTP; Wed, 11 Jan 2012 10:51:00 -0800 (PST) Received: by 10.236.139.193 with HTTP; Wed, 11 Jan 2012 10:51:00 -0800 (PST) In-Reply-To: <20120110181827.GA7601@server-king.de> References: <20120110181827.GA7601@server-king.de> Date: Wed, 11 Jan 2012 18:51:00 +0000 Message-ID: From: krad To: Frank Bartels Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-fs@freebsd.org Subject: Re: Mounting from zfs:zroot failed with error 6. X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2012 18:51:01 -0000 Grab the binary versions of the bootblocks from people.FreeBSD.org/~pjd/zfsboot they generally work for me On Jan 10, 2012 6:18 PM, "Frank Bartels" wrote: > Hi, > > I use FreeBSD 9.0-RELEASE. I boot from USB stick (16 GB) using > gptzfsboot. Everything works fine. > > In the past weeks I've read a lot about the 4 KB alignment and > ashift=12. But at the time I've created the stick the first time I > had no idea about all these problems. > > I still have no clue what the physical sector size of my USB stick > is (more than 4 KB for sure, maybe 128 KB or 256 KB?) and why gnop > does not allow more than 8 KB, but that's another story. > > This is my old stick, created the wrong way: > > bkool:/root# gpart show da1 > => 34 30883773 da1 GPT (14G) > 34 128 1 freebsd-boot (64k) > 162 8019968 2 freebsd-swap (3.8G) > 8020130 22863677 3 freebsd-zfs (10G) > > And this is the new one, created the right way: > > bkool:/root# gpart show da0 > => 34 30871485 da0 GPT (14G) > 34 6 - free - (3.0k) > 40 128 1 freebsd-boot (64k) > 168 1880 - free - (940k) > 2048 8388608 2 freebsd-swap (4.0G) > 8390656 22480863 3 freebsd-zfs (10G) > > So my plan is to create a new zpool with altroot= and cachefile=, > rsync the old stick to the new one, copy over the cachefile, double > check loader.conf vfs.root.mountfrom= and zfs bootfs=. This worked > several times before in other environments. But here it does not. > > If I try to boot, the new stick runs gptzfsboot, loads the kernel > and fails with "Mounting from zfs:bkool9 failed with error 6.". > > In the past (maybe it was with 8.2-RELEASE) I had the same problem. > The solution was to type "zfs:zroot" (*same* value from loader.conf) > at the prompt and it worked. But this time this "trick" does not > help. > > I've seen this error message several times now. I tried to create > the new zpool with ashift=12 (gnop -S 4K) and ashift=9. I double > checked gpart bootcode. kernel is GENERIC with DDB enabled, no other > changes. But it won't mount root. > > The interesting part is, if I boot from the old stick and inspect > the new one, I see this: > > bkool:/root# zpool import > pool: bkool9 > id: 2362879880167335458 > state: FAULTED > status: One or more devices contains corrupted data. > action: The pool cannot be imported due to damaged devices or data. > The pool may be active on another system, but can be imported using > the '-f' flag. > see: http://www.sun.com/msg/ZFS-8000-5E > config: > > bkool9 FAULTED corrupted data > 5856161150314576551 UNAVAIL corrupted data > > But, if I tell zpool to look for devices in /dev, I get this: > > bkool:/root# zpool import -d /dev > pool: bkool9 > id: 2362879880167335458 > state: ONLINE > action: The pool can be imported using its name or numeric identifier. > config: > > bkool9 ONLINE > gpt/bkool9-disk0 ONLINE > > What's going on here? > > Why is the kernel not able to find the zpool during boot (after > loading the loader and kernel from it!) even if "/dev/gpt/bkool9-disk0" > is part of zpool.cache? > > And why is looking for devices in /dev or /dev/gpt not default if > I use zpool import? The manual page says "/dev/dsk" is default, but > does this not only make sense under Solaris? > > And what does "5856161150314576551" mean? Where does the information > about the pool bkool9 come from if the only vdev is UNAVAIL and > there are no hints in /boot/zfs/zpool.cache? > > Thanks, > Frank > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" >