• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ZFS destroy error “cannot determine dependent datasets: recursive dependency”

By admin

Problem

In the following case, the origin of clone (datapool/ds1) is a snapshot of its descendant (datapool/ds1/ds2).

# zfs get -r origin datapool
NAME                PROPERTY  VALUE               SOURCE
datapool/ds1           origin    datapool/ds1/ds2@snap  -
datapool/ds1/ds2       origin    -                   -
datapool/ds1/ds2@snap  origin    -                   -

To destroy datapool/ds1/ds2, its snapshot datapool/ds1/ds2@snap needs to be destroyed.
To destroy datapool/ds1/ds2@snap, its dependent clone datapool/ds1 needs to be destroyed.
To destory datapool/ds1, its child filesystem datapool/ds1/ds2 needs to be destroyed.

Therefore, due to the recursive dependency, none of dataset/clone/snapshot under datapool/ds1 can be destroyed.

# zfs destroy -R datapool/ds1
cannot determine dependent datasets: recursive dependency at 'datapool/ds1'

Solution

This recursive dependency occurs when a clone which is a child of the origin’s parent was promoted like this.

# zfs create mpool/ds1
# zfs snap mpool/ds1@snap
# zfs clone mpool/ds1@snap mpool/ds1/ds2
# zfs promote mpool/ds1/ds2

Either of the following will resolve the recursive dependency.

1. Promote the clone

# zfs promote mpool/ds1
# zfs get -r origin mpool
NAME            PROPERTY  VALUE           SOURCE
mpool/ds1       origin    -               -
mpool/ds1@snap  origin    -               -
mpool/ds1/ds2   origin    mpool/ds1@snap  -

2. Rename the child dataset to a name which is not a child of the clone

# zfs rename mpool/ds1/ds2 mpool/tmp
# zfs get -r origin mpool
NAME            PROPERTY  VALUE           SOURCE
mpool/ds1       origin    mpool/tmp@snap  -
mpool/tmp       origin    -               -
mpool/tmp@snap  origin    -               -

Filed Under: Solaris, Solaris 11

Some more articles you might also be interested in …

  1. Oracle Solaris 11 Zones : New Features
  2. How To Read And Clear SCSI Reservations in Solaris 11 (sg3_utils)
  3. Solaris : How to unconfigure and configure a cpu/memory board using cfgadm
  4. How to configure passwordless ssh in Solaris
  5. A beginners guide to Veritas Dynamic Multipathing (VxDMP)
  6. How to provide unique hostid for a non global zone
  7. How to add swap file in Solaris
  8. How to identify the boot device (primary and alternate) in Solaris
  9. How to make telnet listen to a different port in Solaris
  10. How to enable XDMCP in GNOME Display Manager (gdm) for Solaris 10,11

You May Also Like

Primary Sidebar

Recent Posts

  • Oracle Database – Configuring Secure Application Roles
  • Extend rule sets by using factors in Oracle Database Vault
  • What are Command Rules in oracle Database
  • Using Rule Sets in Oracle Database Vault
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary