From nobody@FreeBSD.org  Thu Apr  4 13:16:24 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id D9479364
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  4 Apr 2013 13:16:24 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id C985EFB5
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  4 Apr 2013 13:16:24 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r34DGNab078742
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 4 Apr 2013 13:16:23 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r34DGNfj078741;
	Thu, 4 Apr 2013 13:16:23 GMT
	(envelope-from nobody)
Message-Id: <201304041316.r34DGNfj078741@red.freebsd.org>
Date: Thu, 4 Apr 2013 13:16:23 GMT
From: deeptech71 <deeptech71@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: despite mount options (late, failok, noauto), mount(1) returns 1 when the specified path does not exist
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         177630
>Category:       bin
>Synopsis:       despite mount options (late, failok, noauto), mount(8) returns 1 when the specified path does not exist
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 04 13:20:00 UTC 2013
>Closed-Date:    Wed Jun 19 18:22:10 UTC 2013
>Last-Modified:  Wed Jun 19 18:22:10 UTC 2013
>Originator:     deeptech71
>Release:        -CURRENT
>Organization:
>Environment:
>Description:
I would prefer to mount a partition by its GPT label upon boot, but ignore errors arising out of the partition not existing (ie., when the relevant storage device is not plugged in during boot); the partition should later be mountable by a simple ``mount /myspecialmountpoint''. In other words, I would like the following or similar entry to work in /etc/fstab:
  /dev/gpt/myspecialpartition /myspecialmountpoint rw,failok
However, with such an entry, even if "rw,late,failok,noauto" is used, the startup scripts panic during boot, with some "UNEXPECTED UNCONSISTENCY" message.
>How-To-Repeat:
Add
  /dev/gpt/<insert_non-existent_GPT_label_here> /myspecialmountpoint rw,failok
to your /etc/fstab, and reboot.
>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: jh 
State-Changed-When: Fri May 10 10:19:59 UTC 2013 
State-Changed-Why:  
Waiting for feedback. 


Responsible-Changed-From-To: freebsd-bugs->jh 
Responsible-Changed-By: jh 
Responsible-Changed-When: Fri May 10 10:19:59 UTC 2013 
Responsible-Changed-Why:  
Track. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=177630 

From: Jaakko Heinonen <jh@FreeBSD.org>
To: deeptech71 <deeptech71@gmail.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: misc/177630: despite mount options (late, failok, noauto),
 mount(1) returns 1 when the specified path does not exist
Date: Fri, 10 May 2013 13:19:39 +0300

 On 2013-04-04, deeptech71 wrote:
 > I would prefer to mount a partition by its GPT label upon boot, but
 > ignore errors arising out of the partition not existing (ie., when the
 > relevant storage device is not plugged in during boot); the partition
 > should later be mountable by a simple ``mount /myspecialmountpoint''.
 > In other words, I would like the following or similar entry to work in
 > /etc/fstab: /dev/gpt/myspecialpartition /myspecialmountpoint rw,failok
 
 > However, with such an entry, even if "rw,late,failok,noauto" is used,
 > the startup scripts panic during boot, with some "UNEXPECTED
 > UNCONSISTENCY" message.
 
 > >How-To-Repeat:
 > Add
 >   /dev/gpt/<insert_non-existent_GPT_label_here> /myspecialmountpoint rw,failok
 > to your /etc/fstab, and reboot.
 
 I can't reproduce on current. This example line misses the file system
 type field. I get 
 
 fstab: /etc/fstab:8: Inappropriate file type or format
 
 but booting continues without problems.
 
 I also tested some other fstab lines:
 
 /dev/gpt/nonexistent	/myspecialmountpoint	ufs rw,failok	0	0
 
 Error: "mount: /myspecialmountpoint: No such file or directory"
 Booting continues.
 
 /dev/gpt/nonexistent	/mnt			ufs rw,failok	0	0
 
 Error: "mount: /dev/gpt/nonexistent: No such file or directory"
 Booting continues.
 
 -- 
 Jaakko

From: "deeptech71@gmail.com" <deeptech71@gmail.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: bin/177630: despite mount options (late, failok, noauto),
 mount(8) returns 1 when the specified path does not exist
Date: Mon, 27 May 2013 09:15:59 +0200

 Ah, the booting failure actually occurs when the fsck field is
 positive (the "UNEXPECTED INCONSISTENCY" message is printed only when
 the value is at least 2). So the description needs to be amended: I
 would be prefer to be able to run fsck on and mount a particular
 filesystem-device if it is available at boot time, but to still boot
 the system if the device is missing.
 
 However, the title is still correct: mount(8) returns 1, when it
 should return 0, according to the manpage:
 
 failok  If this option is specified, mount will return 0 even if
         an error occurs during the mount of the filesystem.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/177630: commit references a PR
