From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Aug 18 21:10:02 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 152D51065689 for ; Mon, 18 Aug 2008 21:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D020C8FC19 for ; Mon, 18 Aug 2008 21:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m7ILA1Wk039073 for ; Mon, 18 Aug 2008 21:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m7ILA15V039072; Mon, 18 Aug 2008 21:10:01 GMT (envelope-from gnats) Resent-Date: Mon, 18 Aug 2008 21:10:01 GMT Resent-Message-Id: <200808182110.m7ILA15V039072@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Cy Schubert Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2455C106568E for ; Mon, 18 Aug 2008 21:05:02 +0000 (UTC) (envelope-from Cy.Schubert@komquats.com) Received: from spqr.osg.gov.bc.ca (spqr.osg.gov.bc.ca [142.32.102.24]) by mx1.freebsd.org (Postfix) with ESMTP id EAF458FC12 for ; Mon, 18 Aug 2008 21:05:01 +0000 (UTC) (envelope-from Cy.Schubert@komquats.com) Received: from passer.osg.gov.bc.ca (passer.osg.gov.bc.ca [142.32.110.29]) by spqr.osg.gov.bc.ca (Postfix) with ESMTP id 22C8C7F4DB for ; Mon, 18 Aug 2008 13:49:13 -0700 (PDT) Received: from spqr.komquats.com (cwsys9 [10.2.2.1]) by passer.osg.gov.bc.ca (8.14.2/8.12.3) with ESMTP id m7IKnCNh064129 for ; Mon, 18 Aug 2008 13:49:12 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Received: from cwsys.cwsent.com (cwsys [10.1.1.1]) by spqr.komquats.com (Postfix) with ESMTP id 2A02A410ED for ; Mon, 18 Aug 2008 13:49:12 -0700 (PDT) Received: from cwsys.cwsent.com (localhost [127.0.0.1]) by cwsys.cwsent.com (8.14.2/8.14.2) with ESMTP id m7IKnBDc003811 for ; Mon, 18 Aug 2008 13:49:11 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Received: (from cy@localhost) by cwsys.cwsent.com (8.14.2/8.13.1/Submit) id m7IKnBI7003810; Mon, 18 Aug 2008 13:49:11 -0700 (PDT) (envelope-from cy) Message-Id: <200808182049.m7IKnBI7003810@cwsys.cwsent.com> Date: Mon, 18 Aug 2008 13:49:11 -0700 (PDT) From: Cy Schubert To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/126633: Snapshot Utiity on a UFS-only System loads zfs kld X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Cy Schubert List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2008 21:10:02 -0000 >Number: 126633 >Category: ports >Synopsis: Snapshot Utiity on a UFS-only System loads zfs kld >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Aug 18 21:10:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Cy Schubert >Release: FreeBSD-2.0 >Organization: FreeBSD >Environment: System: FreeBSD cwsys 7.0-STABLE FreeBSD 7.0-STABLE #0: Sun Jul 13 14:50:29 PDT 2008 root@cwsys:/export/obj/opt/src/svn-stable7/sys/KOMQUATS i386 >Description: The snapshot utility is a great application. I have a patch that would be helpful on UFS-only systems. When snapshot is run it issues zfs commands which automatically kldload the ZFS kld. Though I use ZFS on one of my servers, the rest of my systems don't use it yet and I have no plans to use it on my laptop FreeBSD system. Here is a patch that would only perform ZFS snapshot operations if the ZFS kernel module is loaded. >How-To-Repeat: Run snapshot or periodic-snapshot on a UFS-only system. >Fix: --- /usr/local/sbin/snapshot 2008-01-04 10:36:18.000000000 -0800 +++ snapshot.new 2008-05-15 15:08:02.000000000 -0700 @@ -142,7 +142,7 @@ fi fi fi - if (zfs list $fs_dir) >/dev/null 2>&1; then + if (kldstat -q -m zfs && zfs list $fs_dir) >/dev/null 2>&1; then # ZFS filesystem fs_type="zfs" zfs=`zfs list -H -o name $fs_dir` @@ -263,7 +263,7 @@ fi # operate on filesystem - if (zfs list $fs_dir) >/dev/null 2>&1; then + if (kldstat -q -m zfs && zfs list $fs_dir) >/dev/null 2>&1; then # ZFS filesystem fs_name=`zfs list -H -o name $fs_dir` @@ -357,7 +357,7 @@ parseFTG "$fs" # operate on filesystem - if (zfs list $fs_dir) >/dev/null 2>&1; then + if (kldstat -q -m zfs && zfs list $fs_dir) >/dev/null 2>&1; then # ZFS filesystem # check for existence of snapshot @@ -420,7 +420,7 @@ parseFTG "$fs" # operate on filesystem - if (zfs list $fs_dir) >/dev/null 2>&1; then + if (kldstat -q -m zfs && zfs list $fs_dir) >/dev/null 2>&1; then # ZFS filesystem # check for existence of snapshot >Release-Note: >Audit-Trail: >Unformatted: