From owner-freebsd-fs@FreeBSD.ORG Mon Sep 16 13:10:06 2013 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B4B871F5; Mon, 16 Sep 2013 13:10:06 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from services.syscare.sk (services.syscare.sk [188.40.39.36]) by mx1.freebsd.org (Postfix) with ESMTP id 0DBAD2C19; Mon, 16 Sep 2013 13:10:05 +0000 (UTC) Received: from services.syscare.sk (services [188.40.39.36]) by services.syscare.sk (Postfix) with ESMTP id 2B97A51FB; Mon, 16 Sep 2013 15:10:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at rulez.sk Received: from services.syscare.sk ([188.40.39.36]) by services.syscare.sk (services.rulez.sk [188.40.39.36]) (amavisd-new, port 10024) with ESMTP id k0RJmfpPEk9s; Mon, 16 Sep 2013 15:09:58 +0200 (CEST) Received: from hosting.syscare.sk (hosting [188.40.39.37]) by services.syscare.sk (Postfix) with ESMTP id A04A251E8; Mon, 16 Sep 2013 15:09:58 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 16 Sep 2013 15:09:58 +0200 From: Daniel Gerzo To: Andriy Gapon Subject: Re: Mounting from zfs failed with error 22 with gmirror Organization: The FreeBSD Project In-Reply-To: <52361ED3.9070408@FreeBSD.org> References: <5234BE9E.1030308@FreeBSD.org> <52361ED3.9070408@FreeBSD.org> Message-ID: <721cb12d0577b20515e70d0b92eea558@rulez.sk> X-Sender: danger@FreeBSD.org User-Agent: Roundcube Webmail/0.7.2 Cc: fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 13:10:06 -0000 Hello Andriy, I have applied your patch but unfortunately I cannot get much out of it. Interestingly, when I built a custom, stripped down kernel, I could boot that box even with gmirror setup, however GENERIC fails with the mentioned error. The stripped-down config looks like this: cpu HAMMER ident ALICE makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options TCP_OFFLOAD # TCP offload options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options MD_ROOT # MD is a potential root device options NFSCL # New Network Filesystem Client options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options KTRACE # ktrace(1) support options STACK # stack(9) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev options KDTRACE_FRAME # Ensure frames are compiled in options INCLUDE_CONFIG_FILE # Include this file in kernel options KDB # Kernel debugger related code options KDB_TRACE # Print a stack trace for a panic options DDB_CTF # kernel ELF linker loads CTF data options SMP # Symmetric MultiProcessor Kernel device cpufreq device acpi device pci device fdc device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers options ATA_CAM # Handle legacy controllers with CAM options ATA_STATIC_ID # Static device numbering # output. Adds ~128k to driver. # output. Adds ~215k to driver. device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass # Passthrough device (direct ATA/SCSI access) device atkbdc # AT keyboard controller device atkbd # AT keyboard device kbdmux # keyboard multiplexer device vga # VGA video card driver options VESA # Add support for VESA BIOS Extensions (VBE) device splash # Splash screen and screen saver support device sc options SC_PIXEL_MODE # add support for the raster text mode device agp # support several AGP chipsets device uart # Generic UART driver device bxe # Broadcom BCM57710/BCM57711/BCM57711E 10Gb Ethernet device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel PRO/1000 Gigabit Ethernet Family device igb # Intel PRO/1000 PCIE Server Gigabit Family device ixgbe # Intel PRO/10GbE PCIE Ethernet Family device le # AMD Am7900 LANCE and Am79C9xx PCnet device ti # Alteon Networks Tigon I/II gigabit Ethernet device txp # 3Com 3cR990 (``Typhoon'') device vx # 3Com 3c590, 3c595 (``Vortex'') device miibus # MII bus support device re # RealTek 8139C+/8169/8169S/8110S device loop # Network loopback device random # Entropy device options PADLOCK_RNG # VIA Padlock RNG options RDRAND_RNG # Intel Bull Mountain RNG device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. device pty # BSD-style compatibility pseudo ttys device md # Memory "disks" device gif # IPv6 and IPv4 tunneling device faith # IPv6-to-IPv4 relaying (translation) device firmware # firmware assist module device bpf # Berkeley packet filter options USB_DEBUG # enable debug msgs device ehci # EHCI PCI->USB interface (USB 2.0) device xhci # XHCI PCI->USB interface (USB 3.0) device usb # USB Bus (required) device ukbd # Keyboard device umass # Disks/Mass storage - Requires scbus and da options ACCEPT_FILTER_DATA options ACCEPT_FILTER_HTTP options ACCEPT_FILTER_DNS options GEOM_MIRROR options NULLFS device pf device pflog makeoptions MODULES_OVERRIDE="zfs opensolaris krpc" When I built GENERIC kernel with your patch, I couldn't extract much info because for some reason the keyboard of my remote console doesn't work on 9.2, due to some USB bug :-( and thus I couldn't paginate the screen output. Obviously, it didn't get logged, too. On 2013-09-15 22:55, Andriy Gapon wrote: > on 14/09/2013 22:53 Daniel Gerzo said the following: >> The problem is that while I do not load geom_mirror from loader.conf, >> the >> machine boots fine, however as soon as I enable gmirror in >> loader.conf the >> machine doesn't boot and errors with >> >> /Trying to mount root from zfs:sys/default/root [].../ >> >> /Mounting from zfs:sys/default/root failed with error 22. >> / >> >> >> and it hangs in the prompt asking me to enter device to mount root >> from. >> >> I found only this >> http://lists.freebsd.org/pipermail/freebsd-current/2012-November/037910.html >> email where avg@ mentions that it might be a bug in his code, but no >> further >> followups. However that is almost a year ago and I got trapped by >> this on 9.2-RC4. > > At that time there was a specific new change committed and I already > had a > report about the kind of configurations that were broken by that > change. > > So far, I have no idea what could cause your problem. > > You may want to try the following diagnostic patch: > http://people.freebsd.org/~avg/zfs-root-pool-config-debug.patch > If your kernel configuration doesn't have INVARIANTS then you can > either add > that or remove DEBUG check around the added code. > Please enable verbose boot, set vfs.zfs.debug and > kern.geom.mirror.debug (in > loader.conf or at its prompt) and try to capture any interesting geom > and ZFS > related messages. -- Kind regards Daniel