From owner-freebsd-current@freebsd.org Mon Mar 30 23:53:40 2020 Return-Path: Delivered-To: freebsd-current@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 E20E326B1F4 for ; Mon, 30 Mar 2020 23:53:40 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48rq6M1SLlz4005 for ; Mon, 30 Mar 2020 23:53:30 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Received: by mail-wm1-x335.google.com with SMTP id i19so713494wmb.0 for ; Mon, 30 Mar 2020 16:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=7vGRF/SfSMLHhxqDGYlZXfozOT6t4oZi/F5aMAWn0HQ=; b=tXFSz3TrAY+osqAJGvlB5LD9yNIZpS5BSXTElGBTqTT3iWJy0P0py2Uji14+x8K3+V /nNZRI47YmntGPII11lBIPOy+0WbyUXBMO2NVb0GpNu+KtFkTckfXJMElRypAf/ZB1gg iZwxu7/i1WNRIeh4DqZfdPmzNHAns9VmC4rEaOCyYdh6uTT1zUM4LYR3WUH9ZW+AvzNb h0Ey7J56r2LfvG/86Jj3IhsL2pd1BQb5ipKdaNCfMF6TY6F09M2WQ/9O/YEYncYYAa0L XpJ8xeE246Tu+f7Mi1utRKYPOTQAJjctKvb0A2xqBYAiPtAsUMefJOXEolYYHf3xoePq 1YMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=7vGRF/SfSMLHhxqDGYlZXfozOT6t4oZi/F5aMAWn0HQ=; b=bv0lY3fc0VpQMnU2Toc3h6ZV0rC/oy6ZydewpbMYqSrtjtz3w1daZknVFdS9SBHp/k cWvfZKReEDj2C7si4aunfD57IKLn1C/tQAOmL/INUZrrV/FxOSHvIDAMwQ6dL6+0TwXm mSOTc5G0PZyh5Mj+eGFHtgSnm5e7kxU4ZapTzhYOXHpzfKGXSrD7aBSYFdZqvO9OoCqi 0Nhynvb6ex1M9+P19fzrEE0Ew0DAxep5KPrwNSnB3lkWx4lfRaiHtqO9wt5cSuRcZgki j+pfRrcKiF1HOohQ+MfXPz0/U+CTsFGfbIVvCzpc3iMbLESWS3CKL3nA9togu5xXj48z kBOQ== X-Gm-Message-State: ANhLgQ0cDTgBvUWk0S27nvbSa6sZJoqUFG6NugJSTP/fpbm9wpDjWBV2 wcEk27mPKD+NXuFsvK6Ap2YOb/3qn54= X-Google-Smtp-Source: ADFU+vuaMBcP5P/43ReGtIpxHslv2mIXNApVUFqZycxtS5TElDygRBfZQuCinqxeDfqMAyyPmMkg0A== X-Received: by 2002:a7b:cd07:: with SMTP id f7mr567457wmj.30.1585612399737; Mon, 30 Mar 2020 16:53:19 -0700 (PDT) Received: from [192.168.1.7] (79-66-147-78.dynamic.dsl.as9105.com. [79.66.147.78]) by smtp.gmail.com with ESMTPSA id 5sm21670568wrs.20.2020.03.30.16.53.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Mar 2020 16:53:18 -0700 (PDT) Subject: ZFS: OpenZFS: lost the ability to boot a BE From: Graham Perrin To: freebsd-current@freebsd.org References: <14266e74-e2cc-ec14-187a-4bc9c9e6c32a@gmail.com> <1c2b71fa-b25c-21d4-2115-ddb3d7b129b2@freebsd.org> <01524fd0-ae7b-028b-6259-5da485b48886@gmail.com> <0f19e79c-a809-c04b-4f36-8752f756f954@gmail.com> Message-ID: <250de133-ad5e-6145-66cb-8b0383a4b8f0@gmail.com> Date: Tue, 31 Mar 2020 00:53:17 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <0f19e79c-a809-c04b-4f36-8752f756f954@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 48rq6M1SLlz4005 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=tXFSz3Tr; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of grahamperrin@gmail.com designates 2a00:1450:4864:20::335 as permitted sender) smtp.mailfrom=grahamperrin@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RECEIVED_SPAMHAUS_PBL(0.00)[78.147.66.79.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(0.00)[ip: (-8.95), ipnet: 2a00:1450::/32(-2.37), asn: 15169(-0.45), country: US(-0.05)]; RCVD_IN_DNSWL_NONE(0.00)[5.3.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 23:53:41 -0000 On 30/03/2020 19:47, Graham Perrin wrote: > I lost the ability to boot the environment named 'r357746', I suspect > this occurred after I set it to use OpenZFS in lieu of ZFS. > > I would like to edit its /boot/loader.conf (revert to zfs_load="YES") > but re: https://github.com/openzfs/zfs/issues/4553 I can not think of > a way to mount the dataset. > > Please, how can I proceed? Whilst booted from a different environment, I mounted the dataset whilst in single user mode, edited /boot/loader.conf … a little tricky, because after the mount I could no longer use zfs commands (ZFS library initialisation failed, words to that effect). Then beadm to activate the BE, and shutdown -r now Success :-) With zfs_load="YES" (in lieu of openzfs_load="YES") the BE is usable. > ---- > > Re: ZFS: destroying snapshots without compromising boot environments > > On 28/03/2020 15:36, Graham Perrin wrote: >> On 28/03/2020 15:19, Allan Jude wrote: >> >> > You can try to destroy the snapshot, if it is the basis of a clone, >> then >> > you will get an error, that you'd need to destroy the BE first, so you >> > might decide to keep that snapshot. As long as you don't use the -R >> flag >> > to zfs destroy dataset@snapshot, it will not destroy the clones. >> > >> > You can also use 'zfs promote' to make the clone into the parent, >> making >> > the original parent into the clone. This allows you to destroy that >> > original and the snapshot while keeping the clone. >> >> Perfect, thank you. I was nervous about destruction without warning. >> >> Below, are the differences (in measurement) between beadm and bectl >> to be expected? >> >> ---- >> >> root@momh167-gjp4-8570p:~ # beadm list >> BE       Active Mountpoint  Space Created >> Waterfox -      -           15.9G 2020-03-10 18:24 >> r357746f -      -            1.3G 2020-03-20 06:19 >> r359249b NR     /           74.7G 2020-03-28 01:19 >> root@momh167-gjp4-8570p:~ # beadm list -aDs >> BE/Dataset/Snapshot                            Active Mountpoint >> Space Created >> >> Waterfox >>   copperbowl/ROOT/Waterfox                     -      - 137.0M >> 2020-03-10 18:24 >>     r359249b@2020-03-17-21:57:17               -      - 59.2G >> 2020-03-17 21:57 >>   copperbowl/ROOT/Waterfox@2020-03-20-06:19:45 -      - 67.0M >> 2020-03-20 06:19 >> >> r357746f >>   copperbowl/ROOT/r357746f                     -      - 1.2G >> 2020-03-20 06:19 >>     Waterfox@2020-03-20-06:19:45               -      - 59.2G >> 2020-03-20 06:19 >> >> r359249b >>   copperbowl/ROOT/r359249b@2020-03-17-21:57:17 -      - 15.7G >> 2020-03-17 21:57 >>   copperbowl/ROOT/r359249b                     NR     / 59.0G >> 2020-03-28 01:19 >> root@momh167-gjp4-8570p:~ # bectl list >> BE       Active Mountpoint Space Created >> Waterfox -      -          204M  2020-03-10 18:24 >> r357746f -      -          1.21G 2020-03-20 06:19 >> r359249b NR     /          74.7G 2020-03-28 01:19 >> root@momh167-gjp4-8570p:~ # bectl list -aDs >> BE/Dataset/Snapshot                              Active Mountpoint >> Space Created >> >> Waterfox >>   copperbowl/ROOT/Waterfox                       -      - 204M >> 2020-03-10 18:24 >>   Waterfox@2020-03-20-06:19:45                   -      - 67.0M >> 2020-03-20 06:19 >> >> r357746f >>   copperbowl/ROOT/r357746f                       -      - 1.21G >> 2020-03-20 06:19 >> >> r359249b >>   copperbowl/ROOT/r359249b                       NR     / 74.7G >> 2020-03-28 01:19 >>   r359249b@2020-03-17-21:57:17                   -      - 15.7G >> 2020-03-17 21:57 >> root@momh167-gjp4-8570p:~ # zfs list -t snapshot >> NAME                                                     USED AVAIL  >> REFER  MOUNTPOINT >> copperbowl/ROOT/Waterfox@2020-03-20-06:19:45            67.0M - 59.2G  - >> copperbowl/ROOT/r359249b@2020-03-17-21:57:17            15.7G - 59.2G  - >> copperbowl/iocage/releases/12.0-RELEASE/root@jbrowsers     8K - 1.24G  - >> copperbowl/poudriere/jails/head@clean                    328K - 1.89G  - >> root@momh167-gjp4-8570p:~ # zfs destroy >> copperbowl/ROOT/r359249b@2020-03-17-21:57:17 >> cannot destroy 'copperbowl/ROOT/r359249b@2020-03-17-21:57:17': >> snapshot has dependent clones >> use '-R' to destroy the following datasets: >> copperbowl/ROOT/r357746f >> copperbowl/ROOT/Waterfox@2020-03-20-06:19:45 >> copperbowl/ROOT/Waterfox >> root@momh167-gjp4-8570p:~ # date ; uname -v >> Sat Mar 28 15:30:57 GMT 2020 >> FreeBSD 13.0-CURRENT #1 r359249: Tue Mar 24 00:12:27 GMT 2020 >> root@momh167-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG >> root@momh167-gjp4-8570p:~ # >>