From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iLypLxrzNWH1EQAAgWs5BA (envelope-from ) for ; Mon, 06 Sep 2021 12:53:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id CLCPKxrzNWEwUAAAbx9fmQ (envelope-from ) for ; Mon, 06 Sep 2021 10:53:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2769E12734 for ; Mon, 6 Sep 2021 12:53:14 +0200 (CEST) Received: from localhost ([::1]:59262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNCFU-0007qb-QC for larch@yhetil.org; Mon, 06 Sep 2021 06:53:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNCFK-0007pS-Qh for guix-patches@gnu.org; Mon, 06 Sep 2021 06:53:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNCFJ-0005EO-Qg for guix-patches@gnu.org; Mon, 06 Sep 2021 06:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNCFJ-0005K9-OO for guix-patches@gnu.org; Mon, 06 Sep 2021 06:53:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type. Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Sep 2021 10:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45692 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Xinglu Chen Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163092557820457 (code B ref 45692); Mon, 06 Sep 2021 10:53:01 +0000 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= 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: raid5atemyhomework X-ACL-Warn: , raid5atemyhomework via Guix-patches From: raid5atemyhomework via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630925594; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=KLaCTLUUj33Gwy6dkOsbZTG7+wZy0iXzPuAkmArHKu8=; b=gIzbeU/9nXggC7faP1M5dLVRgFxu5Ymu5pHekmnAdWWlAYp0AqkhArj0KJqAag0aMlOnnn BW+dT0bHNtWqsFfNYVb6Gqd84i5KY+pYRbnseJ2ubcBXUp1rF5679wDXjETw+FX4qhiuBk pgNpE9sSR1NBiYD7s2d1Ecs9Dp4ib2BTWtZScmLtELek8pWgcPZDroLtB4r4Hq/nDiEg6C AJDJMmcB6enL6EPTysIyswcoQUCvnuNI85XHyqKSJyuxO370b0xffUMDG7KpiW4cNizH1J wMgWYgz7IOrgWdUv+zKyUuEefjt+n65DU4BQoPL1t/bXUhGxSr+MH61VC+Y3jA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630925594; a=rsa-sha256; cv=none; b=CvtqtCZ9ixDr7gjPaz5n9j/YcXPJmDpDmSM4HGIohQSKLeu4PBIQJufM91ZwgVwb+djNHY Sy2dYsbQjRgDuRpkDqkByEA13mJ/vmZ3yEz7Ugc+xvjnFfqomHIMtXY3Fsy784VY8zOZ74 ENmRy6Gf9MckXoQRQRzyYNE4wrNMrRjVWUC7UY+/ekNSlanLhLruqd1Z3qbzsB97wZSlX3 ElGbhdIIS3+8LE0DOxrJ3l5tcooq6tadN2Ha4e5jrGFm4GS8e3LAtNYo4AH8cmYeKg/V08 1zHsGyeZNg0/TsRZFO6cXTNpUR794+lCV3HeFXlJ9UMQGndI79omApuuVjKUTw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b=kB8by9wA; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.91 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b=kB8by9wA; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 2769E12734 X-Spam-Score: -2.91 X-Migadu-Scanner: scn1.migadu.com X-TUID: x91lfXhIId3W 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