Project

General

Profile

Actions

Bug #2957

closed

zfs destroy -R/r sometimes fails when removing defer-destroyed snapshot

Added by Christopher Siden almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2012-07-02
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

The problem is that when iterating datasets to delete we have to destroy the clones of the snapshot before destroying the snapshot, but once the clones are all destroyed the kernel will already have destroyed the snapshot, causing libzfs to fail with a very confusing error message:

$ sudo zfs create rpool/test
$ sudo zfs snapshot rpool/test@snap
$ sudo zfs clone rpool/test@snap rpool/clone
$ sudo zfs destroy -d rpool/test@snap
$ sudo zfs destroy -R rpool/test
cannot destroy 'rpool/test@snap': dataset does not exist

A test case for this has been added to the ZFS test suite as zpool_destroy_010_pos.

Actions #1

Updated by Eric Schrock almost 10 years ago

  • Status changed from In Progress to Resolved

changeset: 13749:df4cd82e2b60
tag: tip
user: Christopher Siden <>
date: Thu Jul 12 05:32:45 2012 -0700

description:
1796 "ZFS HOLD" should not be used when doing "ZFS SEND" from a read-only pool
2871 support for __ZFS_POOL_RESTRICT used by ZFS test suite
2903 zfs destroy -d does not work
2957 zfs destroy -R/r sometimes fails when removing defer-destroyed snapshot
Reviewed by: Matthew Ahrens <>
Reviewed by: George Wilson <>
Approved by: Eric Schrock <

Actions

Also available in: Atom PDF