From owner-freebsd-current@FreeBSD.ORG Tue Oct 19 21:21:56 2010 Return-Path: Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0D4B106566C for ; Tue, 19 Oct 2010 21:21:55 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id 7F0D38FC13 for ; Tue, 19 Oct 2010 21:21:55 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id A7E61A7DF9D; Wed, 20 Oct 2010 05:21:53 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id qFkADcWaBXHl; Wed, 20 Oct 2010 05:21:47 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 95306A7DF78; Wed, 20 Oct 2010 05:21:45 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type; b=u73DY/g/z0xTEul7a0V08+Ia5ENOruD1m3ld7lm4K1eb2ag2//2sVEgz/oF8+hYva Jh32circZXxLOeQmqFJsw== Message-ID: <4CBE0BE5.2060708@delphij.net> Date: Tue, 19 Oct 2010 14:21:41 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.12) Gecko/20100920 Thunderbird/3.0.8 ThunderBrowse/3.3.2 MIME-Version: 1.0 To: Marcel Moolenaar References: <4CBCDD3A.9070404@delphij.net> <4CBD26B4.2020205@yandex.ru> <4CBDB17C.4040607@yandex.ru> <44B33168-C432-4AA0-A765-8222DB4C048D@mac.com> In-Reply-To: <44B33168-C432-4AA0-A765-8222DB4C048D@mac.com> X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: multipart/mixed; boundary="------------090607000805030906040809" Cc: "Andrey V. Elsukov" , FreeBSD Current Subject: Re: [zfs] Mounting from (...) failed with error 19 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2010 21:21:56 -0000 This is a multi-part message in MIME format. --------------090607000805030906040809 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 10/19/10 08:49, Marcel Moolenaar wrote: > > On Oct 19, 2010, at 7:55 AM, Andrey V. Elsukov wrote: > >> On 19.10.2010 09:03, Andrey V. Elsukov wrote: >>>> Mounting from (...) failed with error 19 >>>> >>>> On boot. The system is using pure ZFS setup. It seems that 19 means >>>> ENODEV but according to the dmesg the device do exist. >>> >>> Yes, i have the same problem. >> >> I fixed it with attached patch. > > Makes sense. "tank" (or its namesake) isn't a real device. > Feel free to commit to unbreak things, but we may want to > rethink this from a generality point of view. Listing > exceptions doesn't scale and we now have 2 (the first was > the empty device name as used by nfs, and now also zfs). > > Good catch, BTW. Yes good catch, it fixed the problem for me as well. What about the attached patch? I'm going to give it a swirl soon. The difference is that it tests whether dev begins with /dev/. Note that I'm not quite convinced with this yet as we may want to wait for the devices from a zpool be ready, which may also need some yielding during boot. A better way of solving this might be to register a "watchlist" of devices (so that ZFS can register its vdev devices for example) and have mountroot wait for that list? Or perhaps a set of EVENTHANDLER callback? Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iQEcBAEBCAAGBQJMvgvkAAoJEATO+BI/yjfBX/gIAIRnS4eQVBe/Zh6RrT8BjI91 J1r7wNz1AYXda2t4/RUVnPZYr97GG1quEewtgcxTxW2nkii1ZkftjMg6Ik4Gio6Y AxNdjEB35tXqhVUV1oS8JS09ejZij2Y43SHxWxOkhUnFEmuhjK4+euM/+obpJ4Kl AR61E/DYqwv/8bqhofknylroDsveN3Vhd1n7dK4s+e3YcmANnZxTCWcxroD7C2yb gCH6TDZPDVKVbfyS73QFoyic2Jml5eK/dkmlLMRubP5qs5aIgy0P1zcjhvRrrgOf bYLM3IUEbVhPSQnO8d2sDhXytgCI/s6p39rMdKPR3jrf2+UnW6IM46NvVkSaOP8= =cAxC -----END PGP SIGNATURE----- --------------090607000805030906040809 Content-Type: text/plain; name="vfs_mountroot.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="vfs_mountroot.diff" Index: sys/kern/vfs_mountroot.c =================================================================== --- sys/kern/vfs_mountroot.c (revision 214082) +++ sys/kern/vfs_mountroot.c (working copy) @@ -713,8 +713,7 @@ parse_mount(char **conf) goto out; } - if (strcmp(fs, "zfs") != 0 && dev[0] != '\0' && - !parse_mount_dev_present(dev)) { + if ((strstr(dev, "/dev/") == dev) && !parse_mount_dev_present(dev)) { printf("mountroot: waiting for device %s ...\n", dev); delay = hz / 10; timeout = root_mount_timeout * hz; --------------090607000805030906040809--