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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • 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. How to create a zone in solaris 11
  2. Solaris 11.3 – Changing from iSCSI SendTargets Discovery to Static Discovery
  3. How to Kill Zombie (Defunct) Process in Solaris
  4. Solaris 11 : How to verify whether I’m logged into a Kernel Zone?
  5. A beginners guide to Solaris Multipathing Software (MPxIO or STMS)
  6. Solaris : How to unconfigure and configure a cpu/memory board using cfgadm
  7. How to add and set new locale in solaris
  8. A beginners guide to Service Management Facility (SMF) in Solaris
  9. 17 Examples of using Solaris boot command
  10. Solaris : How to run savecore manually while booted in single user from CDROM

You May Also Like

Primary Sidebar

Recent Posts

  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found
  • macof: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright