From owner-freebsd-fs@FreeBSD.ORG Fri Oct 29 14:24:16 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08604106566C for ; Fri, 29 Oct 2010 14:24:16 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id C2C678FC16 for ; Fri, 29 Oct 2010 14:24:15 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 19F31B175F for ; Fri, 29 Oct 2010 16:24:13 +0200 (CEST) From: Stefan Bethke Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Fri, 29 Oct 2010 16:24:08 +0200 Message-Id: <64465C89-C68B-4436-8937-0D1D49F49BEA@lassitu.de> To: freebsd-fs@freebsd.org Mime-Version: 1.0 (Apple Message framework v1081) X-Mailer: Apple Mail (2.1081) Subject: zfs destroy: cannot destroy 'foo': dataset already exists X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Oct 2010 14:24:16 -0000 I just came across an issue which appears to (have been) be triggered by = a bug: When trying to incrementally push snapshots with zfs send/recv, I = encountered a snapshot on the target fs which zfs recv complained about. = I was unable to remove the snapshot with zfs destroy. Also, trying to = recursively destroying the whole fs failed: zfs send | zfs recv error: cannot restore to tank/jail/gilb.zs64.net@201010130334: destination = already exists # zfs destroy tank/jail/gilb.zs64.net@201010130034 cannot destroy 'tank/jail/gilb.zs64.net@201010130034': dataset already = exists # zfs destroy -r tank/jail/gilb.zs64.net cannot destroy 'tank/jail/gilb.zs64.net@201010130034': dataset already = exists I came across this post, which helped me recover: http://www.openg.info/entry/destroy-zfs-snapshot-dataset-exists # zdb -d tank | grep % Dataset tank/jail/gilb.zs64.net/%201010130334 [ZPL], ID 5218, cr_txg = 3560162, 8.60G, 323647 objects # zfs destroy tank/jail/gilb.zs64.net/%201010130334 cannot open 'tank/jail/gilb.zs64.net/%201010130334': dataset does not = exist # zfs destroy -r tank/jail/gilb.zs64.net # The post references a Solaris bug CR 6860996. I could not immediately = determine whether this has been ported yet. This is on 8-stable from sept. 21. # zpool status pool: tank state: ONLINE status: The pool is formatted using an older on-disk format. The pool = can still be used, but some features are unavailable. action: Upgrade the pool using 'zpool upgrade'. Once this is done, the pool will no longer be accessible on older software versions. scrub: none requested config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 ad4s1d ONLINE 0 0 0 errors: No known data errors Stefan --=20 Stefan Bethke Fon +49 151 14070811