Date: Wed, 1 Apr 2020 10:09:55 -0400 From: mike tancsa <mike@sentex.net> To: Martin Simmons <martin@lispworks.com> Cc: freebsd-fs@freebsd.org Subject: Re: zfs promote Message-ID: <42019eac-4211-8265-e73e-d3b418b870fe@sentex.net> In-Reply-To: <202004011102.031B2an5008896@higson.cam.lispworks.com> References: <c86e4b80-664d-1ebe-7f50-c59b3c78421d@sentex.net> <202004011102.031B2an5008896@higson.cam.lispworks.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 4/1/2020 7:02 AM, Martin Simmons wrote: >>>>>> 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)? We use zrepl to manage replication / backups. It keeps a defined amount of local snapshots (a days worth), but has much more on the remote server. As this file system changes a lot, I dont want to eatup local fast storage by keeping an increasingly older and divergent snapshot around on the main file server. > > Were you intending to keep both nfs3zroot/cyclenet and nfs3zroot/cyclenetlive? No, just nfs3zroot/cyclenetlive Now, I cannot delete those old snapshots. > Why do you want to delete the old snapshots? Is that multiple snapshots or > just @clean3? The file system will diverge significantly over time from that original snapshot and will take up more and more space which I dont want locally. > 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 ? 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 ? So if promote reverses that, so nfs3zroot/cyclenet@clean3 becomes a clone of nfs3zroot/cyclenetlive ? so I can then delete nfs3zroot/cyclenet@clean3 ? > > >> 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. Thank you for the help! ---Mike > > __Martin >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42019eac-4211-8265-e73e-d3b418b870fe>