I was wondering if there is a solution for this.  I've been able to replicate a 
similar problem on a different server. Basically I'm still unable to use zfs 
destroy on a filesystem, that was a parent filesystem and is now a child 
filesystem after a promotion.

bash-3.00# zpool history
History for 'testpool':
2009-04-14.11:30:00 zpool create testpool mirror 
c14t60060160910B1600E492DCF1071EDE11d0 c14t60060160910B1600585DC330081EDE11d0
2009-04-14.11:30:58 zfs create testpool/testfs
2009-04-14.11:31:16 zfs create testpool/testfs2
2009-04-14.11:31:47 zfs set mountpoint=/devel/testfs testpool/testfs
2009-04-14.11:32:10 zfs create testpool/testfs/dir1
2009-04-14.11:32:12 zfs create testpool/testfs/dir2
2009-04-14.11:32:13 zfs create testpool/testfs/dir3
2009-04-14.12:25:37 zfs snapshot testpool/test...@snap1
2009-04-14.12:29:10 zfs rollback testpool/test...@snap1
2009-04-14.12:30:10 zfs destroy testpool/test...@snap1
2009-04-16.12:42:03 zfs snapshot testpool/test...@snap1
2009-04-16.12:45:30 zfs clone testpool/test...@snap1 testpool/testfs2/clone1
2009-04-16.12:46:57 zfs promote testpool/testfs2/clone1

bash-3.00# zfs list
NAME                            USED  AVAIL  REFER  MOUNTPOINT
testpool                       1.03M  9.78G    20K  /testpool
testpool/testfs                  76K  9.78G    22K  /devel/testfs
testpool/testfs/dir1             18K  9.78G    18K  /devel/testfs/dir1
testpool/testfs/dir2             18K  9.78G    18K  /devel/testfs/dir2
testpool/testfs/dir3             18K  9.78G    18K  /devel/testfs/dir3
testpool/testfs2                790K  9.78G   758K  /testpool/testfs2
testpool/testfs2/clone1         772K  9.78G   756K  /testpool/testfs2/clone1
testpool/testfs2/clo...@snap1    16K      -   756K  -
bash-3.00# zfs destroy testpool/testfs2
cannot destroy 'testpool/testfs2': filesystem has children
use '-r' to destroy the following datasets:
testpool/testfs2/clo...@snap1
testpool/testfs2/clone1
bash-3.00# zfs destroy -r testpool/test...@snap1
cannot destroy 'testpool/testfs2/clo...@snap1': snapshot is cloned
no snapshots destroyed
bash-3.00# zfs destroy -r testpool/testfs2/clone1
cannot destroy 'testpool/testfs2/clone1': filesystem has dependent clones
use '-R' to destroy the following datasets:
testpool/testfs2
bash-3.00# zfs destroy -R testpool/testfs2/clone1
cannot determine dependent datasets: recursive dependency at 
'testpool/testfs2/clone1'
bash-3.00# 


----- Original Message ----
From: Grant Lowe <gl...@sbcglobal.net>
To: zfs-discuss@opensolaris.org
Sent: Wednesday, December 17, 2008 2:48:06 PM
Subject: Destroying a zfs dataset

I'm having a very difficult time destroying a zone.  Here's the skinny:

bash-3.00# zfs get origin | grep d01
r12_data/d01                           origin    
r12_data/d01/.clone.12052...@12042008  -
r12_data/d01-receive                   origin    -                              
        -
r12_data/d01-rece...@a                 origin    -                              
        -
r12_data/d01/.clone.12052008           origin    -                              
        -
r12_data/d01/.clone.12052...@12042008  origin    -                              
        -
bash-3.00# bash-3.00# zfs destroy r12_data/d01/.clone.12052...@12042008
cannot destroy 'r12_data/d01/.clone.12052...@12042008': snapshot has dependent 
clones
use '-R' to destroy the following datasets:
r12_data/d01/.clone.12052008
r12_data/d01
bash-3.00# zfs destroy -R r12_data/d01/.clone.12052...@12042008
cannot determine dependent datasets: recursive dependency at 
'r12_data/d01/.clone.12052...@12042008'
bash-3.00# zfs destroy -r r12_data/d01/.clone.12052...@12042008
cannot destroy 'r12_data/d01/.clone.12052...@12042008': snapshot is cloned
no snapshots destroyed
bash-3.00# 

I must be missing a piece of the puzzle. What is that piece?
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to