zfs destroy parent of clone

i clone one dataset (tank/a to tank/b) with zfs

and now i want to delete only parent (tank/a)

i wont to have only tank/b now

how to do it?

5 points · 3 comments · view on lemmy.world

3 Comments

thomas@lemmy.douwes.co.uk · 2 pts · 3y (2 replies)

I believe the way to do this is to promote the clone dataset using the zfs promote command

vonProteus@lemmy.ml · 1 pts · 3y (1 reply)

thx for sugestion

looks very promising src

# zfs create pool/project/production
  populate /pool/project/production with data
# zfs snapshot pool/project/production@today
# zfs clone pool/project/production@today pool/project/beta
  make changes to /pool/project/beta and test them
# zfs promote pool/project/beta
# zfs rename pool/project/production pool/project/legacy
# zfs rename pool/project/beta pool/project/production
  once the legacy version is no longer needed, it can be destroyed
# zfs destroy pool/project/legacy

not tested yet

vonProteus@lemmy.ml · 1 pts · 1y

worked as a charm exactly what I wanted