From owner-freebsd-current@FreeBSD.ORG Wed Feb 20 12:36:16 2008 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 1987F16A402 for ; Wed, 20 Feb 2008 12:36:16 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id BDF2713C4F9 for ; Wed, 20 Feb 2008 12:36:15 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender:X-Spam-Status:Subject; b=RuvbTMNKP+AjdbOjLLChzHdBmGwXO/J9vjnQ+HXbqpOu1Gkud5KuKOmSjlHd4THRfyXhtW8lCLMVchymTjCeh2s8OY1RMrCQxuHheYY0Zb+d3hA47RhMl+GIBXFrF1nUwxwzg/PaUEWvA4Gp1T9bZ3KFLmagjJB1mzlCauDD/BI=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1JRoBJ-000B73-3o; Wed, 20 Feb 2008 15:36:13 +0300 Date: Wed, 20 Feb 2008 15:36:12 +0300 From: Eygene Ryabinkin To: Sean , Dominic Fandrey Message-ID: References: <47BADE07.9020402@gmx.de> <7CZsNG/ix1SXULta6Bdgf51ZwDE@TqmFlxFMySuiJ36EgnrGRgt6KQ8> <47BB01BE.4010309@gmx.de> <0FD9F726-6E45-4A81-9DE1-E3F0AAF3668B@gothic.net.au> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <0FD9F726-6E45-4A81-9DE1-E3F0AAF3668B@gothic.net.au> Sender: rea-fbsd@codelabs.ru X-Spam-Status: No, score=-2.3 required=4.0 tests=ALL_TRUSTED,AWL,BAYES_05 Cc: freebsd-current@freebsd.org Subject: Re: nfs mounts don't work through fstab 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: Wed, 20 Feb 2008 12:36:16 -0000 Me again. Wed, Feb 20, 2008 at 12:15:57PM +1100, Sean wrote: > From FreeBSD 5.5 (the earliest I can check readily) > > fstab(5) > > The fourth field, (fs_mntops), describes the mount options associated > with the file system. It is formatted as a comma separated list of > options. It contains at least the type of mount (see fs_type below) > plus > any additional options appropriate to the file system type. See the [...] > So the fs_type (rw, ro, etc.) has always been documented as obligatory, > though in slightly less than obvious wording. Good point. Moreover, I can not make it work even on 6.2-STABLE: ----- $ tail -1 /etc/fstab test:/usr/src /usr/src nfs noauto 0 0 $ mount /usr/src fstab: /etc/fstab:13: Inappropriate file type or format fstab: /etc/fstab:13: Inappropriate file type or format mount: /usr/src: unknown special file or file system $ mount -t nfs -a fstab: /etc/fstab:13: Inappropriate file type or format $ uname -a FreeBSD XXX 6.2-STABLE FreeBSD 6.2-STABLE #1: Mon Feb 12 16:31:48 MSK 2007 root@XXX:/usr/obj/usr/src/sys/XXX i386 ----- >> These 2 lines have been in use since 6.0 release: >> >> mobileKamikaze:/usr/src /usr/src nfs -b,-T,-R=5,noauto 0 0 >> mobileKamikaze:/usr/obj /usr/obj nfs -b,-T,-R=5,noauto 0 0 >> >> They stopped working with the switch to RELENG_7. >> >> # mount /usr/src/ 0 /root >> fstab: /etc/fstab:27: Inappropriate file type or format >> fstab: /etc/fstab:28: Inappropriate file type or format >> fstab: /etc/fstab:27: Inappropriate file type or format >> fstab: /etc/fstab:28: Inappropriate file type or format >> >> mount: /usr/src: unknown special file or file system >> >> fstabscan() is the place where the "Inappropriate file type or format" >> error is printed. The pointer char* cp either points to a string "rw", >> "ro" or "sw". If none of these are present cp is a NULL-pointer when the >> final check in line 207 is reached. So error(EFTYPE) is called. So, Dominic, something might had changed in your fstab. Because the code that checks for options exists in the fstab.c since revision 1.1, see http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/gen/fstab.c?rev=1.1;content-type=text%2Fplain And the code in question had not been changed substantially since revision 1.3, see http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/gen/fstab.c?annotate=1.15 May be some other utility (like mount) had extracted NFS mounts from the /etc/fstab by itself, but 1. it is silly, especially when fstab parsing functions are in libc; 2. I can not find such changes on the transition path 6.2 -> 7. While both of the arguments are not very convincing ;)), it may be well that you missed something about your system. Could you, please, recheck? -- Eygene