From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 06 06:52:58 2021 Received: (at 45692) by debbugs.gnu.org; 6 Sep 2021 10:52:58 +0000 Received: from localhost ([127.0.0.1]:52092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNCFG-0005Js-Ge for submit@debbugs.gnu.org; Mon, 06 Sep 2021 06:52:58 -0400 Received: from mail-4324.protonmail.ch ([185.70.43.24]:32995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNCFE-0005Jc-D8 for 45692@debbugs.gnu.org; Mon, 06 Sep 2021 06:52:57 -0400 Date: Mon, 06 Sep 2021 10:52:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1630925569; bh=KLaCTLUUj33Gwy6dkOsbZTG7+wZy0iXzPuAkmArHKu8=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=kB8by9wAqYYwIfz1e2SvQU59upy8NRQfCtW9yf3tPOYN+JpelvlG5cv8GPFOgB7lE GX6tQiHtlpJ+25Oqm8WaqYXgKFBdvxqJJp82EnuH+0OOtab9423YiMOPFp62UXACFz hSuKryJdIxL+wMDe/hQVf4YQDof6ufAFtDKLwbaE= To: Xinglu Chen From: raid5atemyhomework Subject: Re: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type. Message-ID: In-Reply-To: <87k0jw3upm.fsf@yoctocell.xyz> References: <87k0jw3upm.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 45692 Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: raid5atemyhomework Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Xinglu Chen, Thank you for your interest. > You might want to bring up the topic of subsystem maintainers on the > guix-devel mailing list to get some more attention. Not personally interested. > > +The above will keep 8 @code{frequent} snapshots and 12 @code{hourly} s= napshots. > > +@code{daily}, @code{weekly}, and @code{monthly} snapshots will keep th= eir > > +defaults (31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly}). > > + > > +@end table > > +@end deftp > > IIUC, there is not way specify ZFS pools in the =E2=80=98file-systems= =E2=80=99 field of > an record. Does this mean that ZFS as the root file > system is not supported, and if so, is there a particular reason for > this? No, and as you saw, that requires some more work. In particular, older versions of this patchset included the ability to add = ZFS pools / datasets `file-system` objects, but the exact implementation wa= s objected to, with no suggestion for what alternative to use instead. Sin= ce I thought it was contentious, I removed it entirely instead. Note that ZFS-on-Root on Guix is even harder because of the need to put loa= ding in `initrd`, and a lot of coding as well, not just `file-system`s supp= ort. Given the sheer lack of review and etc etc, I am not encouraged to write mo= re code that will remain unreviewed and unmerged. Maybe if this gets merge= d as-is, I will, but otherwise, I don't see the point. > The field name usually just contains the package name, so =E2=80=98zfs= =E2=80=99 and > =E2=80=98zfs-auto-snapshot=E2=80=99 instead of =E2=80=98base-zfs=E2=80= =99 and =E2=80=98base-zfs-auto-snapshot=E2=80=99. The point is that the service does **NOT** use `base-zfs` directly --- it c= reates a new version of that package, targeted towards the specific kernel = you provided. This is necessary since internal kernel APIs and ABIs may ch= ange between versions, even minor v=3D=3Dersions (Linux has no commitment t= o keeping kernel interfaces stable, it only has a commitment to keeping use= rspace interfaces stable, and OpenZFS **requires** the kernel interfaces, s= o it is safest to compile specifically to the kernel version that is used). Thus the ***`base-`*** prefixes: the `zfs-service-type` does not use the `b= ase-zfs` and `base-zfs-autosnapshot` packages as-is, they are instead used = as the basis for the actual packages that are compiled and installed into t= he system. I thought this would be sufficiently different from other servi= ces, which use package names as-is (but use the packages as-is, without inh= eriting from them, unlike this service) that the `base-` prefix was justifi= ed. > > - ;; Output to current-error-port, otherwise the > > > > > > - ;; user will not see any prompts for passwords > > > > > > - ;; of encrypted datasets. > > > > > > - ;; XXX Maybe better to explicitly open /dev/con= sole ? > > > > > > Seeing this comment, I assume that encrypted pools are supported, right? Encrypted datasets are supported, yes. If you set `keylocation=3Dprompt` t= hen the `init` process will pause and ask for the password on the console. = You can even use `keylocation=3Dfile:///some/keyfile`, I also tested that = in a VM. My own production setup (which doesn't use this service, but incl= udes some code copy-pasted from this service) uses `keylocation=3Dfile:///*= elided*`. > > - '(frequent hourly daily weekly monthly)))) > > > > > > Maybe use something like > > (map first %default-auto-snapshot-keep) > > to avoid having to changing it if things change in the future. Good idea, thank you. Thanks raid5atemyhomework