From owner-svn-src-head@freebsd.org Sat Jul 8 17:15:40 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D91F8D9EC08; Sat, 8 Jul 2017 17:15:40 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96CE92874; Sat, 8 Jul 2017 17:15:40 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v68HFdVv068413; Sat, 8 Jul 2017 10:15:39 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v68HFd8O068412; Sat, 8 Jul 2017 10:15:39 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201707081715.v68HFd8O068412@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r320803 - head/sbin/mount In-Reply-To: <1499533357.87595.78.camel@freebsd.org> To: Ian Lepore Date: Sat, 8 Jul 2017 10:15:39 -0700 (PDT) CC: rgrimes@freebsd.org, Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2017 17:15:41 -0000 [ Charset ISO-8859-1 unsupported, converting... ] > On Sat, 2017-07-08 at 09:50 -0700, Rodney W. Grimes wrote: > > [ Charset UTF-8 unsupported, converting... ] > > > > > > Author: trasz > > > Date: Sat Jul??8 11:06:27 2017 > > > New Revision: 320803 > > > URL: https://svnweb.freebsd.org/changeset/base/320803 > > > > > > Log: > > > ? Fix "mount -uw /" when the filesystem type doesn't match. > > > ?? > > > ? This basically makes "mount -uw /" work when the filesystem > > > ? mounted on / is NFS, but the one configured in fstab(5) is UFS, > > > ? which can happen when you forget to modify fstab. > > Please do not silence user errors because they are inconvinient, > > this is a configuration error and the system should fail to? > > mount the incorrectly configured root. > > > > If we start changing things to silently ignore user configuration > > errors we are going down a very slippery road. > > > > IMO, this change fixes the right problem, but maybe does so the wrong > way. ?Mount -u is by definition an update to an existing mount. ?There > should be no need to consult /etc/fstab for an existing mount since the > info is available from the kernel. > > Note that I say the foregoing with my user hat on. ?I haven't looked at > the code to see if there's some reason why my common-sensical way of > thinking about it is actually impossible to implement for some reason. This "check" saves one from the mistake of a wrong fstab that was not properly written for nfs that is probably going to blow up when it goes to get /usr or some other file system. Example of when this change can cause things to go very wrong for an admin. I rsync/however a system that is booting from disk onto my nice new NAS box and setup exports of the file systems that I moved. I further set up dhcp/tftp/pxe to boot this NFS version of the system. I forget to edit the etc/fstab in the copy on the NFS server. I reboot the system via PXE, it gets its root file system via NFS and now silently ignores my error and procededs to FFS mount all the other file system. Can you see the error in thinking this change is a good idea? -- Rod Grimes rgrimes@freebsd.org