Date: Fri,  7 Jun 2013 07:17:59 +0000 (UTC)

 Author: jh
 Date: Fri Jun  7 07:17:46 2013
 New Revision: 251485
 URL: http://svnweb.freebsd.org/changeset/base/251485
 
 Log:
   Revert r238399.
   
   The "failok" option doesn't have any effect at all unless specified in
   fstab(5) and combined with the -a flag. The "failok" option is already
   documented in fstab(5).
   
   PR:		177630
   No objection:	eadler
   MFC after:	1 week
 
 Modified:
   head/sbin/mount/mount.8
 
 Modified: head/sbin/mount/mount.8
 ==============================================================================
 --- head/sbin/mount/mount.8	Fri Jun  7 05:18:07 2013	(r251484)
 +++ head/sbin/mount/mount.8	Fri Jun  7 07:17:46 2013	(r251485)
 @@ -28,7 +28,7 @@
  .\"     @(#)mount.8	8.8 (Berkeley) 6/16/94
  .\" $FreeBSD$
  .\"
 -.Dd July 12, 2012
 +.Dd June 6, 2011
  .Dt MOUNT 8
  .Os
  .Sh NAME
 @@ -152,11 +152,6 @@ When used with the
  .Fl u
  flag, this is the same as specifying the options currently in effect for
  the mounted file system.
 -.It Cm failok
 -If this option is specified,
 -.Nm
 -will return 0 even if an error occurs
 -during the mount of the filesystem.
  .It Cm force
  The same as
  .Fl f ;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: feedback->patched 
State-Changed-By: jh 
State-Changed-When: Fri Jun 7 07:34:49 UTC 2013 
State-Changed-Why:  
Manual page updated in r251485. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=177630 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/177630: commit references a PR
Date: Wed, 19 Jun 2013 18:00:10 +0000 (UTC)

 Author: jh
 Date: Wed Jun 19 18:00:00 2013
 New Revision: 251998
 URL: http://svnweb.freebsd.org/changeset/base/251998
 
 Log:
   MFC r251485:
   
   Revert r238399.
   
   The "failok" option doesn't have any effect at all unless specified in
   fstab(5) and combined with the -a flag. The "failok" option is already
   documented in fstab(5).
   
   PR:		177630
 
 Modified:
   stable/9/sbin/mount/mount.8
 Directory Properties:
   stable/9/sbin/mount/   (props changed)
 
 Modified: stable/9/sbin/mount/mount.8
 ==============================================================================
 --- stable/9/sbin/mount/mount.8	Wed Jun 19 17:14:59 2013	(r251997)
 +++ stable/9/sbin/mount/mount.8	Wed Jun 19 18:00:00 2013	(r251998)
 @@ -28,7 +28,7 @@
  .\"     @(#)mount.8	8.8 (Berkeley) 6/16/94
  .\" $FreeBSD$
  .\"
 -.Dd July 12, 2012
 +.Dd June 6, 2011
  .Dt MOUNT 8
  .Os
  .Sh NAME
 @@ -145,11 +145,6 @@ When used with the
  .Fl u
  flag, this is the same as specifying the options currently in effect for
  the mounted file system.
 -.It Cm failok
 -If this option is specified,
 -.Nm
 -will return 0 even if an error occurs
 -during the mount of the filesystem.
  .It Cm force
  The same as
  .Fl f ;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/177630: commit references a PR
Date: Wed, 19 Jun 2013 18:01:50 +0000 (UTC)

 Author: jh
 Date: Wed Jun 19 18:01:37 2013
 New Revision: 251999
 URL: http://svnweb.freebsd.org/changeset/base/251999
 
 Log:
   MFC r251485:
   
   Revert r238399.
   
   The "failok" option doesn't have any effect at all unless specified in
   fstab(5) and combined with the -a flag. The "failok" option is already
   documented in fstab(5).
   
   PR:		177630
 
 Modified:
   stable/8/sbin/mount/mount.8
 Directory Properties:
   stable/8/sbin/mount/   (props changed)
 
 Modified: stable/8/sbin/mount/mount.8
 ==============================================================================
 --- stable/8/sbin/mount/mount.8	Wed Jun 19 18:00:00 2013	(r251998)
 +++ stable/8/sbin/mount/mount.8	Wed Jun 19 18:01:37 2013	(r251999)
 @@ -28,7 +28,7 @@
  .\"     @(#)mount.8	8.8 (Berkeley) 6/16/94
  .\" $FreeBSD$
  .\"
 -.Dd July 12, 2012
 +.Dd June 6, 2011
  .Dt MOUNT 8
  .Os
  .Sh NAME
 @@ -145,11 +145,6 @@ When used with the
  .Fl u
  flag, this is the same as specifying the options currently in effect for
  the mounted file system.
 -.It Cm failok
 -If this option is specified,
 -.Nm
 -will return 0 even if an error occurs
 -during the mount of the filesystem.
  .It Cm force
  The same as
  .Fl f ;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: jh 
State-Changed-When: Wed Jun 19 18:21:46 UTC 2013 
State-Changed-Why:  
Manual page updated in head, stable/9 and stable/8. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=177630 
>Unformatted:
