Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Oct 2010 16:24:08 +0200
From:      Stefan Bethke <stb@lassitu.de>
To:        freebsd-fs@freebsd.org
Subject:   zfs destroy: cannot destroy 'foo': dataset already exists
Message-ID:  <64465C89-C68B-4436-8937-0D1D49F49BEA@lassitu.de>

next in thread | raw e-mail | index | archive | help
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 <stb@lassitu.de>   Fon +49 151 14070811




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?64465C89-C68B-4436-8937-0D1D49F49BEA>