Page 1 of 1

Destroy root without destroying child filesystems

PostPosted: Fri Nov 18, 2022 6:52 pm
by thePoet
There is a long story about how I got here that isn't worth going into, but the root of my pool is currently a clone pointing to a shared snapshot of another filesystem. Here is the layout:

Code: Select all
NAME                              USED  AVAIL     REFER  MOUNTPOINT
pool                             4.95T   370G      297M  /Volumes/pool
pool/Starbug                     4.95T   370G     4.82T  /Volumes/Starbug


To prove this:

Code: Select all
$ zfs get origin
NAME                                PROPERTY  VALUE                          SOURCE
pool                                origin    pool/Starbug@clone_dependency  -
pool/Starbug                        origin    -                              -


I'm afraid what I'm going to ask may not be possible. At this point I don't want the files to exist in root and I'd like to destroy the snapshot. If this were a normal filesystem and not root I could destroy it, but I don't think there is a way to do that to the root. Is there some way of reseting root so that it is no longer a clone of the snapshot?

Re: Destroy root without destroying child filesystems

PostPosted: Sat Nov 19, 2022 1:49 pm
by lundman
You promote it?

"zfs promote pool"

Re: Destroy root without destroying child filesystems

PostPosted: Sat Nov 19, 2022 7:17 pm
by thePoet
This just inverts it back to the way it was with pool/Starbug now being a clone instead of pool. It still isn't possible to destroy the contents of pool itself and the cloned snapshot while leaving pool/Starbug to be an unaffected standalone filesystem.