Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Aug 2010 14:22:37 GMT
From:      Janne Snabb <snabb@epipe.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        snabb@epipe.com, rse@FreeBSD.org, gtodd@bellanet.org
Subject:   ports/150150: [PATCH] sysutils/freebsd-snapshot: confusing warning message
Message-ID:  <201008311422.o7VEMbil069416@tiktik.epipe.com>
Resent-Message-ID: <201008311430.o7VEU540086176@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         150150
>Category:       ports
>Synopsis:       [PATCH] sysutils/freebsd-snapshot: confusing warning message
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 31 14:30:04 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Janne Snabb <snabb@epipe.com>
>Release:        FreeBSD 8.1-RELEASE i386
>Organization:
EPIPE Communications
>Environment:
System: FreeBSD tiktik.epipe.com 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Sat Jul 24 09:20:35 UTC 2010
>Description:

When using "snapshot" command to "mount" or "visit" existing ufs
snapshots an useless and confusing warning message as follows is
always displayed:

WARNING: opening backing store: /usr/.snap/hourly.0 readonly

This warning message is emitted by mdconfig(8) when it is called
by the "snapshot" script.

This is irritating for example when freebsd-snapshot is being used
for making automated backups from cron(8) scripts because an un-needed
output is always generated even though there is no problem.

Port maintainer (gtodd@bellanet.org) as well as the upstream
(rse@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:

# snapshot visit /usr:hourly.0
WARNING: opening backing store: /usr/.snap/hourly.0 readonly
# exit
# snapshot mount /usr:hourly.0 /mnt
WARNING: opening backing store: /usr/.snap/hourly.0 readonly
#

>Fix:

Add "-o readonly" to mdconfig(8) options, it prevents this warning
message from being displayed. This should not be a problem as
snapshots are by definition read-only.

The following patch is a bit funny because it patches an existing
patch file in the port.

--- freebsd-snapshot-20091208.1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/sysutils/freebsd-snapshot/files/patch-snapshot /usr/ports/sysutils/freebsd-snapshot.fix/files/patch-snapshot
--- /usr/ports/sysutils/freebsd-snapshot/files/patch-snapshot	2010-01-18 04:46:26.000000000 +0000
+++ /usr/ports/sysutils/freebsd-snapshot.fix/files/patch-snapshot	2010-08-31 14:01:27.000000000 +0000
@@ -1,5 +1,5 @@
---- ./snapshot.orig	2009-08-01 11:34:34.000000000 -0400
-+++ ./snapshot	2010-01-14 18:14:06.940846133 -0500
+--- snapshot.orig	2009-12-08 20:14:13.000000000 +0000
++++ snapshot	2010-08-31 13:50:34.000000000 +0000
 @@ -29,7 +29,9 @@
  ##
  
@@ -19,3 +19,12 @@
      if checkyesno zfs_enable; then \
          echo 'yes'; \
      else \
+@@ -491,7 +494,7 @@
+             echo "snapshot:ERROR: unable to create directory \"$mnt\"" 1>&2
+             exit 1
+         fi
+-        system mdconfig -a -t vnode -f $fs_dir/.snap/$fs_tag.$fs_gen -u $num
++        system mdconfig -a -t vnode -o readonly -f $fs_dir/.snap/$fs_tag.$fs_gen -u $num
+         if [ $? -ne 0 ]; then
+             echo "snapshot:ERROR: unable to attach \"$fs_dir/.snap/$fs_tag.$fs_gen\" to \"/dev/md$num\"" 1>&2
+             exit 1
--- freebsd-snapshot-20091208.1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008311422.o7VEMbil069416>