From owner-freebsd-current@FreeBSD.ORG Tue Oct 19 22:49:09 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 82AEF1065679 for ; Tue, 19 Oct 2010 22:49:09 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout026.mac.com (asmtpout026.mac.com [17.148.16.101]) by mx1.freebsd.org (Postfix) with ESMTP id 6684B8FC19 for ; Tue, 19 Oct 2010 22:49:09 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp026.mac.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 64bit)) with ESMTPSA id <0LAK0093N6NK2W30@asmtp026.mac.com> for freebsd-current@FreeBSD.ORG; Tue, 19 Oct 2010 15:33:21 -0700 (PDT) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=5 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1004200000 definitions=main-1010190192 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15,1.0.148,0.0.0000 definitions=2010-10-19_10:2010-10-19, 2010-10-19, 1970-01-01 signatures=0 From: Marcel Moolenaar In-reply-to: <4CBE0BE5.2060708@delphij.net> Date: Tue, 19 Oct 2010 15:33:20 -0700 Message-id: <023E61D3-7E4C-4793-95A0-088ABCD0F92F@mac.com> References: <4CBCDD3A.9070404@delphij.net> <4CBD26B4.2020205@yandex.ru> <4CBDB17C.4040607@yandex.ru> <44B33168-C432-4AA0-A765-8222DB4C048D@mac.com> <4CBE0BE5.2060708@delphij.net> To: d@delphij.net X-Mailer: Apple Mail (2.1081) 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 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 22:49:09 -0000 On Oct 19, 2010, at 2:21 PM, Xin LI wrote: > -----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/. Interesting. I've been thinking about this too, but isn't exactly fool-proof. When devfs is the root file system, you can use "ufs:da0s1a" to refer to the device special file. It seems inconsistent to have "ufs:da0s1" fail when ufs:/dev/da0s1" works (a real scenario with USB based mass storage devices -- root mount is unheld as soon as umass is created, but before daX exists for it). This patch at least covers the problem cases with a single strstr(), and we may get away with the inconsistency given above by documenting it properly. Andrey: any thoughts? -- Marcel Moolenaar xcllnt@mac.com