From lapo@cyberx.home.lapo.it  Fri Sep  1 10:02:35 2006
Return-Path: <lapo@cyberx.home.lapo.it>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7CDF916A4DD
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  1 Sep 2006 10:02:35 +0000 (UTC)
	(envelope-from lapo@cyberx.home.lapo.it)
Received: from cyberx.home.lapo.it (host71-40.pool8174.interbusiness.it [81.74.40.71])
	by mx1.FreeBSD.org (Postfix) with SMTP id 9434643D6D
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  1 Sep 2006 10:02:30 +0000 (GMT)
	(envelope-from lapo@cyberx.home.lapo.it)
Received: (qmail 65285 invoked by uid 1001); 1 Sep 2006 10:02:27 -0000
Message-Id: <20060901100227.65284.qmail@cyberx.home.lapo.it>
Date: 1 Sep 2006 10:02:27 -0000
From: Lapo Luchini <lapo@lapo.it>
Reply-To: Lapo Luchini <lapo@lapo.it>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Lapo Luchini <lapo@lapo.it>
Subject: "mount -o snapshot" removes any existing "-o" option from the mount
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         102745
>Category:       bin
>Synopsis:       "mount -o snapshot" removes any existing "-o" option from the mount
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    rodrigc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 01 10:10:22 GMT 2006
>Closed-Date:    Wed Mar 05 07:43:03 UTC 2008
>Last-Modified:  Wed Mar 05 07:43:03 UTC 2008
>Originator:     Lapo Luchini
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
>Environment:
System: FreeBSD cyberx.home.lapo.it 6.1-STABLE FreeBSD 6.1-STABLE #59: Thu Jun 8 22:17:18 CEST 2006 root@cyberx.home.lapo.it:/usr/obj/usr/src/sys/CYBERX i386

>Description:

(edited for shortness, showing only relevant lines)

% mount                           
/dev/ad0s1f on /usr (ufs, local, soft-updates, acls)
% mount -u -o snapshot /usr/snap /usr
% mount                           
/dev/ad0s1f on /usr (ufs, local, soft-updates)
# now most services don't work anymore as ACLs are missing!
# not very nice to silently discard options
% mount -u -o acls /usr
% mount                           
/dev/ad0s1f on /usr (ufs, local, soft-updates, acls)
% mount -u -o acls,snapshot /usr/snap2 /usr
% mount
/dev/ad0s1f on /usr (ufs, local, soft-updates, acls)
# ok, but not very easy to be used from a script
% mount -u -o current,snapshot /usr/snap3 /usr
mount: -o current: option not supported
% mount -u -o fstab,snapshot /usr/snap3 /usr
mount: -o fstab: option not supported

IMvHO a snapshot should mount the file system exactly as it was before
the snapshot or, at least, accept to be paired with "current" or "fstab"
in order to automatically select the "same" options that were used.

PS: I know I could solve the problems with ACLs using "tunefs -a /usr"
and not needing a mount option anymore, but the problem is a bit more
general than that (and I only have remote access to that server, so I
can't possibly umount /usr in order to tunefs...).
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: rodrigc 
State-Changed-When: Thu Jan 25 06:12:21 UTC 2007 
State-Changed-Why:  
In CURRENT, "mount -u -o snapshot" does not remove the "acls" 
mount option on an existing mount.  However, the behavior 
described in this PR still exists in RELENG_6. 
There has been a lot of refactoring of the mount code in 
CURRENT, and not all of these fixes have made it to RELENG_6. 


Responsible-Changed-From-To: freebsd-bugs->rodrigc 
Responsible-Changed-By: rodrigc 
Responsible-Changed-When: Thu Jan 25 06:12:21 UTC 2007 
Responsible-Changed-Why:  
In CURRENT, "mount -u -o snapshot" does not remove the "acls" 
mount option on an existing mount.  However, the behavior 
described in this PR still exists in RELENG_6. 
There has been a lot of refactoring of the mount code in 
CURRENT, and not all of these fixes have made it to RELENG_6. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=102745 
State-Changed-From-To: patched->closed 
State-Changed-By: rodrigc 
State-Changed-When: Wed Mar 5 07:41:50 UTC 2008 
State-Changed-Why:  
This fix is in 7.0-RELEASE, but won't be backported 
to RELENG_6 due to a lot of refactoring of the mount code. 

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