Skip to content

Instantly share code, notes, and snippets.

@dlangille dlangille/testing change
Last active Nov 26, 2019

Embed
What would you like to do?
I have clones that I want to promote to real filesystems
My goals:
* data01/testing/dev-pgeu becomes a non-clone
* keep data01/testing/12.0-RELEASE
* remove snapshot data01/testing/12.0-RELEASE@dev-pgeu
[dan@r720-01:~] $ sudo zfs create data01/testing
[dan@r720-01:~] $ sudo zfs create data01/testing/12.0-RELEASE
[dan@r720-01:~] $ sudo zfs snapshot data01/testing/12.0-RELEASE@dev-pgeu
[dan@r720-01:~] $ sudo zfs clone data01/testing/12.0-RELEASE@dev-pgeu data01/testing/dev-pgeu
[dan@r720-01:~] $ zfs list -r data01/testing
NAME USED AVAIL REFER MOUNTPOINT
data01/testing 176K 1.18T 88K /data01/testing
data01/testing/12.0-RELEASE 88K 1.18T 88K /data01/testing/12.0-RELEASE
data01/testing/dev-pgeu 0 1.18T 88K /data01/testing/dev-pgeu
[dan@r720-01:~] $
[dan@r720-01:~] $ zfs list -r -t snapshot data01/testing
NAME USED AVAIL REFER MOUNTPOINT
data01/testing/12.0-RELEASE@dev-pgeu 0 - 88K -
[dan@r720-01:~] $ sudo zfs destroy data01/testing/12.0-RELEASE@dev-pgeu
cannot destroy 'data01/testing/12.0-RELEASE@dev-pgeu': snapshot has dependent clones
use '-R' to destroy the following datasets:
data01/testing/dev-pgeu
[dan@r720-01:~] $
[dan@r720-01:~] $ sudo zfs promote data01/testing/dev-pgeu
[dan@r720-01:~] $ zfs list -r -t snapshot data01/testing
NAME USED AVAIL REFER MOUNTPOINT
data01/testing/dev-pgeu@dev-pgeu 0 - 88K -
[dan@r720-01:~] $
[dan@r720-01:~] $ sudo zfs destroy data01/testing/dev-pgeu@dev-pgeu
cannot destroy 'data01/testing/dev-pgeu@dev-pgeu': snapshot has dependent clones
use '-R' to destroy the following datasets:
data01/testing/12.0-RELEASE
[dan@r720-01:~] $
How can I get rid of that snapshot without destroying data01/testing/12.0-RELEASE?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.