Mounting from zfs:zroot failed with error 6.
krad
kraduk at gmail.com
Wed Jan 11 18:51:01 UTC 2012
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" <knarf at knarf.de> 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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"
>
More information about the freebsd-fs
mailing list