Date: Wed, 1 Apr 2020 17:47:17 +0100 From: Martin Simmons <martin@lispworks.com> To: mike tancsa <mike@sentex.net> Cc: freebsd-fs@freebsd.org Subject: Re: zfs promote Message-ID: <202004011647.031GlHqa011166@higson.cam.lispworks.com> In-Reply-To: <42019eac-4211-8265-e73e-d3b418b870fe@sentex.net> (message from mike tancsa on Wed, 1 Apr 2020 10:09:55 -0400) References: <c86e4b80-664d-1ebe-7f50-c59b3c78421d@sentex.net> <202004011102.031B2an5008896@higson.cam.lispworks.com> <42019eac-4211-8265-e73e-d3b418b870fe@sentex.net>
next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> On Wed, 1 Apr 2020 10:09:55 -0400, mike tancsa said: > > On 4/1/2020 7:02 AM, Martin Simmons wrote: > > > > Were you intending to keep both nfs3zroot/cyclenet and nfs3zroot/cyclenetlive? > > No, just nfs3zroot/cyclenetlive OK, that simplifies things. > > 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. > > Hmm, I am trying to get my head around this. I should first simulate > this in a test environment of course. What you wrote however seems > reversed, but perhaps my perspective is backwards to what is written ? Yes, promote is a snapshot twister :-) > ie Originally I did a > > > zfs clone nfs3zroot/cyclenet@clean3 nfs3zroot/cyclenetlive > > so I read that as I made a clone called cyclenetlive of the snapshot > nfs3zroot/cyclenet@clean3 ? Correct. I.e. before promote, nfs3zroot/cyclenet and nfs3zroot/cyclenetlive share data with the @clean3 snapshot of nfs3zroot/cyclenet: nfs3zroot/cyclenet@clean3 ^ ^ | | | nfs3zroot/cyclenetlive | nfs3zroot/cyclenet > So if promote reverses that, so > nfs3zroot/cyclenet@clean3 becomes a clone of nfs3zroot/cyclenetlive ? > so I can then delete nfs3zroot/cyclenet@clean3 ? No, that is confused, at least in the names of things: nfs3zroot/cyclenet@clean3 is a snapshot so it cannot itself be a clone. What happens is that the @clean3 snapshot is transferred from nfs3zroot/cyclenet to nfs3zroot/cyclenetlive, so it now called nfs3zroot/cyclenetlive@clean3. ("The snapshot that was cloned, and any snapshots previous to this snapshot, are now owned by the promoted clone.") In addition, nfs3zroot/cyclenet ("the origin file system") becomes a clone of nfs3zroot/cyclenetlive ("the specified file system"), joined at the transferred @clean3 snapshot. I.e. after promote, nfs3zroot/cyclenet and nfs3zroot/cyclenetlive share data with the @clean3 snapshot of nfs3zroot/cyclenetlive: nfs3zroot/cyclenetlive@clean3 ^ ^ | | | nfs3zroot/cyclenet | nfs3zroot/cyclenetlive That is why you would then need to destroy nfs3zroot/cyclenet before you can destroy nfs3zroot/cyclenetlive@clean3. __Martin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004011647.031GlHqa011166>