From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UG+VKFQkNmGDbAAAgWs5BA (envelope-from ) for ; Mon, 06 Sep 2021 16:23:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id IKgTJFQkNmEbZgAAbx9fmQ (envelope-from ) for ; Mon, 06 Sep 2021 14:23:16 +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 C7163130E4 for ; Mon, 6 Sep 2021 16:23:15 +0200 (CEST) Received: from localhost ([::1]:60212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNFWk-0007tR-QH for larch@yhetil.org; Mon, 06 Sep 2021 10:23:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNFWd-0007t2-0z for guix-patches@gnu.org; Mon, 06 Sep 2021 10:23:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42655) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNFWY-0001Z5-FW for guix-patches@gnu.org; Mon, 06 Sep 2021 10:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNFWY-0005Aw-BN for guix-patches@gnu.org; Mon, 06 Sep 2021 10:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Sep 2021 14:23:02 +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: raid5atemyhomework Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163093814719841 (code B ref 45692); Mon, 06 Sep 2021 14:23:02 +0000 Received: (at 45692) by debbugs.gnu.org; 6 Sep 2021 14:22:27 +0000 Received: from localhost ([127.0.0.1]:54201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNFVy-00059x-Lx for submit@debbugs.gnu.org; Mon, 06 Sep 2021 10:22:27 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:40492 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNFVw-00059j-5R for 45692@debbugs.gnu.org; Mon, 06 Sep 2021 10:22:25 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1630938136; bh=1y1QYsTC9XJWOI9m6obsA7ufb2CPRb79SgVac9qBUxM=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=hTgcZgOJs4lW5U+HtSzx9joT+byC7HrT14rthFfUjE2HsjZ3yRsYjmLB4rgtX9Zeo JO4fkc9SUei37nXa0gLChRlDBPEX5geCDn8ItZZUGePeKS3589TXyIUaJWRPJ6Rfrd dEwiLvv9gSlsnK40O2h/cuwhWPmKenmbIK0tkHR8= In-Reply-To: References: <87k0jw3upm.fsf@yoctocell.xyz> Date: Mon, 06 Sep 2021 16:22:15 +0200 Message-ID: <87a6kp238o.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630938196; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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=7o2ywLcH+Xte5EkcJht3THImNUeyN+eUG3cnoJ43WcU=; b=D+D1uTA3D939eL6oLr92IKJelhfSggESLbgaiSGEtzpqphyZBmpdhcrLqbNuUH63pSbhBY 4qfCPP09P6r7IY9+FksFiq7b7r3s0FICqB3BxPWQ9hrdXhJlePTayKG4CDNHLDu6uiE1+z TpchqTh02fNDhoSFKbKxyF6aZLXxNmOvwphaqNLrcG4lO+g3MQ5DCtfw1g6yyr3ghfLr9E gZjQw6z9/rGqnlK/3lfhvV4P4nt2lO7JBME4iWI16jxNrpFTfRcFWY1tTL4EL/HQQkHaS/ 3xbGoewgsx2YauTlZSjgFkhmBgKl2RqYpKVfvWm/SYjSCG7SXhoAnIPA/++TMg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630938196; a=rsa-sha256; cv=none; b=jxwTsuyS/PM3Czs3ymlHE5VqM4noEH8rmYri1BaF1m9/zVmQlWMtc81Tt767HF2whW0hrt g8nRxwuc0cgMLN3odGlb847DBEQsLQNrBM3/TbRrYzs2tHdbC7PTXl6df7RdVQDPIAI+/P 8GhNnb18nHWes0pi6/twvCsQezBwQ4o5xUQq7jcsab+zzxshUgEhbWGPAQouVOhSUrXjWu K3J69bXsuizTSyzTj0LGb2dXL86cbfrxwnkQwFjSnu5LEOD/GcovjPo4JPeE1cPdzADJw8 t2bA2SMTV+aKADTa5PgHtzUozWosf38xgq8my2kViAOf135x0zQLf7YI0FXWsw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=hTgcZgOJ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); 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: -3.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=hTgcZgOJ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); 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: C7163130E4 X-Spam-Score: -3.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: VUhISG3bz2or --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Sep 06 2021, raid5atemyhomework via Guix-patches via wrote: > Hello Xinglu Chen, > > Thank you for your interest. You are welcome! Thank you for working on ZFS support! >> 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} = snapshots. >> > +@code{daily}, @code{weekly}, and @code{monthly} snapshots will keep t= heir >> > +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 was objected to, with no suggestion for what > alternative to use instead. Since 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 loading in `initrd`, and a lot of coding as well, not just > `file-system`s support. > > Given the sheer lack of review and etc etc, I am not encouraged to > write more code that will remain unreviewed and unmerged. Maybe if > this gets merged as-is, I will, but otherwise, I don't see the point. I understand your feeling; hopefully we can get the patch merged soon! :-) >> 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 creates a new version of that package, targeted towards the > specific kernel you provided. This is necessary since internal kernel > APIs and ABIs may change between versions, even minor v=3D=3Dersions > (Linux has no commitment to keeping kernel interfaces stable, it only > has a commitment to keeping userspace interfaces stable, and OpenZFS > **requires** the kernel interfaces, so 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 `base-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 the system. I thought this would be sufficiently > different from other services, which use package names as-is (but use > the packages as-is, without inheriting from them, unlike this service) > that the `base-` prefix was justified. Ah, that makes sense, then I am fine with keeping it as-is. >> > - ;; 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/co= nsole ? >> > >> > >> >> Seeing this comment, I assume that encrypted pools are supported, right? > > Encrypted datasets are supported, yes. If you set > `keylocation=3Dprompt` then 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 includes > some code copy-pasted from this service) uses > `keylocation=3Dfile:///*elided*`. Cool, hopefully I will get to test this soon. :-) >> > - '(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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmE2JBcVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x569AQAKOa1GC9J2NI4Giv8VSgLtSdUGjq 5H9j6ad5sah7rnjtUX5khDTx2lovNjQA/85PSf/o90OVKruTyRikkfBTdj2Qcq8G BsWwXJBlDLO6aWwyBBNI/w9yyUh6+tSmJtKLZ6T0LZJuTEL7fWmTACDFazxi09dZ mDGnZ3He8/fYo26PmsOp8HDMPLOj2qLlsHQJa1vCVYQLr58FEm/KpBNBwwVx/i8V hEZa4KBv71ZwxuTZ/Z6sT7Sm3IMQsSr45cjoyKnZ2EHFW1G/UKyOvBdyQKNQwe0M 69Jt774j2rUOlVTiYtRnPMmbYZEkwiBMV3p5RT2aKJWwerbs2o6T6/cYmMmpmmzS Ntcn87LlM1UwVmujCNUvrg8DLWTFsB0xHpoV2p+cFWsTS6Vt//RfFCravD+Pf9Fc dMlyX033iXRu9MNuPQy+qCIsmqGbeRY70SfAcJ0uSLIlHi3a3GZMi+dziGEv47xi buYadS/ai+Z9FohPb89O0vUu8ZXdpZF1V1PojN8wyFoic32Fm1jEikBNB1FBOsUu ibhvn+plkti+MfXrKr2FX7VD8L7ZXUdLLCN0TBZ/dk9l1c5V1q0prX88kdN3rDoo Q9sfI795NUiab1kka9iC6I7PAfLOJyKNUh4Xs56w04itQauFl90YJ0luCKPVJJLn GOp9NNddgUuRaGMx =QVNI -----END PGP SIGNATURE----- --=-=-=--