On Fri, 17 Apr 2009, Mark J Musante wrote:

The dependency is based on the names.

I should clarify what I mean by that. There are actually two dependencies here: one is based on dataset names, and one is based on snapshots and clones.

If there are two datasets, pool/foo and pool/foo/bar, then you cannot
destroy pool/foo without also destroying pool/foo/bar.

But, if pool/foo/bar is ALSO an ancestor (e.g. clone-of-a-snapshot) of pool/foo, then you cannot destroy pool/foo/bar without destroying pool/foo.

That's the situation that happens in the following sequence:

        zfs create testpool/testfs2
        zfs snapshot testpool/test...@snap1
        zfs clone testpool/test...@snap1 testpool/testfs2/clone1
        zfs promote testpool/testfs2/clone1

The 'clone' command creates a double-relationship: it created child dataset of testpool/testfs2 at the same time it created a child dataset of testpool/test...@snap1. And the snapshot is also a child dataset of testpool/testfs2.

Thus far, everything is OK. You can still destroy testpool/testfs2/clone1, because both the relationships to testpool/testfs2 is just in one direction: the latter is the parent of the former.

But, when the 'promote' command is used, it inverts *one* of those relationships without inverting the other.

In other words, testpool/testfs2 was now a child dataset of the snapshot testpool/test...@snap1 (and therefore a descendant of testpool/testfs2/clone1), *but* it was also the parent of testpool/testfs2/clone1 by virtue of its name.

So in the "namespace", testpool/testfs2 is still the parent of testpool/testfs2/clone1. But in the "clonespace", testpool/testfs2 has now become the CHILD of testpool/testfs2/clone1 through the testpool/test...@snap1 snapshot.

Then when you try to destroy them both with -R, you end up with the "recursive dependency" error message, otherwise known as CR 6622809.

See http://bugs.opensolaris.org/view_bug.do?bug_id=6622809


Regards,
markm
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to