From owner-freebsd-fs@freebsd.org Wed Apr 1 19:30:59 2020 Return-Path: Delivered-To: freebsd-fs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1057627EC5F for ; Wed, 1 Apr 2020 19:30:59 +0000 (UTC) (envelope-from mike@sentex.net) Received: from pyroxene2a.sentex.ca (pyroxene19.sentex.ca [IPv6:2607:f3e0:0:3::19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "pyroxene.sentex.ca", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48sxBC0FHDz3LmQ for ; Wed, 1 Apr 2020 19:30:42 +0000 (UTC) (envelope-from mike@sentex.net) Received: from [IPv6:2607:f3e0:0:4:2ca4:3b08:a9aa:a9d4] ([IPv6:2607:f3e0:0:4:2ca4:3b08:a9aa:a9d4]) by pyroxene2a.sentex.ca (8.15.2/8.15.2) with ESMTPS id 031JUXIR028134 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Wed, 1 Apr 2020 15:30:33 -0400 (EDT) (envelope-from mike@sentex.net) Subject: Re: zfs promote To: Martin Simmons Cc: freebsd-fs@freebsd.org References: <202004011102.031B2an5008896@higson.cam.lispworks.com> <42019eac-4211-8265-e73e-d3b418b870fe@sentex.net> <202004011647.031GlHqa011166@higson.cam.lispworks.com> From: mike tancsa Autocrypt: addr=mike@sentex.net; keydata= mQENBFywzOMBCACoNFpwi5MeyEREiCeHtbm6pZJI/HnO+wXdCAWtZkS49weOoVyUj5BEXRZP xflV2ib2hflX4nXqhenaNiia4iaZ9ft3I1ebd7GEbGnsWCvAnob5MvDZyStDAuRxPJK1ya/s +6rOvr+eQiXYNVvfBhrCfrtR/esSkitBGxhUkBjOti8QwzD71J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CXT0aY6hs4SbWeVOEFl5WrMgFAlywzOQCGwwFCQHhM4AACgkQeVOE Fl5WrMhmjQf/dBCjAVn1J0GzSsHiLvSAQz1cchbdy8LD0Tnpzjgp5KLU7sNojbI8vqt4yKAi cayI88j8+xxNXPMWM4pHELuUuVHS5XTpHa/wwulUtI5w/zyKlUDsIvqTPZLUEwH7DfNBueVM WyNaIjV2kxSmM8rNMC+RkgyfbjGLCkmWsMRVuLIUYpl5D9WHmenUbiErlKU2KvEEXEg/aLKq 3m/AdM9RAYsP9O4l+sAZEfyYoNJzDhTZMzn/9Q0uFPLK9smDQh4WBTFaApveVJPHRKmHPoNF Xxj+yScYdQ4SKH34WnhNSELvnZQ3ulH5tpASmm0w+GxfZqSc8+QCwoKtBRDUxoE56A== Message-ID: Date: Wed, 1 Apr 2020 15:30:33 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <202004011647.031GlHqa011166@higson.cam.lispworks.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 48sxBC0FHDz3LmQ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@sentex.net designates 2607:f3e0:0:3::19 as permitted sender) smtp.mailfrom=mike@sentex.net X-Spamd-Result: default: False [-2.71 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sentex.net]; HFILTER_HELO_IP_A(1.00)[pyroxene2a.sentex.ca]; HFILTER_HELO_NORES_A_OR_MX(0.30)[pyroxene2a.sentex.ca]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(-1.71)[ipnet: 2607:f3e0::/32(-4.92), asn: 11647(-3.53), country: CA(-0.09)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11647, ipnet:2607:f3e0::/32, country:CA]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2020 19:31:00 -0000 On 4/1/2020 12:47 PM, Martin Simmons wrote: > > 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. OK, I think I clarified things for myself with a minimal example of how it works how I got to the place I am at, and what the end result is 0(cage)# zfs create test1/base 0(cage)# touch /test1/base/first-file-on-base 0(cage)# touch /test1/base/second-file-on-base     0(cage)# zfs snapshot test1/base@clean 0(cage)# touch /test1/base/file-that-only-exists-on-base-and-not-clone 0(cage)# zfs clone test1/base@clean test1/clone-of-base 0(cage)# touch /test1/clone-of-base/file-only-on-clone 0(cage)# ls -l /test1/base/ total 6 drwxr-xr-x   2 root  wheel  uarch  5 Apr  1 15:26 . drwxrwxrwx  14 root  wheel  uarch 21 Apr  1 15:26 .. -rw-r--r--   1 root  wheel  uarch  0 Apr  1 15:26 file-that-only-exists-on-base-and-not-clone -rw-r--r--   1 root  wheel  uarch  0 Apr  1 15:25 first-file-on-base -rw-r--r--   1 root  wheel  uarch  0 Apr  1 15:26 second-file-on-base 0(cage)# ls -l /test1/clone-of-base/ total 4 drwxr-xr-x   2 root  wheel  uarch  5 Apr  1 15:26 . drwxrwxrwx  14 root  wheel  uarch 21 Apr  1 15:26 .. -rw-r--r--   1 root  wheel  uarch  0 Apr  1 15:26 file-only-on-clone -rw-r--r--   1 root  wheel  uarch  0 Apr  1 15:25 first-file-on-base -rw-r--r--   1 root  wheel  uarch  0 Apr  1 15:26 second-file-on-base 0(cage)# zfs list -t snapshot | grep clean test1/base@clean                                 19.4K      -  34.4K  - 0(cage)# zfs promote test1/clone-of-base 0(cage)# zfs list -t snapshot | grep clean test1/clone-of-base@clean                        20.9K      -  34.4K  - 0(cage)# zfs destroy -r test1/base 0(cage)# ls -l /test1/clone-of-base/ total 4 drwxr-xr-x   2 root  wheel  uarch  5 Apr  1 15:26 . drwxrwxrwx  13 root  wheel  uarch 20 Apr  1 15:27 .. -rw-r--r--   1 root  wheel  uarch  0 Apr  1 15:26 file-only-on-clone -rw-r--r--   1 root  wheel  uarch  0 Apr  1 15:25 first-file-on-base -rw-r--r--   1 root  wheel  uarch  0 Apr  1 15:26 second-file-on-base 0(cage)# zfs destroy test1/clone-of-base@clean 0(cage)# ls -l /test1/clone-of-base/ total 4 drwxr-xr-x   2 root  wheel  uarch  5 Apr  1 15:26 . drwxrwxrwx  13 root  wheel  uarch 20 Apr  1 15:27 .. -rw-r--r--   1 root  wheel  uarch  0 Apr  1 15:26 file-only-on-clone -rw-r--r--   1 root  wheel  uarch  0 Apr  1 15:25 first-file-on-base -rw-r--r--   1 root  wheel  uarch  0 Apr  1 15:26 second-file-on-base 0(cage)# Thanks for helping me work this through. I will do a zfs send|zfs recv onto another pool to be on the safe side, but I think I know what I need to do now!     ---Mike