My Oracle Support Banner

Understanding and Resolving "cannot destroy 'dataset@snapshot': snapshot has dependent clones" (Doc ID 1552965.1)

Last updated on OCTOBER 25, 2017

Applies to:

Solaris Operating System - Version 10 11/06 U3 and later
Oracle Solaris on SPARC (64-bit)
Oracle Solaris on x86 (32-bit)
Oracle Solaris on x86-64 (64-bit)

Symptoms

This document will use the following example list of ZFS dataset and snapshots:

# zfs list -r tank
NAME                         USED  AVAIL  REFER  MOUNTPOINT
tank                         680G   103G    31K  /tank
tank/export                 47.5K  1024M  47.5K  /export
tank/group-oracle           40.6G  29.4G  40.6G  /export/group/oracle
tank/group-sap                33K  10.0G    33K  /export/group/sap
tank/group-sw                194G   156G   194G  /export/software
tank/group-sw/sap            178G   156G  43.3G  /export/software/SAP.CLONED
tank/group-sw/sap@SAP1       135G      -   178G  -
tank/home                   8.01G  12.0G  8.01G  /export/home
tank/jumpstart              35.5G  9.48G  35.5G  /export/jumpstart
tank/sysadmin-download      24.7G  92.3G  24.7G  /export/sysadmin/download
tank/sysadmin-script        83.5M  4.92G  83.5M  /export/sysadmin/script
tank/sysadmin-sw            35.6G  24.4G  35.6G  /export/sysadmin/software
tank/sysadmin-zone_configs  1.24M  2.00G  1.24M  /export/sysadmin/zone_configs

The requirement is to delete the following two datasets:

tank/group-sw/sap            178G   145G    36K  /export/software/SAP.CLONED
tank/group-sw/sap@SAP1       178G      -   178G  -

- but NOT -

tank/group-sw                205G   145G   205G  /export/software

An initial attempt to delete the snapshot results in the following message:

# zfs destroy tank/group-sw/sap@SAP1
cannot destroy 'tank/group-sw/sap@SAP1': snapshot has dependent clones
use '-R' to destroy the following datasets:
tank/group-sw/sap
tank/group-sw
# zfs destroy -r tank/group-sw/sap
cannot destroy 'tank/group-sw/sap': filesystem has dependent clones
use '-R' to destroy the following datasets:
tank/group-sw
#

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.