Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Apr 2020 12:02:36 +0100
From:      Martin Simmons <martin@lispworks.com>
To:        mike tancsa <mike@sentex.net>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: zfs promote
Message-ID:  <202004011102.031B2an5008896@higson.cam.lispworks.com>
In-Reply-To: <c86e4b80-664d-1ebe-7f50-c59b3c78421d@sentex.net> (message from mike tancsa on Tue, 31 Mar 2020 15:32:53 -0400)
References:  <c86e4b80-664d-1ebe-7f50-c59b3c78421d@sentex.net>

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> On Tue, 31 Mar 2020 15:32:53 -0400, mike tancsa said:
> 
> Hi,
> 
>     While doing some VM tests, I was making heavy use of clones from my
> zfs server.  (clones are a super cool handy feature!)... However, when
> we went live, I accidentally used a clone as the production file
> system.

I suggest giving some more details about your end goal.

What was the intended file system structure (i.e. if you had not used a
clone)?

Were you intending to keep both nfs3zroot/cyclenet and nfs3zroot/cyclenetlive?

If so, did you want them to be completely separate, without any sharing of
space?


>          Now, I cannot delete those old snapshots.

Why do you want to delete the old snapshots?  Is that multiple snapshots or
just @clean3?


>                                                     It seems zfs promote
> is what I want, but I just want to make sure it will fully work the way
> I want it to.
> 
> The history I did was
> 
> zfs snapshot nfs3zroot/cyclenet@clean3
> zfs clone nfs3zroot/cyclenet@clean3 nfs3zroot/cyclenetlive
> zfs set mountpoint=/cyclenet/live nfs3zroot/cyclenetlive
> 
> If I do a zfs promote nfs3zroot/cyclenetlive
> 
> I can then do a zfs destroy nfs3zroot/cyclenet@clean3 safely right ?
> i.e. nfs3zroot/cyclenetlive will then not have any historical dependencies ?

Not quite.  Beware this from the documentation:

"The clone parent-child dependency relationship is reversed, so that the
origin file system becomes a clone of the specified file system."

and

"The snapshot that was cloned, and any snapshots previous to this snapshot,
are now owned by the promoted clone."

Therefore doing zfs promote nfs3zroot/cyclenetlive will cause
nfs3zroot/cyclenet to become a clone of nfs3zroot/cyclenetlive@clean3.  If you
then want to destroy nfs3zroot/cyclenetlive@clean3, you will first need to
destroy nfs3zroot/cyclenet.


> Also, how much impact on the disk IO will the promote command have ? Is
> it long like a scrub, or quick like a snapshot ?

It is much more like a snapshot than a scrub.

__Martin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004011102.031B2an5008896>