From owner-freebsd-fs@FreeBSD.ORG Thu Nov 14 18:35:52 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41FE6AF2 for ; Thu, 14 Nov 2013 18:35:52 +0000 (UTC) Received: from unit0.ironport.snap.net.nz (unit0.ironport.snap.net.nz [202.37.100.104]) by mx1.freebsd.org (Postfix) with ESMTP id AE3AB23BB for ; Thu, 14 Nov 2013 18:35:51 +0000 (UTC) X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=iw7iUsToLjcKeDD2xJYUY7vdGlCAuHgOCAeRLiIczvU= c=1 sm=2 a=mzW07HfSzZMA:10 a=NjuLKI5jG4EA:10 a=V6dPbFcDAAAA:8 a=2LRD4gPbZV39fsc-ba8A:9 a=CjuIK1q_8ugA:10 a=CqWZkgPtQDeKha5iNpUA:9 a=ZVk8-NSrHBgA:10 a=TEJWfmVIHgEA:10 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EAO8WhVJ7/y9j/2dsb2JhbABbgz9TvxmBIRaDG0UBAThOFIhuDq0OhFIBBY5mBo4zgRE4gwqBEZAzh2CBL5QbgVRA X-IronPort-AV: E=Sophos;i="4.93,700,1378814400"; d="p7s'?scan'208";a="216992651" Received: from rupert.snap.net.nz ([202.37.100.140]) by smtp0.ironport.snap.net.nz with ESMTP; 15 Nov 2013 07:35:43 +1300 X-Sender-IP: 123.255.47.99 Received: from x24.msqr.us (99.47.255.123.static.snap.net.nz [123.255.47.99]) by rupert.snap.net.nz (Postfix) with ESMTPS id B9DF925620 for ; Fri, 15 Nov 2013 07:35:43 +1300 (NZDT) Received: from renton.fritz.box (99.47.255.123.static.snap.net.nz [123.255.47.99]) (authenticated bits=0) by x24.msqr.us (8.14.7/8.14.5) with ESMTP id rAEIZdUL026989 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 15 Nov 2013 07:35:41 +1300 (NZDT) (envelope-from matt@msqr.us) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=msqr.us; s=20121026; t=1384454141; bh=6UELbCJXVOXnuZ3++49ONAQ8oqywnff1PYjX+buiE6A=; h=From:Subject:Date:To; b=gIJIw35BXpGCZ1w7FA9GEo4kzCAyAUPajigyYEHdc6fffqkGg+zXd0CdQ4bhamNC9 Y4h2kr62/MRNlOIj0p2zM9/62yMw0KwJcGkiqXRGhB5a5ARrJafXBmV8ppAchTdnxo 0s8G68YJQRI3yoC2hBvVNwlsJnikLm7lfXJntDJQ= X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.98 at msqr.us X-Authentication-Warning: x24.msqr.us: Host 99.47.255.123.static.snap.net.nz [123.255.47.99] claimed to be renton.fritz.box From: Matt Magoffin Content-Type: multipart/signed; boundary="Apple-Mail=_CE034618-948E-4B68-B279-3900679E6636"; protocol="application/pkcs7-signature"; micalg=sha1 Subject: ZFS snapshot renames failing after upgrade to 9.2 Message-Id: <0C9FD4E1-0549-4849-BFC5-D8C5D4A34D64@msqr.us> Date: Fri, 15 Nov 2013 07:35:40 +1300 To: freebsd-fs@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) X-Mailer: Apple Mail (2.1822) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Nov 2013 18:35:52 -0000 --Apple-Mail=_CE034618-948E-4B68-B279-3900679E6636 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hello, I have a system that had been running FreeBSD 9.1 for some time, and I = recently upgraded to 9.2. I've been using this simple script to create = daily, rotating ZFS snapshots via cron: = http://andyleonard.com/2010/04/07/automatic-zfs-snapshot-rotation-on-freeb= sd/ Essentially the snapshots are renamed and then a new snapshot is created = with the same name as the most recently created snapshot. Since the = upgrade to 9.2, however, the snapshots aren't able to be renamed. I end = up with an error like this: cannot rename 'zdata/home': a child dataset already has a snapshot with = the new name cannot create snapshot 'zdata/home@daily.0': dataset already exists Once that happens, zfs will show two snapshots: # zfs list -t snapshot -o name,creation,used,referenced |grep zdata/home zdata/home@daily.1 Wed Nov 13 0:00 2013 = 50.5K 91.0G zdata/home@daily.0 Thu Nov 14 0:00 2013 = 0 91.0G However, trying to list the snapshots results in this error: # ls .zfs/snapshot/ ls: daily.1: Device busy daily.0 I can destroy the daily.1 snapshot: # zfs destroy zdata/home@daily.1 # zfs list -t snapshot -o name,creation,used,referenced |grep zdata/home zdata/home@daily.0 Thu Nov 14 0:00 2013 = 0 91.0G # ls .zfs/snapshot/ daily.0 Then if I try to rename it like the script would, I end up in the same = "Device busy" state: # zfs rename zdata/home@daily.0 zdata/home@daily.1 # zfs list -t snapshot -o name,creation,used,referenced |grep zdata/home zdata/home@daily.1 Thu Nov 14 0:00 2013 = 0 91.0G # ls .zfs/snapshot/ ls: daily.1: Device busy Does anyone have any ideas how to get the renames working? -- m@ --Apple-Mail=_CE034618-948E-4B68-B279-3900679E6636 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIDgTCCA30w ggJloAMCAQICAQIwCwYJKoZIhvcNAQELMGsxEDAOBgNVBAMMB21zcXIgQ0ExDTALBgNVBAoMBG1z cXIxIDAeBgNVBAsMF0NlcnRpZmljYXRpb24gQXV0aG9yaXR5MQswCQYDVQQGEwJVUzEZMBcGCSqG SIb3DQEJARYKY2FAbXNxci51czAeFw0xMzA3MDcyMTI1MTJaFw0yMzA3MDUyMTI1MTJaMHMxFjAU BgNVBAMMDU1hdHQgTWFnb2ZmaW4xDTALBgNVBAoMBG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