From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/4] Even Better ZFS Support on Guix Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Jan 2021 15:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45692 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 45692@debbugs.gnu.org X-Debbugs-Original-To: "guix-patches@gnu.org" Reply-To: raid5atemyhomework Received: via spool by submit@debbugs.gnu.org id=B.16099483617480 (code B ref -1); Wed, 06 Jan 2021 15:53:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Jan 2021 15:52:41 +0000 Received: from localhost ([127.0.0.1]:45290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxB73-0001wZ-0c for submit@debbugs.gnu.org; Wed, 06 Jan 2021 10:52:41 -0500 Received: from lists.gnu.org ([209.51.188.17]:57622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxB71-0001wS-UI for submit@debbugs.gnu.org; Wed, 06 Jan 2021 10:52:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxB71-0007UT-Kb for guix-patches@gnu.org; Wed, 06 Jan 2021 10:52:39 -0500 Received: from mail-40135.protonmail.ch ([185.70.40.135]:27027) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxB6y-0004kl-T8 for guix-patches@gnu.org; Wed, 06 Jan 2021 10:52:39 -0500 Date: Wed, 06 Jan 2021 15:52:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1609948351; bh=TknNbLTq+VeNLmsLGnE7p1xFzzi5f2WTVcKGNIWanQY=; h=Date:To:From:Reply-To:Subject:From; b=Mx84byrn3tK4NM+AJUUvXRJ9lXoHEn6yAmR721X3SjqtAO51raC46MHFDxIkybo1S FkT5vnwtMVRzgVvSvXwtVwMUuR3TNEuDukiIUSRA+v/n6haXNsNmLDDKsmQyGvPQn+ Vn9iWm2dyNxIgbxzgr4oCD052k+f5VG9nXXrYq4g= From: raid5atemyhomework Message-ID: 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 Received-SPF: pass client-ip=185.70.40.135; envelope-from=raid5atemyhomework@protonmail.com; helo=mail-40135.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.3 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi all, Sorry for the excessive number of patches. This patchset contains 4 patches, two that add new features to Guix and do = not involve ZFS at all, one bugfix of the ZFS package, and one which makes = installing ZFS on Guix easy. * Patch 1: Create an extensible service type that installs kernel-loadable = modules into the kernel. * This allows a ZFS service to add the ZFS module to the kernel. * Patch 2: Make the `file-systems` shepherd service an extensible target, s= o that other services can add more requirements for `file-systems`. * This allows a ZFS service to make `file-systems` wait for the ZFS autom= ount at startup, which is necessary in any case in order to ensure that ZFS= has scanned for ZFS pools installed in the hardware. * Patch 3: Fix the ZFS package definition. * Patch 4: Add a ZFS service type that installs everything needed for basic= ZFS usage! I've tested the ZFS functionality in about a half-dozen VMs already, includ= ing checking that the ZFS setup persists across reboots of the VM: * No ZFS installed. * With ZFS installed but without any ZFS pools. * With ZFS pool that is automounted. * With ZFS pool in legacy mode (needs manual `mount -t zfs poolname /mountp= oint`). * Encrypted ZFS dataset (prompts passphrase at boot to mount). * Encrypted ZFS dataseet as `/home` (prompts passphrase at boot to mount, u= ser `/home` directories are created and maintained). Other bits of ZFS functionality would be *nice* but aren't in this patchset= yet (and at least for my purposes are not really necessary, except perhaps= the auto-scrubbing, I just need to wrap my head around `mcron`...): * Auto-scrubbing of ZFS pools to ensure no data corruption. * Auto-snapshotting of ZFS datasets to protect against user error. * `/` on ZFS. * `/boot` on ZFS. * Managing ZFS "legacy" mountpoints on `(file-system ...)` declarations. * Managing ZFS pool setup in the `operating-system` declaration somehow (no= t sure how to do this). Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 1/4] gnu: Allow services to install kernel-loadable modules. References: In-Reply-To: Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Jan 2021 15:55: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16099484947757 (code B ref 45692); Wed, 06 Jan 2021 15:55:01 +0000 Received: (at 45692) by debbugs.gnu.org; 6 Jan 2021 15:54:54 +0000 Received: from localhost ([127.0.0.1]:45299 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxB97-00020x-L4 for submit@debbugs.gnu.org; Wed, 06 Jan 2021 10:54:54 -0500 Received: from mail-40132.protonmail.ch ([185.70.40.132]:19967) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxB92-00020b-GN for 45692@debbugs.gnu.org; Wed, 06 Jan 2021 10:54:48 -0500 Date: Wed, 06 Jan 2021 15:54:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1609948477; bh=hGPrUa6tM+1uugZYWcqsoLzUVtMpEchptuPfK1FnEJg=; h=Date:To:From:Reply-To:Subject:From; b=t54NBqbXP5kB/Kjrstc3ARP9sUJWzISaby8HMNpvRGeebjx5kt26uvbY1FjBIEmss KToZQh4So8J/A+bx4i5SzJ2v5SXjVoXSzbVgzjLOq/rhrgwVyHECZKSB+GYmkWOue1 CIBIy9EbQ9gN1MxN6dqfI/H/e60cadqGjsHFmizc= From: raid5atemyhomework Message-ID: <2yOs7mxigs8_Vx_yi858pxAkoyXmU8IidizK5grcmX4M92O5QK-_Ywo9nrHMHvzLGj4U7B9ysl26eNbiPmzmeOQsuFvp5VjouVptRfwxKng=@protonmail.com> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >From 4beb73c62995cf236b402dad8e1c36016027c781 Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Tue, 5 Jan 2021 22:27:56 +0800 Subject: [PATCH 1/4] gnu: Allow services to install kernel-loadable modules= . * gnu/system.scm (operating-system-directory-base-entries): Remove code to handle generation of "kernel" and "hurd". (operating-system-default-essential-services): Instantiate kernel-loadable-module-service. (hurd-default-essential-services): Instantiate kernel-loadable-module-service. (package-for-kernel): Move ... * gnu/services.scm: ... to here. (kernel-loadable-module-service-type): New variable. (kernel-loadable-module-service): New procedure. * gnu/tests/linux-modules.scm (run-loadable-kernel-modules-test): Move code to ... (run-loadable-kernel-modules-test-base): ... new procedure here. (run-loadable-kernel-modules-service-test): New procedure. (%test-loadable-kernel-modules-service-0): New variable. (%test-loadable-kernel-modules-service-1): New variable. (%test-loadable-kernel-modules-service-2): New variable. * doc/guix.texi: Document kernel-loadable-module-service-type. --- doc/guix.texi | 6 +++ gnu/services.scm | 70 ++++++++++++++++++++++++++++++++ gnu/system.scm | 37 +++++------------ gnu/tests/linux-modules.scm | 81 ++++++++++++++++++++++++++++++++----- 4 files changed, 157 insertions(+), 37 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 0f6e95a65a..78770151e3 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -32409,6 +32409,12 @@ configuration when you use @command{guix system re= configure}, @command{guix system init}, or @command{guix deploy}. @end defvr +@defvr {Scheme Variable} kernel-loadable-module-service-type +Type of the service that collects lists of packages containing +kernel-loadable modules, and adds them to the set of kernel-loadable +modules. +@end defvr + @node Shepherd Services @subsection Shepherd Services diff --git a/gnu/services.scm b/gnu/services.scm index 13259dfaee..d7332a46b2 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -2,6 +2,7 @@ ;;; Copyright =C2=A9 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Court= =C3=A8s ;;; Copyright =C2=A9 2016 Chris Marusich ;;; Copyright =C2=A9 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright =C2=A9 2021 raid5atemyhomework ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,6 +34,8 @@ #:use-module (guix diagnostics) #:autoload (guix openpgp) (openpgp-format-fingerprint) #:use-module (guix modules) + #:use-module (guix packages) + #:use-module (guix utils) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages hurd) @@ -75,6 +78,7 @@ service-back-edges instantiate-missing-services fold-services + kernel-loadable-module-service service-error? missing-value-service-error? @@ -106,6 +110,7 @@ profile-service-type firmware-service-type gc-root-service-type + kernel-loadable-module-service-type %boot-service %activation-service @@ -864,6 +869,71 @@ as Wifi cards."))) will not be reclaimed by the garbage collector.") (default-value '()))) +;; Configuration for the kernel builder. +(define-record-type* kernel-builder-configu= ration + make-kernel-builder-configuration + kernel-builder-configuration? + this-kernel-builder-configuration + + (kernel kernel-builder-configuration-kernel (default #f)) + (hurd kernel-builder-configuration-hurd (default #f)) + (modules kernel-builder-configuration-modules (default '()))) + +(define (package-for-kernel target-kernel module-package) + "Return a package like MODULE-PACKAGE, adapted for TARGET-KERNEL, if +possible (that is if there's a LINUX keyword argument in the build system)= ." + (package + (inherit module-package) + (arguments + (substitute-keyword-arguments (package-arguments module-package) + ((#:linux kernel #f) + target-kernel))))) + +(define (kernel-builder-configuration->system-entry config) + "Return the kernel and hurd entries of the 'system' directory." + (mbegin %store-monad + (let* ((kernel (kernel-builder-configuration-kernel config)) + (hurd (kernel-builder-configuration-hurd config)) + (modules (kernel-builder-configuration-modules config)) + (kernel (if hurd + kernel + (profile + (content (packages->manifest + (cons kernel + (map (lambda (module) + (if (package? module) + (package-for-kernel ke= rnel module) + module)) + modules)))) + (hooks (list linux-module-database)))))) + (return `(("kernel" ,kernel) + ,@(if hurd `(("hurd" ,hurd)) '())))))) + +(define (kernel-builder-configuration-add-modules config modules) + "Constructs a kernel builder configuration that has its modules extended= ." + (kernel-builder-configuration + (inherit config) + (modules (append (kernel-builder-configuration-modules config) modules= )))) + +(define kernel-loadable-module-service-type + (service-type (name 'kernel-loadable-modules) + (extensions + (list (service-extension system-service-type + kernel-builder-configuration->sy= stem-entry))) + (compose concatenate) + (extend kernel-builder-configuration-add-modules) + (description + "Register packages containing kernel-loadable modules and= adds them +to the system."))) + +(define (kernel-loadable-module-service kernel hurd modules) + "Constructs the service that sets up kernel loadable modules." + (service kernel-loadable-module-service-type + (kernel-builder-configuration + (kernel kernel) + (hurd hurd) + (modules modules)))) + =0C ;;; ;;; Service folding. diff --git a/gnu/system.scm b/gnu/system.scm index c284a18379..5c530f176e 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -12,6 +12,7 @@ ;;; Copyright =C2=A9 2020 Maxim Cournoyer ;;; Copyright =C2=A9 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright =C2=A9 2020 Efraim Flashner +;;; Copyright =C2=A9 2021 raid5atemyhomework ;;; ;;; This file is part of GNU Guix. ;;; @@ -600,16 +601,6 @@ OS." (file-append (operating-system-kernel os) "/" (system-linux-image-file-name)))) -(define (package-for-kernel target-kernel module-package) - "Return a package like MODULE-PACKAGE, adapted for TARGET-KERNEL, if -possible (that is if there's a LINUX keyword argument in the build system)= ." - (package - (inherit module-package) - (arguments - (substitute-keyword-arguments (package-arguments module-package) - ((#:linux kernel #f) - target-kernel))))) - (define %default-modprobe-blacklist ;; List of kernel modules to blacklist by default. '("usbmouse" ;races with bcm5974, see @@ -625,26 +616,10 @@ possible (that is if there's a LINUX keyword argument= in the build system)." "Return the basic entries of the 'system' directory of OS for use as the value of the SYSTEM-SERVICE-TYPE service." (let* ((locale (operating-system-locale-directory os)) - (kernel (operating-system-kernel os)) (hurd (operating-system-hurd os)) - (modules (operating-system-kernel-loadable-modules os)) - (kernel (if hurd - kernel - (profile - (content (packages->manifest - (cons kernel - (map (lambda (module) - (if (package? module) - (package-for-kernel kern= el - modu= le) - module)) - modules)))) - (hooks (list linux-module-database))))) (initrd (and (not hurd) (operating-system-initrd-file os))) (params (operating-system-boot-parameters-file os))) - `(("kernel" ,kernel) - ,@(if hurd `(("hurd" ,hurd)) '()) - ("parameters" ,params) + `(("parameters" ,params) ,@(if initrd `(("initrd" ,initrd)) '()) ("locale" ,locale)))) ;used by libc @@ -663,6 +638,10 @@ bookkeeping." (host-name (host-name-service (operating-system-host-name os))) (entries (operating-system-directory-base-entries os))) (cons* (service system-service-type entries) + (kernel-loadable-module-service + (operating-system-kernel os) + (operating-system-hurd os) + (operating-system-kernel-loadable-modules os)) %boot-service ;; %SHEPHERD-ROOT-SERVICE must come last so that the gexp that @@ -699,6 +678,10 @@ bookkeeping." (define (hurd-default-essential-services os) (let ((entries (operating-system-directory-base-entries os))) (list (service system-service-type entries) + (kernel-loadable-module-service + (operating-system-kernel os) + (operating-system-hurd os) + (operating-system-kernel-loadable-modules os)) %boot-service %hurd-startup-service %activation-service diff --git a/gnu/tests/linux-modules.scm b/gnu/tests/linux-modules.scm index 953b132ef7..9739e4124d 100644 --- a/gnu/tests/linux-modules.scm +++ b/gnu/tests/linux-modules.scm @@ -2,6 +2,7 @@ ;;; Copyright =C2=A9 2019 Jakob L. Kreuze ;;; Copyright =C2=A9 2020 Danny Milosavljevic ;;; Copyright =C2=A9 2020 Brice Waegeneire +;;; Copyright =C2=A9 2021 raid5atemyhomework ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,7 +35,10 @@ #:use-module (guix utils) #:export (%test-loadable-kernel-modules-0 %test-loadable-kernel-modules-1 - %test-loadable-kernel-modules-2)) + %test-loadable-kernel-modules-2 + %test-loadable-kernel-modules-service-0 + %test-loadable-kernel-modules-service-1 + %test-loadable-kernel-modules-service-2)) ;;; Commentary: ;;; @@ -66,17 +70,11 @@ that MODULES are actually loaded." (member module modules string=3D?)) '#$modules)))))) -(define* (run-loadable-kernel-modules-test module-packages module-names) - "Run a test of an OS having MODULE-PACKAGES, and verify that MODULE-NAME= S -are loaded in memory." +(define* (run-loadable-kernel-modules-test-base base-os module-names) + "Run a test of BASE-OS, verifying that MODULE-NAMES are loaded in memory= ." (define os (marionette-operating-system - (operating-system - (inherit (simple-operating-system)) - (services (cons (service kernel-module-loader-service-type module-na= mes) - (operating-system-user-services - (simple-operating-system)))) - (kernel-loadable-modules module-packages)) + base-os #:imported-modules '((guix combinators)))) (define vm (virtual-machine os)) (define (test script) @@ -98,6 +96,37 @@ are loaded in memory." (gexp->derivation "loadable-kernel-modules" (test (modules-loaded?-program os module-names)))) +(define* (run-loadable-kernel-modules-test module-packages module-names) + "Run a test of an OS having MODULE-PACKAGES, and verify that MODULE-NAME= S +are loaded in memory." + (run-loadable-kernel-modules-test-base + (operating-system + (inherit (simple-operating-system)) + (services (cons (service kernel-module-loader-service-type module-na= mes) + (operating-system-user-services + (simple-operating-system)))) + (kernel-loadable-modules module-packages)) + module-names)) + +(define* (run-loadable-kernel-modules-service-test module-packages module-= names) + "Run a test of an OS having MODULE-PACKAGES, which are loaded by creatin= g a +service that extends KERNEL-LOADABLE-MODULE-SERVICE-TYPE. Then verify that +MODULE-NAMES are loaded in memory." + (define module-installing-service-type + (service-type + (name 'module-installing-service) + (extensions (list (service-extension kernel-loadable-module-service-= type + (const module-packages)))) + (default-value #f))) + (run-loadable-kernel-modules-test-base + (operating-system + (inherit (simple-operating-system)) + (services (cons* (service kernel-module-loader-service-type module-n= ames) + (service module-installing-service-type) + (operating-system-user-services + (simple-operating-system))))) + module-names)) + (define %test-loadable-kernel-modules-0 (system-test (name "loadable-kernel-modules-0") @@ -129,3 +158,35 @@ with two extra modules.") (package-arguments ddcci-driver-linux)))))) '("acpi_call" "ddcci"))))) + +(define %test-loadable-kernel-modules-service-0 + (system-test + (name "loadable-kernel-modules-service-0") + (description "Tests loadable kernel modules extensible service with no +extra modules.") + (value (run-loadable-kernel-modules-service-test '() '())))) + +(define %test-loadable-kernel-modules-service-1 + (system-test + (name "loadable-kernel-modules-service-1") + (description "Tests loadable kernel modules extensible service with one +extra module.") + (value (run-loadable-kernel-modules-service-test + (list ddcci-driver-linux) + '("ddcci"))))) + +(define %test-loadable-kernel-modules-service-2 + (system-test + (name "loadable-kernel-modules-service-2") + (description "Tests loadable kernel modules extensible service with two +extra modules.") + (value (run-loadable-kernel-modules-service-test + (list acpi-call-linux-module + (package + (inherit ddcci-driver-linux) + (arguments + `(#:linux #f + ,@(strip-keyword-arguments '(#:linux) + (package-arguments + ddcci-driver-linux)))))) + '("acpi_call" "ddcci"))))) -- 2.29.2 From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 2/4] gnu: Make file-systems target extensible by services. References: In-Reply-To: Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Jan 2021 15:56: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16099485487882 (code B ref 45692); Wed, 06 Jan 2021 15:56:02 +0000 Received: (at 45692) by debbugs.gnu.org; 6 Jan 2021 15:55:48 +0000 Received: from localhost ([127.0.0.1]:45306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxBA4-000234-BS for submit@debbugs.gnu.org; Wed, 06 Jan 2021 10:55:48 -0500 Received: from mail-40137.protonmail.ch ([185.70.40.137]:29246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxBA2-00022q-FJ for 45692@debbugs.gnu.org; Wed, 06 Jan 2021 10:55:47 -0500 Date: Wed, 06 Jan 2021 15:55:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1609948539; bh=GxSEl8pf4rtfbeKWy5CBrnQ7sXo8U9yJRByUJ+I7Dec=; h=Date:To:From:Reply-To:Subject:From; b=PIZTFn5cFfG4etRzfdqsEMGYg1hZ50+zw2uSaY9vK+EmRdZdhy1oZXYAYQTbPFkPY HDuyliz8kirBEiqps0zct0niWFD6s0xaOq27xiRVdtNBk7EX5+f8GjPrYSe9vn8ksw jdQ7I/ugFr2x/7sMHl7OWd4wkmTTXWY6VXes8eJw= From: raid5atemyhomework Message-ID: 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >From 792a8f8efc95e4fe9a94d42f839ddcfb034b8540 Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Wed, 6 Jan 2021 08:15:54 +0800 Subject: [PATCH 2/4] gnu: Make file-systems target extensible by services. * gnu/services/base.scm (file-system-shepherd-services): Move file-systems shepherd service to ... (file-systems-target-shepherd-services): ... new procedure here. (file-systems-target-service-type): New variable. (file-system-service-type): Extend file-systems-target service to add each file-system as a requirement. * gnu/system.scm (operating-system-default-essential-services): Instantiate file-systems-target-service-type. (hurd-default-essential-services): Instantiate file-systems-target-service-= type. --- gnu/services/base.scm | 37 +++++++++++++++++++++++++++---------- gnu/system.scm | 2 ++ 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 945b546607..13cfb6a8a2 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -13,6 +13,7 @@ ;;; Copyright =C2=A9 2019 Jan (janneke) Nieuwenhuizen ;;; Copyright =C2=A9 2020 Florian Pelz ;;; Copyright =C2=A9 2020 Brice Waegeneire +;;; Copyright =C2=A9 2021 raid5atemyhomework ;;; ;;; This file is part of GNU Guix. ;;; @@ -67,6 +68,7 @@ #:export (fstab-service-type root-file-system-service file-system-service-type + file-systems-target-service-type swap-service host-name-service console-keymap-service @@ -362,18 +364,29 @@ FILE-SYSTEM." (gnu system file-systems) ,@%default-modules))))))) +(define (file-systems-target-shepherd-services requirements) + (list + (shepherd-service + (provision '(file-systems)) + (requirement (cons* 'root-file-system 'user-file-systems requirement= s)) + (documentation "Target for all the initially-mounted file systems") + (start #~(const #t)) + (stop #~(const #t))))) +(define file-systems-target-service-type + (service-type + (name 'file-systems) + (extensions (list (service-extension shepherd-root-service-type + file-systems-target-shepherd-serv= ices))) + (compose concatenate) + (extend append) + ;; Extensions can add new values to this list. + (default-value '()) + (description "The @code{file-systems} service is the target that is st= arted +when all file systems have been mounted."))) + (define (file-system-shepherd-services file-systems) "Return the list of Shepherd services for FILE-SYSTEMS." (let* ((file-systems (filter file-system-mount? file-systems))) - (define sink - (shepherd-service - (provision '(file-systems)) - (requirement (cons* 'root-file-system 'user-file-systems - (map file-system->shepherd-service-name - file-systems))) - (documentation "Target for all the initially-mounted file systems") - (start #~(const #t)) - (stop #~(const #f)))) (define known-mount-points (map file-system-mount-point file-systems)) @@ -403,7 +416,7 @@ FILE-SYSTEM." (filter (negate known?) (mount-points))) #f)))) - (cons* sink user-unmount + (cons* user-unmount (map file-system-shepherd-service file-systems)))) (define (file-system-fstab-entries file-systems) @@ -431,6 +444,10 @@ FILE-SYSTEM." (service-extension fstab-service-type file-system-fstab-entries) + ;; Have 'file-systems' depend on each declared file= system. + (service-extension file-systems-target-service-type + (cut map file-system->shepherd-s= ervice-name <>)) + ;; Have 'user-processes' depend on 'file-systems'. (service-extension user-processes-service-type (const '(file-systems))))) diff --git a/gnu/system.scm b/gnu/system.scm index 5c530f176e..6987641ee8 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -667,6 +667,7 @@ bookkeeping." (operating-system-setuid-programs os)) (service profile-service-type (operating-system-packages os)) + (service file-systems-target-service-type) other-fs (append mappings swaps @@ -691,6 +692,7 @@ bookkeeping." (operating-system-groups os)) (operating-system-skeletons os)) (root-file-system-service) + (service file-systems-target-service-type) (service file-system-service-type '()) (service fstab-service-type (filter file-system-needed-for-boot? -- 2.29.2 From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 3/4] gnu: Fix ZFS package. References: In-Reply-To: Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Jan 2021 15:57: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16099486138027 (code B ref 45692); Wed, 06 Jan 2021 15:57:01 +0000 Received: (at 45692) by debbugs.gnu.org; 6 Jan 2021 15:56:53 +0000 Received: from localhost ([127.0.0.1]:45312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxBB6-00025P-S6 for submit@debbugs.gnu.org; Wed, 06 Jan 2021 10:56:53 -0500 Received: from mail-40137.protonmail.ch ([185.70.40.137]:11179) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxBB3-000257-V9 for 45692@debbugs.gnu.org; Wed, 06 Jan 2021 10:56:51 -0500 Date: Wed, 06 Jan 2021 15:56:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1609948604; bh=gPxzhvpUdKObuRlyTPGRFncAR7asLteqHD1lt9RsH7k=; h=Date:To:From:Reply-To:Subject:From; b=cUe8SFmJYjV/tomQQ1qLErI1yrkFiLs0IcJuZ2KgyxnY98g7ix6ei+7lclL2jzxNI 0i6v2sHptSrx9LVXtjLUUifJQyYBZN+ilmlZ7qmge1NsH/BwikF8bVApzkfdT9FHhy ejV4MC4O8hHTCOBwGktzFbAsd0YVci+A99GhqVWE= From: raid5atemyhomework Message-ID: 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >From d1c88161f2a32f4c03de57ee9d7582cc6c40f6bc Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Tue, 5 Jan 2021 20:00:50 +0800 Subject: [PATCH 3/4] gnu: Fix ZFS package. * gnu/packages/file-systems.scm (zfs): Correct "util-linux" input, add separate "util-linux:lib" input. --- gnu/packages/file-systems.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm index 895ad069c5..2c5ad95d63 100644 --- a/gnu/packages/file-systems.scm +++ b/gnu/packages/file-systems.scm @@ -6,6 +6,7 @@ ;;; Copyright =C2=A9 2019, 2020 Efraim Flashner ;;; Copyright =C2=A9 2020 Raghav Gururajan ;;; Copyright =C2=A9 2020 Morgan Smith +;;; Copyright =C2=A9 2021 raid5atemyhoemwork ;;; ;;; This file is part of GNU Guix. ;;; @@ -944,7 +945,8 @@ APFS.") ("openssl" ,openssl) ("python" ,python) ("python-cffi" ,python-cffi) - ("util-linux" ,util-linux "lib") + ("util-linux" ,util-linux) + ("util-linux:lib" ,util-linux "lib") ("zlib" ,zlib))) (home-page "https://zfsonlinux.org/") (synopsis "Native ZFS on Linux") -- 2.29.2 From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 4/4] gnu: Add ZFS service. References: In-Reply-To: Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Jan 2021 15:58: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16099486598123 (code B ref 45692); Wed, 06 Jan 2021 15:58:02 +0000 Received: (at 45692) by debbugs.gnu.org; 6 Jan 2021 15:57:39 +0000 Received: from localhost ([127.0.0.1]:45316 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxBBr-00026v-6W for submit@debbugs.gnu.org; Wed, 06 Jan 2021 10:57:39 -0500 Received: from mail-40137.protonmail.ch ([185.70.40.137]:58035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxBBo-00026g-BU for 45692@debbugs.gnu.org; Wed, 06 Jan 2021 10:57:37 -0500 Date: Wed, 06 Jan 2021 15:57:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1609948650; bh=+sTyLZEtmpxQDhHBaG434JA++LcD2ayQQpzePuQHEZA=; h=Date:To:From:Reply-To:Subject:From; b=pDHYImwpaLjyZKWrvu29YmIeXLLBERImkycZhPKKsQY8wxoEGwFv9CZBk9gJc6W8L Wsx9OptfvpV592a2cuCo9Aoe8lTMtBvqfKFotPtY3OPXklyIqyRZjiB6fFBVWrYNDS YMk0s/18a3u7CYDmfxK/QHJODP5ZGUNj32uvhtyM= From: raid5atemyhomework Message-ID: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >From deded39fe88c44a18b0b66bab8c4300aca4c387e Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Wed, 6 Jan 2021 09:24:20 +0800 Subject: [PATCH 4/4] gnu: Add ZFS service. * gnu/services/file-systems.scm: New file. (zfs-service-type): New variable. (zfs-configuration): New variable. (zfs-configuration?): New procedure. * gnu/local.mk: Add gnu/services/file-systems.scm. * doc/guix.texi (ZFS file system): New subsection. --- doc/guix.texi | 107 ++++++++++++++++++++++++++ gnu/local.mk | 2 + gnu/services/file-systems.scm | 136 ++++++++++++++++++++++++++++++++++ 3 files changed, 245 insertions(+) create mode 100644 gnu/services/file-systems.scm diff --git a/doc/guix.texi b/doc/guix.texi index 78770151e3..62437083cb 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13885,6 +13885,113 @@ a file system declaration such as: compress-force=3Dzstd,space_cache=3Dv2")) @end lisp +@node ZFS file system +@subsection ZFS file system + +The ZFS file system has a license incompatible with the Linux kernel, +and thus cannot be distributed with the kernel. However, as a user +you have the right to do whatever you want on your own hardware, +including download the ZFS source code, compile it, link it to your +own private copy of Linux, and run it. You can even use the Guix build +system to automate this. + +As a large and complex kernel module, ZFS on Linux has to be compiled +with a specific version of the kernel. Often even the latest ZFS +package available cannot be compiled with the latest Linux kernel +package provided by Guix System. Thus, installing the @code{zfs} +package is likely to fail. + +Instead, you have to use an older long-term-support Linux kernel. +Do not use @code{linux-libre-lts} as the latest long-term-support +kernel might be too new for the ZFS package; instead, explicitly +select the version number, like @code{linux-libre-5.4}. + +Then, you have to modify your system configuration file and use the +selected older kernel, and add the @code{zfs-service-type} service. + +@lisp +(use-modules (gnu)) +(use-package-modules + ; @dots{} + linux) +(use-service-modules + ; @dots{} + file-systems) + +(define my-kernel linux-libre-5.4) + +(operating-system + (kernel my-kernel) + ;; @dots{} + (services + (cons* (service zfs-service-type + (zfs-configuration + (kernel my-kernel))) + ; @dots{} + %desktop-services)) + ;; @dots{} + ) +@end lisp + +@defvr {Scheme Variable} zfs-service-type +This is the type of the service to compile and install OpenZFS to +your operating system. It loads the ZFS module at startup, imports +pools, mounts automounted ZFS datasets, installs the ZFS command +line tools, and can provide module options for the ZFS module. Its +value must be a @code{zfs-configuration} record (see below). + +Here is an example use: + +@lisp +(service zfs-service-type + (zfs-configuration + (kernel linux-libre-5.4) + (options '("zfs_arc_max=3D5000000000")))) +@end lisp +@end defvr + +@deftp {Data Type} zfs-configuration +This data type represents the configuration of the ZFS service. +The available fields are: + +@table @asis +@item @code{kernel} +The package of the Linux kernel to compile ZFS for. Required. + +@item @code{base-zfs} (default: @code{zfs}) +The ZFS package to use. It will be modified to use the indicated +kernel. + +@item @code{options} (default: @code{'()}) +A list of string options to pass as options to the ZFS module. +These will be put in a @file{/etc/modprobe.d/zfs.conf} file, +for example setting this to @code{'("zfs_admin_snapshot=3D1" +"zfs_trim_extent_bytes_min=3D0")} will create the following file: + +@example +options zfs zfs_admin_snapshot=3D1 zfs_trim_extent_bytes_min=3D0 +@end example +@end table +@end deftp + +Once your system has been configured to include the ZFS service +and you have restarted the system, you can manage ZFS pools and +datasets with @code{zpool} and @code{zfs} commands. + +ZFS datasets with an appropriate @code{mountpoint} property will +be automounted at startup after the root file system is started. +Encrypted datasets that are automounted will cause boot to pause +and prompt for the password to be provided on the console. + +It's possible to have a ZFS dataset as your @code{/home} by simply +setting the @code{mountpoint} property. However, note that ZFS will +refuse to mount over a non-empty directory, so if your root +filesystem already has a non-empty @code{/home}, you should remove +it and its contents, then restart the system. + +Having ZFS as a root filesystem or as @code{/boot} is not supported +yet. + @node Mapped Devices @section Mapped Devices diff --git a/gnu/local.mk b/gnu/local.mk index 53a67e6ffe..49073ac2ac 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -39,6 +39,7 @@ # Copyright =C2=A9 2020 Martin Becze # Copyright =C2=A9 2020 Malte Frank Gerdes # Copyright =C2=A9 2020 Vinicius Monego +# Copyright =C2=A9 2021 raid5atemyhomework # # This file is part of GNU Guix. # @@ -601,6 +602,7 @@ GNU_SYSTEM_MODULES =3D=09=09=09=09\ %D%/services/dict.scm=09=09=09=09\ %D%/services/dns.scm=09=09=09=09\ %D%/services/docker.scm=09=09=09\ + %D%/services/file-systems.scm=09=09=09\ %D%/services/authentication.scm=09=09\ %D%/services/games.scm=09=09=09\ %D%/services/ganeti.scm=09=09=09\ diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.scm new file mode 100644 index 0000000000..7a92a2b9d5 --- /dev/null +++ b/gnu/services/file-systems.scm @@ -0,0 +1,136 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2021 raid5atemyhomework +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services file-systems) + #:use-module (gnu packages file-systems) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu services shepherd) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix records) + #:export (zfs-service-type + zfs-configuration + zfs-configuration?)) + +(define-record-type* + zfs-configuration make-zfs-configuration zfs-configuration? + ; kernel you want to compile the base-zfs module for. + (kernel zfs-configuration-kernel) + ; base package that will be compiled for the kernel + (base-zfs zfs-configuration-base-zfs (default zfs)) + ; list of string options. + (options zfs-configuration-options (default '()))) + +(define (make-zfs-package conf) + (let ((base-zfs (zfs-configuration-base-zfs conf)) + (kernel (zfs-configuration-kernel conf))) + (package + (inherit base-zfs) + (name (string-join (list (package-name base-zfs) + "for" + (package-name kernel) + (package-version kernel) + "version") + "-")) + (arguments (cons* #:linux kernel (package-arguments base-zfs)))))) + +(define (zfs-loadable-module conf) + (list (list (make-zfs-package conf) "module"))) + +(define (zfs-shepherd-services conf) + (let* ((zfs-package (make-zfs-package conf)) + (zpool (file-append zfs-package "/sbin/zpool"))) + (list + (shepherd-service + (documentation "Scans for ZFS pools and automounts filesystems.") + (provision '(zfs-scan-automount)) + (requirement '(root-file-system)) + (modules `((srfi srfi-1) + (srfi srfi-34) + (srfi srfi-35) + (rnrs io ports) + ,@%default-modules)) + (start #~(lambda _ + (and + ;; You'd think we could've used kernel-module-loader-= service-type, + ;; but the kernel-module-loader shepherd service is d= ependent on + ;; file-systems, and file-systems is made dependent o= n this + ;; service. And we need the kernel module to be loade= d before we + ;; scan for ZFS pools. So break the dependency loop b= y just + ;; loading ZFS module here by ourselves. + (or (file-exists? "/proc/sys/kernel/modprobe") + (begin + (format (current-error-port) "error loading 'zf= s' module: ~a~%" + "Kernel is missing loadable module supp= ort.") + #f)) + (guard (c ((message-condition? c) + (format (current-error-port) + "error loading 'zfs' module: ~a~%" + (condition-message c)) + #f)) + (let ((modprobe (call-with-input-file "/proc/sys/ke= rnel/modprobe" + get-line))) + (invoke/quiet modprobe "--" "zfs"))) + + ; scan for pools and automount contained datasets. + (guard (c ((message-condition? c) + (format (current-error-port) + "error importing zpools: ~a~%" + (condition-message?)) + #f)) + ;; (current-output-port) is typically connected to = /dev/klog, + ;; so redirect it to (current-error-port) so that u= ser can see + ;; prompts for passphrases on console + (with-output-to-port (current-error-port) + (lambda () + (invoke #$zpool "import" "-a" "-l"))))))) + (stop #~(const #t)))))) + +(define (zfs-profile-service conf) + (list (make-zfs-package conf))) + +(define (zfs-etc-service conf) + (let ((options (zfs-configuration-options conf))) + (if (null? options) + '() + `(("modprobe.d/zfs.conf" + ,(plain-file "zfs.conf" + (string-join (cons "options zfs" options) " ")))))= )) + +(define zfs-service-type + (service-type (name 'zfs) + (extensions + (list + ; install the kernel module + (service-extension kernel-loadable-module-service-type + zfs-loadable-module) + ; load ZFS module, scan ZFS pools, and automount files= ystems + (service-extension shepherd-root-service-type + zfs-shepherd-services) + ; make sure automount occurs before file-systems targe= t is reached + (service-extension file-systems-target-service-type + (const '(zfs-scan-automount))) + ; install ZFS management tools + (service-extension profile-service-type + zfs-profile-service) + ; install ZFS module options + (service-extension etc-service-type + zfs-etc-service))) + (description + "Install ZFS, an advanced filesystem and volume manager.= "))) -- 2.29.2 From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] kernel-module-configuration-service for configuring kernel parameters Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Jan 2021 19:42: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 Cc: raid5atemyhomework@protonmail.com, ludo@gnu.org, 45692@debbugs.gnu.org X-Debbugs-Original-Cc: raid5atemyhomework , ludo@gnu.org, raid5atemyhomework via Guix-patches via , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16099621055002 (code B ref 45692); Wed, 06 Jan 2021 19:42:02 +0000 Received: (at 45692) by debbugs.gnu.org; 6 Jan 2021 19:41:45 +0000 Received: from localhost ([127.0.0.1]:45619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxEgj-0001Ib-17 for submit@debbugs.gnu.org; Wed, 06 Jan 2021 14:41:45 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:39156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxEgg-0001IS-AT for 45692@debbugs.gnu.org; Wed, 06 Jan 2021 14:41:43 -0500 Received: from localhost (80-110-127-104.cgn.dynamic.surfer.at [80.110.127.104]) by dd26836.kasserver.com (Postfix) with ESMTPSA id B8C183365398; Wed, 6 Jan 2021 20:41:39 +0100 (CET) Date: Wed, 6 Jan 2021 20:41:34 +0100 From: Danny Milosavljevic Message-ID: <20210106204134.38e83db4@scratchpost.org> In-Reply-To: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com> References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/xXlbAOfUGZoWGj8WvcLyYPd"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: 0.5 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --Sig_/xXlbAOfUGZoWGj8WvcLyYPd Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi raid5atemyhomework, Hi everyone, @raid5atemyhomework, thanks for all the patches! On Wed, 06 Jan 2021 15:57:19 +0000 raid5atemyhomework via Guix-patches via wrote: > +@item @code{options} (default: @code{'()}) > +A list of string options to pass as options to the ZFS module. > +These will be put in a @file{/etc/modprobe.d/zfs.conf} file, > +for example setting this to @code{'("zfs_admin_snapshot=3D1" > +"zfs_trim_extent_bytes_min=3D0")} will create the following file: Sure, but it would be better to create a way to configure those module para= meters in Guix in a declarative way, first. Your new kernel-loadable-module-service-type would be a good template to write a kernel-module-configuration-service that can be extended by other services. The latter should allow users to parametrize the kernel in general via the operating-system form, and also allow services to extend such configuration (with merging, and conflict detection). It would be used: (1) To declaratively specify the contents of something like /etc/modprobe.d= . It shouldn't even be called "/etc/modprobe.d"--it should also be in the sto= re instead. This directory is only useful for non-Linux-builtins. (2) If the "module" is built-in then the kernel command line must get the options instead. (in fact, it works as a kernel command line option also if it's a loadable module--so not sure we need /etc/modprobe.d at all--at least at first. But there's probably a maximal length for the kernel comma= nd line that we could exceed if we did that long term) I know it's annoying that Guix doesn't have this facility already, but the time to introduce an interface for /etc/modprobe.d and the kernel command line for builtin modules is before other services introduce their own ad hoc way to create /etc/modprobe.d--like this tries to do here. See also https://issues.guix.info/issue/42193 for an earlier attempt (which is already very far--but it has a bug somewhere). There's also already a kernel profile thing like you wrote in that patchset. (Note that I would prefer there not to be a "LOAD?" in there because it confuses loading the module (which is usually NOT started by user space but by the kernel on its own) and confguring the module (which has to be done by user space because it's specifying policy, not mechanism)) Also, because the kernel usually loads loadable modules on its own (potenti= ally really early), /etc/modprobe.d has to be preset and known to the modprobe executable VERY EARLY (via environment variable MODPROBE_OPTIONS--see=20 gnu/services.scm %modprobe-wrapper). It is totally possible that some modules in the initrd need options, too (see load-linux-modules-from-directory for where this would need to go). load-linux-module/fd already accepts options and flags--but both are not gi= ven on the call. For this, part of future kernel-module-configuration entries (the ones needed for modules in the initrd) should be copied into the initr= d, too. Then there's the handoff between initrd and main system. It would be bad if the kernel tried and succeeded to load a module that is not in the initrd just before the modprobe.d directory is set up (because it would be loaded without passing the options the user configured)--so that needs to be avoid= ed. @ludo: Could you help here? > +@example > +options zfs zfs_admin_snapshot=3D1 zfs_trim_extent_bytes_min=3D0 Note: This can be usefully put in a modprobe.d-like directory if zfs is a module,= but not if it's built into the kernel. But it can be put into the kernel comma= nd line in both cases. But I guess the ZFS Linux kernel module can't be built-in into the kernel anyway. But that's a special case--in general, it's very much possible to make modu= les built-in. > + ;; You'd think we could've used kernel-module-loade= r-service-type, Definitely. > + ;; but the kernel-module-loader shepherd service is= dependent on > + ;; file-systems,=20 Yes--but why is that dependent on 'file-systems ? Is it because it needs /p= roc ? Or is it an oversight ? I would prefer to get rid of this dependency and t= hen use kernel-module-loader-service-type. Also, this manual loading of kernel modules is not supposed to be the way to do things in Linux. That a kernel module was compiled as a module is an *implementation detail*--so Linux should (and usually does) automatically load kernel modules the first time a device for them is accessed (after all, how would user space know whether something is compiled as a module or built-in--that would be too much to ask). Linux is not a microkernel, so the kind of modularily modprobe.d suggests exists does not in fact exist in kernel space--even though Linux does a good job faking it: modprobe.d contains: * "alias": a feature to configure aliases, with wildcards (only one level of aliases allowed!) * "options" per module (also works for aliases with wildcards! That will be "fun" to map to Guix) * "install" in order to run some custom executable instead of loading the module. * "remove" in order to run some custom executable instead of unloading the module. * "blacklist" to ignore specific internal aliases of a module (that does not do what one would intuitively think!). If the file name of the regular file under /etc/modprobe.d is not used for anything, then we can just have one file /gnu/store/*modprobe.d/guix.conf in total in there. Then there are sysctl kernel parameters--but those Guix already exposes via sysctl-service-type. But those should also be made able to be extended by other services, and merge conflicts should be handled. For example, use= rs often set net.ipv4.ip_forward=3D1 (for example via sysctl). Thank you for all your effort to make ZFS work nicely in Guix. --Sig_/xXlbAOfUGZoWGj8WvcLyYPd Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl/2Em4ACgkQ5xo1VCww uqX7VQf/bHxCWBZt0FXRb5E0zvb0AZVwMPajkYvOBjfXJC+XcMbgjP3FKNW7VLGK FakRsyWnVX6gtFPxUDImjnCIGcY5LGYuaHxnDR4CTqzDBb06LRAMeJ1YTIyr+j+S ZO17TG4hZa+xWLqM6MUpfEwuc1I/b5o9oN39XJJLJAWJOdXMi2ZGwOKY8dpYhaDw zDPoOb3xHj9oDyXyWjOfb/8VK8bF8+L9Fzy3Bjt2WiG58j5jXpkYz9ZQe3zA1hbH zwFmmKqkFbL2gFhTxGWuQrp6x29T60lzBwUcjG58waCQee23TVFR9K/v7fvjrBal kHMS+9/Dc8FBIdzlHAbxj8/74qYkUQ== =nYdc -----END PGP SIGNATURE----- --Sig_/xXlbAOfUGZoWGj8WvcLyYPd-- From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] kernel-module-configuration-service for configuring kernel parameters Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Jan 2021 00:05: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: Danny Milosavljevic Cc: ludo@gnu.org, 45692@debbugs.gnu.org X-Debbugs-Original-Cc: "ludo@gnu.org" , raid5atemyhomework via Guix-patches via , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.160997785330080 (code B ref 45692); Thu, 07 Jan 2021 00:05:02 +0000 Received: (at 45692) by debbugs.gnu.org; 7 Jan 2021 00:04:13 +0000 Received: from localhost ([127.0.0.1]:45913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxImj-0007p6-7Z for submit@debbugs.gnu.org; Wed, 06 Jan 2021 19:04:13 -0500 Received: from mail-40135.protonmail.ch ([185.70.40.135]:10114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxImg-0007or-U0 for 45692@debbugs.gnu.org; Wed, 06 Jan 2021 19:04:11 -0500 Date: Thu, 07 Jan 2021 00:04:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1609977844; bh=d3Ry/xjDaP+dE6gE2ujwfTaJHs3PWHZ1uPkKd4mERVY=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=movietufHyBuzlxm4+HNuyzY07Jp8L1HSwhvFyHXR6tDIX58we/ica2El8hg0Oe8o yh6EiwnKBdBCUk0WSewdsHp7vN/Tgv8HvEqRxYG0dHmyUP33cyxQKAyXbT4H9ktTV7 7OJkgTlWw0KYS+gNcCRO5M2eTKxJWwZdpfrgY0tE= From: raid5atemyhomework Message-ID: In-Reply-To: <20210106204134.38e83db4@scratchpost.org> References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com> <20210106204134.38e83db4@scratchpost.org> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Danny, > See also https://issues.guix.info/issue/42193 for an earlier attempt (whi= ch > is already very far--but it has a bug somewhere). There's also already a > kernel profile thing like you wrote in that patchset. > (Note that I would prefer there not to be a "LOAD?" in there because it > confuses loading the module (which is usually NOT started by user space > but by the kernel on its own) and confguring the module (which has to be > done by user space because it's specifying policy, not mechanism)) Looks like that patchset was merged in, so basically I can just depend on t= hat? So the first patch in this patchset would be dropped? > But I guess the ZFS Linux kernel module can't be built-in into the kernel > anyway. > > But that's a special case--in general, it's very much possible to make mo= dules > built-in. ZFS *can* be built-in to the kernel, Ubuntu does it. You can't distribute i= t like that (Ubuntu distributes it like that but presumably they have enoug= h lawyers to muddy the waters so that they can get away with it), but as th= e documentation in this patch notes: the user has every right to do whateve= r they want on the machine they own, including build a Linux kernel that ha= s ZFS built-in and run it, they just can't make that version available to s= omebody else. So to go whole-hog, we would have a service that replaces the kernel packag= e and inserts kernel module sources in-tree somehow, then compiles Linux-li= bre on the user's machine. That would probably be a lot more painful to ins= tall ZFS with (the user has to recompile the whole kernel at each update of= either kernel or ZFS, whereas with a kernel module the user has to recompi= le just the kernel module), so maybe kernel module is still better overall. > > - ;; You'd think we could've used kernel-module-l= oader-service-type, > > > > > > Definitely. > > > - ;; but the kernel-module-loader shepherd servic= e is dependent on > > > > > > - ;; file-systems, > > > > > > Yes--but why is that dependent on 'file-systems ? Is it because it needs = /proc ? > Or is it an oversight ? I would prefer to get rid of this dependency and = then > use kernel-module-loader-service-type. Dunno --- one VM I tested, I removed the `zfs-scan-automount` shepherd serv= ice from the `file-systems` target, and the VM still wouldn't boot, claimin= g a stack overflow (the same error which I got when I was still trying to u= se kernel-module-loader-service-type here). Or maybe I just got confused w= ith which VM was which, testing VMs wasn't a stress-free vacation. I just = want ZFS, because MD RAID5 ate my homework, this is getting tiresome... One thing I notice about `kernel-module-loader-service-type` is that it's n= ot instantiated in essential services, or indeed anywhere in Guix. A few s= ervices *do* extend it. But my **very rough** understanding is that if you= 're going to extend a service, it had better be instantiated *once* in the = list of services. In particular I note that the documentation for `kernel-module-loader-servi= ce-type` shows an example where it uses `service` to program the `kernel-mo= dule-loader-service-type`, not `simple-service`. This suggests to me that = `kernel-module-loader-service-type` is broken because it's not in the list = of essential services but is extensible. Maybe. It's designed as an exten= sible service, but isn't instantiated at default. Maybe that's what really= bit me and not the shepherd circular dependency loop? *shrug* > > Also, this manual loading of kernel modules is not supposed to be the way= to > do things in Linux. That a kernel module was compiled as a module is > an implementation detail--so Linux should (and usually does) automaticall= y > load kernel modules the first time a device for them is accessed (after a= ll, > how would user space know whether something is compiled as a module or > built-in--that would be too much to ask). So how do I get ZFS loaded? Note that the devices it targets are block devi= ces and it needs to scan for block devices that are formatted for ZFS. Do = other filesystems have some autoload rule? Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] kernel-module-configuration-service for configuring kernel parameters Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Jan 2021 05:39: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: Danny Milosavljevic Cc: ludo@gnu.org, 45692@debbugs.gnu.org X-Debbugs-Original-Cc: "ludo@gnu.org" , raid5atemyhomework via Guix-patches via , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by submit@debbugs.gnu.org id=B.160999791827880 (code B ref -1); Thu, 07 Jan 2021 05:39:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jan 2021 05:38:38 +0000 Received: from localhost ([127.0.0.1]:46102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxO0L-0007Fa-CU for submit@debbugs.gnu.org; Thu, 07 Jan 2021 00:38:38 -0500 Received: from lists.gnu.org ([209.51.188.17]:43880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxO04-0007FA-10 for submit@debbugs.gnu.org; Thu, 07 Jan 2021 00:38:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxO02-0004Bt-AU for guix-patches@gnu.org; Thu, 07 Jan 2021 00:38:18 -0500 Received: from mail-40135.protonmail.ch ([185.70.40.135]:28105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxNzy-0007jK-7x for guix-patches@gnu.org; Thu, 07 Jan 2021 00:38:17 -0500 Date: Thu, 07 Jan 2021 05:38:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1609997890; bh=wV4po8bvpOhi9FVXRrjBOgBSUnNRGk1sLkxlx5jP/TQ=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=BEhekRIV6PzW1qiyGRdO2+tNdlhndCBXjmutt2iiOJ3+43drwyc5kuJqwnM+2Oy9M IAUuuN/aAew5QamRVaBZFKaVJ70l7EcOsDX5mQ5a6iZb7X9d07a4bYSHPwdNtXB9wt Uyoh9BL4OTHLw6sK7WU3+qC3Wa6RGuCho3GtCe4M= From: raid5atemyhomework Message-ID: <7kahfDckMJIQd8o2gH_zQ-G9ORP_P0w-VD44R2OJHNP6rJHss8przoTyObTYxx_UEI5CERTD3OlGORnTCBmZA2VMASWpF2Ea0Hx1ZAbUh-I=@protonmail.com> In-Reply-To: References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com> <20210106204134.38e83db4@scratchpost.org> 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 Received-SPF: pass client-ip=185.70.40.135; envelope-from=raid5atemyhomework@protonmail.com; helo=mail-40135.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi Danny, > > See also https://issues.guix.info/issue/42193 for an earlier attempt (w= hich > > is already very far--but it has a bug somewhere). There's also already = a > > kernel profile thing like you wrote in that patchset. > > (Note that I would prefer there not to be a "LOAD?" in there because it > > confuses loading the module (which is usually NOT started by user space > > but by the kernel on its own) and confguring the module (which has to b= e > > done by user space because it's specifying policy, not mechanism)) > > Looks like that patchset was merged in, so basically I can just depend on= that? So the first patch in this patchset would be dropped? No, sorry, my mistake, only one patch completely unrelated to the actual ne= w service type was merged in. In any case --- is this objection something that would block this patchset = from being added to Guix? I appreciate that we should "do it right" --- but= there's also an argument for "keep it simple", and the first patch in this= patchset gets us a good part of the way to what is needed. It seems that my patch is equivalent to the existing WIP 2/6 `kernel-profil= e-service-type`, so maybe I can just steal that patch for now, write tests = specific for it, and get on with running ZFS in production? Can we at least get patch 3/4 of *this* patchset merged since it's a trivia= l bugfix? How about patch 2/4, which is not so trivial, but does give some= flexibility in case other filesystems want to be as ambitious as ZFS is? I imagine a later, much more comprehensive `kernel-module-configuration-ser= vice-type` can be built on top of `kernel-profile-service-type`, `kernel-mo= dule-loader-service-type`, and a later `kernel-module-options-service-type`= . Then `zfs-service-type` can be modified to use that `kernel-module-confi= guration-service-type` instead of rolling its own bits and pieces. ---- On the other hand, if we want to think of `/` on ZFS, then we need a notion= of kernel modules that are added to the `initrd` file, rather than to the = `kernel` directory. Diving into `gnu/system/linux-initrd.scm`, I note that we can provide a ker= nel package and a list of modules to copy from the kernel package to the `i= nitrd` by a `(flat-linux-module-directory linux modules)` function. I imagine that it would be possible to modify this as follows: * Have `flat-linux-module-directory` accept a list of packages from which t= o find module names, not just a single package. * Remove more code from `(operating-system-directory-base-entries os)`, and= put the creation of the `"initrd"` file into a service, in much the same w= ay that my patch does (unless there's an existing more-guixy way of putting= files into `initrd`?). * Create a service type that gathers packages whose modules are to be add= ed to the `initrd`, and if that list is non-empty, pass it to a new key `#:= extra-linux-module-packages` of the `initrd` function. * `raw-initrd` would then pass that field together with the `linux` arg= ument to the modified `flat-linux-module-directory` procedure. * Create another service type that gathers module names to be loaded at `= boot` and appends them to the `#:linux-modules` to the `initrd` function. * Modify the `kernel-module-options-service-type` to pass in options via = kernel command line always, maybe. Then ZFS module can get loaded early, at boot, before the switch from `init= rd` root to the "real" root. * Create a service type that gathers additional pre-mount actions, which `r= aw-initrd` will accept as a new key `#:additional-pre-mount` and append to = the `pre-mount` it passes to `boot-system`. * The `zfs-service-type` would then extend this service type to pass in a= n action to perform a `zpool import -a -N`, which makes ZFS scan for device= s containing ZFS pools. * Somehow figure out a static build for the ZFS package, so we can use a st= atically-linked `zpool` in the above. * The `zfs-service-type` already inherits a ZFS package from the given `b= ase-package`, I imagine it would be possible to make further inheritance wh= ich modifies the build to be static. It does require an additional build, = though. Maybe an additional `root-on-zfs?` field in `zfs-configuration` ca= n gate this, so that we don't add the static build and extend the boot scri= pt if `(not root-on-zfs?)` (i.e. use `kernel-module-configuration-service-t= ype` if `(not root-on-zfs?)`, else use the new put-it-in-the-initrd service= types). * Modify the various checks elsewhere so that ZFS poolnames can be passed a= s the `device` field of `file-system` records. See https://issues.guix.gnu= .org/45643#3 * Then the installer can be modified so that if ZFS is included with the = installer's profile, it can look at ZFS pools and offer to install to a ZFS= pool instead of a `/dev` partition directly, then add `(file-system (devic= e "rootpool") (mountpoint "/") (type "zfs"))` and the appropriate `zfs-serv= ice-type` and etc. and now we get `/` on ZFS. But that can come later, much much later, I just need ZFS, *any* ZFS, befor= e RAID5 eats more of my homework. Thanks raid5atemyhomework > > But I guess the ZFS Linux kernel module can't be built-in into the kern= el > > anyway. > > But that's a special case--in general, it's very much possible to make = modules > > built-in. > > ZFScan be built-in to the kernel, Ubuntu does it. You can't distribute it= like that (Ubuntu distributes it like that but presumably they have enough= lawyers to muddy the waters so that they can get away with it), but as the= documentation in this patch notes: the user has every right to do whatever= they want on the machine they own, including build a Linux kernel that has= ZFS built-in and run it, they just can't make that version available to so= mebody else. > > So to go whole-hog, we would have a service that replaces the kernel pack= age and inserts kernel module sources in-tree somehow, then compiles Linux-= libre on the user's machine. That would probably be a lot more painful to i= nstall ZFS with (the user has to recompile the whole kernel at each update = of either kernel or ZFS, whereas with a kernel module the user has to recom= pile just the kernel module), so maybe kernel module is still better overal= l. > > > > - ;; You'd think we could've used kernel-modu= le-loader-service-type, > > > > > > > > > > Definitely. > > > > > - ;; but the kernel-module-loader shepherd se= rvice is dependent on > > > > > > > > > - ;; file-systems, > > > > > > > > > > Yes--but why is that dependent on 'file-systems ? Is it because it need= s /proc ? > > Or is it an oversight ? I would prefer to get rid of this dependency an= d then > > use kernel-module-loader-service-type. > > Dunno --- one VM I tested, I removed the`zfs-scan-automount` shepherd ser= vice from the `file-systems` target, and the VM still wouldn't boot, claimi= ng a stack overflow (the same error which I got when I was still trying to = use kernel-module-loader-service-type here). Or maybe I just got confused w= ith which VM was which, testing VMs wasn't a stress-free vacation. I just w= ant ZFS, because MD RAID5 ate my homework, this is getting tiresome... > > One thing I notice about `kernel-module-loader-service-type` is that it's= not instantiated in essential services, or indeed anywhere in Guix. A few = services do extend it. But my very rough understanding is that if you're go= ing to extend a service, it had better be instantiated once in the list of = services. > > In particular I note that the documentation for `kernel-module-loader-ser= vice-type` shows an example where it uses `service` to program the `kernel-= module-loader-service-type`, not `simple-service`. This suggests to me that= `kernel-module-loader-service-type` is broken because it's not in the list= of essential services but is extensible. Maybe. It's designed as an extens= ible service, but isn't instantiated at default. Maybe that's what really b= it me and not the shepherd circular dependency loop? shrug > > > Also, this manual loading of kernel modules is not supposed to be the w= ay to > > do things in Linux. That a kernel module was compiled as a module is > > an implementation detail--so Linux should (and usually does) automatica= lly > > load kernel modules the first time a device for them is accessed (after= all, > > how would user space know whether something is compiled as a module or > > built-in--that would be too much to ask). > > So how do I get ZFS loaded? Note that the devices it targets are block de= vices and it needs to scan for block devices that are formatted for ZFS. Do= other filesystems have some autoload rule? > > Thanks > raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 3/4] gnu: Fix ZFS package. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Jan 2021 08:24: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 Cc: raid5atemyhomework , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.161000781611272 (code B ref 45692); Thu, 07 Jan 2021 08:24:01 +0000 Received: (at 45692) by debbugs.gnu.org; 7 Jan 2021 08:23:36 +0000 Received: from localhost ([127.0.0.1]:46240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxQa0-0002vi-67 for submit@debbugs.gnu.org; Thu, 07 Jan 2021 03:23:36 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:59444) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxQZy-0002va-J1 for 45692@debbugs.gnu.org; Thu, 07 Jan 2021 03:23:35 -0500 Received: from localhost (80-110-127-104.cgn.dynamic.surfer.at [80.110.127.104]) by dd26836.kasserver.com (Postfix) with ESMTPSA id BF972336582A; Thu, 7 Jan 2021 09:23:32 +0100 (CET) Date: Thu, 7 Jan 2021 09:23:31 +0100 From: Danny Milosavljevic Message-ID: <20210107092331.0b2fc752@scratchpost.org> In-Reply-To: References: X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/oEwIY/k+=82Vxd3Ij0SwK=d"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: 0.5 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --Sig_/oEwIY/k+=82Vxd3Ij0SwK=d Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Pushed this one patch that fixes package "zfs" to guix master as commit 8d3184c5bcf1a590f59a701f0484ab5cec673188. --Sig_/oEwIY/k+=82Vxd3Ij0SwK=d Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl/2xQMACgkQ5xo1VCww uqU2tQgAmIWZQ+ODdXCvUgDlwdVR5olRbLAZeTC7ZIHErRte4VzFAjJyvUkk1mAr 0k/o9Y+SFda5TRza7GWHwgfZXiAoSyGgqUyrKH6MO0YKJlAljN9W69LSyigDuSvZ SPQxRW8WHhDCJFrKkaW8cgXN2Im/QJ2Pd2kZDav266riE3Jk4JyRpS60VHHfnuE8 2jNT2UfnJuPK/SgAH8Q3G7z8+wd9iiMWKxpkkapHFGEdPUxJGsupNX8XtnWcCSeg WQhRglVn0yY7gFhMODJcfjfqGLoDce6OjOWab4Snnv3Wjzmq3fn1gMUSzv1avIwX KbmSBldqAUk+VjiPrI6Si3ixZjK+xQ== =ilmp -----END PGP SIGNATURE----- --Sig_/oEwIY/k+=82Vxd3Ij0SwK=d-- From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 4/4] gnu: Add ZFS service. Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Jan 2021 15:03: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16101181555615 (code B ref 45692); Fri, 08 Jan 2021 15:03:01 +0000 Received: (at 45692) by debbugs.gnu.org; 8 Jan 2021 15:02:35 +0000 Received: from localhost ([127.0.0.1]:50340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxtHe-0001SV-5T for submit@debbugs.gnu.org; Fri, 08 Jan 2021 10:02:34 -0500 Received: from mail-40137.protonmail.ch ([185.70.40.137]:58897) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxtHb-0001S7-Tr for 45692@debbugs.gnu.org; Fri, 08 Jan 2021 10:02:33 -0500 Date: Fri, 08 Jan 2021 15:02:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1610118144; bh=PVd20+nCRSa82RwW8MCxBXQjWmfcoUyW9lE6OjQqE6U=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=CfsYzv4brhNE8l7amVV3Ue/MMmbJE2P/Z6sAraMOYRbs3nJT2Ge3RGF1hwV3nYs4L wrV8Re9vrBz33YYUo8/JDgPQmyHYaJRKkAcr9wv6eg/n/OpPyvIV5IyzJB4EvhMYsX BHg03m6ZiHv46sSCtO1vUJq5C+k+CHYQyUzX7O4Y= From: raid5atemyhomework Message-ID: In-Reply-To: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com> References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This new version is dependent on https://issues.guix.info/45723 and https:/= /issues.guix.info/45722 New features: * We can now delay pool importation after particular mapped devices are ope= ned or file systems are mounted. This is useful if you want to make a ZFS = pool out of LUKS containers, or mount an encrypted ZFS dataset with the enc= ryption key in another (hopefully also encrypted) filesystem. * We can now put other non-ZFS filesystems inside ZVOLs, block devices prov= ided by a ZFS pool, and have them mounted after ZFS has scanned pools and o= pened such ZVOLs for use by the ystem. It's now possible to have a bunch of LUKS containers in a ZPOOL that provid= es a ZVOL that contains an EXT4 filesystem (though why would you do that, j= ust use builtin ZFS encryption). This uses my [PATCH 1/4] instead of https://issues.guix.info/42193#4. Shou= ld I use the latter instead? What would get ZFS on Guix faster? I decided to remove ZFS parameter options, because I don't know whether I s= hould wait for https://issues.guix.info/42193 and how long that would take. >From d0e095136cd471f083d92416f12ca22b47301f31 Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Wed, 6 Jan 2021 09:24:20 +0800 Subject: [PATCH 4/4] gnu: Add service to install ZFS. * gnu/services/file-systems.scm: New file. (zfs-service-type): New variable. (): New type. (%zfs-zvol-dependency): New variable. * gnu/local.mk: Add gnu/services/file-systems.scm. * gnu/services/base.scm (dependency->shepherd-service-name): Export. * doc/guix.texi (ZFS file system): New subsection. --- doc/guix.texi | 107 +++++++++++++++++++++ gnu/local.mk | 1 + gnu/services/base.scm | 4 +- gnu/services/file-systems.scm | 174 ++++++++++++++++++++++++++++++++++ 4 files changed, 285 insertions(+), 1 deletion(-) create mode 100644 gnu/services/file-systems.scm diff --git a/doc/guix.texi b/doc/guix.texi index a31d355780..714274b8c9 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13886,6 +13886,113 @@ a file system declaration such as: compress-force=3Dzstd,space_cache=3Dv2")) @end lisp +@node ZFS file system +@subsection ZFS file system + +The ZFS file system has a license incompatible with the Linux kernel, +and thus cannot be distributed with the kernel. However, as a user +you have the right to do whatever you want on your own hardware, +including download the ZFS source code, compile it, link it to your +own private copy of Linux, and run it. You can even use the Guix build +system to automate this. + +As a large and complex kernel module, ZFS on Linux has to be compiled +with a specific version of the kernel. Often even the latest ZFS +package available cannot be compiled with the latest Linux kernel +package provided by Guix System. Thus, installing the @code{zfs} +package is likely to fail. + +Instead, you have to use an older long-term-support Linux kernel. +Do not use @code{linux-libre-lts} as the latest long-term-support +kernel might be too new for the ZFS package; instead, explicitly +select the version number, like @code{linux-libre-5.4}. + +Then, you have to modify your system configuration file and use the +selected older kernel, and add the @code{zfs-service-type} service. + +@lisp +(use-modules (gnu)) +(use-package-modules + ; @dots{} + linux) +(use-service-modules + ; @dots{} + file-systems) + +(define my-kernel linux-libre-5.4) + +(operating-system + (kernel my-kernel) + ;; @dots{} + (services + (cons* (service zfs-service-type + (zfs-configuration + (kernel my-kernel))) + ; @dots{} + %desktop-services)) + ;; @dots{} + ) +@end lisp + +@defvr {Scheme Variable} zfs-service-type +This is the type of the service to compile and install OpenZFS to +your operating system. It loads the ZFS module at startup, imports +pools, mounts automounted ZFS datasets, installs the ZFS command +line tools, and can provide module options for the ZFS module. Its +value must be a @code{zfs-configuration} record (see below). + +Here is an example use: + +@lisp +(service zfs-service-type + (zfs-configuration + (kernel linux-libre-5.4) + (options '("zfs_arc_max=3D5000000000")))) +@end lisp +@end defvr + +@deftp {Data Type} zfs-configuration +This data type represents the configuration of the ZFS service. +The available fields are: + +@table @asis +@item @code{kernel} +The package of the Linux kernel to compile ZFS for. Required. + +@item @code{base-zfs} (default: @code{zfs}) +The ZFS package to use. It will be modified to use the indicated +kernel. + +@item @code{options} (default: @code{'()}) +A list of string options to pass as options to the ZFS module. +These will be put in a @file{/etc/modprobe.d/zfs.conf} file, +for example setting this to @code{'("zfs_admin_snapshot=3D1" +"zfs_trim_extent_bytes_min=3D0")} will create the following file: + +@example +options zfs zfs_admin_snapshot=3D1 zfs_trim_extent_bytes_min=3D0 +@end example +@end table +@end deftp + +Once your system has been configured to include the ZFS service +and you have restarted the system, you can manage ZFS pools and +datasets with @code{zpool} and @code{zfs} commands. + +ZFS datasets with an appropriate @code{mountpoint} property will +be automounted at startup after the root file system is started. +Encrypted datasets that are automounted will cause boot to pause +and prompt for the password to be provided on the console. + +It's possible to have a ZFS dataset as your @code{/home} by simply +setting the @code{mountpoint} property. However, note that ZFS will +refuse to mount over a non-empty directory, so if your root +filesystem already has a non-empty @code{/home}, you should remove +it and its contents, then restart the system. + +Having ZFS as a root filesystem or as @code{/boot} is not supported +yet. + @node Mapped Devices @section Mapped Devices diff --git a/gnu/local.mk b/gnu/local.mk index 1151d4642e..5aeb45c4c2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -602,6 +602,7 @@ GNU_SYSTEM_MODULES =3D=09=09=09=09\ %D%/services/dict.scm=09=09=09=09\ %D%/services/dns.scm=09=09=09=09\ %D%/services/docker.scm=09=09=09\ + %D%/services/file-systems.scm=09=09=09\ %D%/services/authentication.scm=09=09\ %D%/services/games.scm=09=09=09\ %D%/services/ganeti.scm=09=09=09\ diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 13cfb6a8a2..ef3680583b 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -188,7 +188,9 @@ references-file - %base-services)) + %base-services + + dependency->shepherd-service-name)) ;;; Commentary: ;;; diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.scm new file mode 100644 index 0000000000..9061ab9582 --- /dev/null +++ b/gnu/services/file-systems.scm @@ -0,0 +1,174 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2021 raid5atemyhomework +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services file-systems) + #:use-module (gnu packages file-systems) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu services linux) + #:use-module (gnu services shepherd) + #:use-module (gnu system mapped-devices) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix records) + #:export (zfs-service-type + + zfs-configuration + zfs-configuration? + zfs-configuration-kernel + zfs-configuration-base-zfs + zfs-configuration-dependencies + + %zfs-zvol-dependency)) + +(define-record-type* + zfs-configuration make-zfs-configuration zfs-configuration? + ; kernel you want to compile the base-zfs module for. + (kernel zfs-configuration-kernel) + ; base package that will be compiled for the kernel + (base-zfs zfs-configuration-base-zfs + (default zfs)) + ; list of | we should wait for, + ; before scanning for ZFS pools. + (dependencies zfs-configuration-dependencies + (default '()))) + +;; This is a synthetic and unusable MAPPED-DEVICE; its only use +;; is to be added as a (dependency ...) of some FILE-SYSTEM. +(define %zfs-zvol-dependency + (mapped-device + (source '()) + ;; The /* prevents naming conflict with non-ZFS device mappings, + ;; since it is not a valid name for mapped devices, and also + ;; implies "all zvols" in terms of globs. + (targets '("zvol/*")) + (type #f))) + +(define (make-zfs-package conf) + (let ((base-zfs (zfs-configuration-base-zfs conf)) + (kernel (zfs-configuration-kernel conf))) + (package + (inherit base-zfs) + (name (string-join (list (package-name base-zfs) + "for" + (package-name kernel) + (package-version kernel) + "version") + "-")) + (arguments (cons* #:linux kernel (package-arguments base-zfs)))))) + +(define (zfs-loadable-module conf) + (list (list (make-zfs-package conf) "module"))) + +(define (zfs-shepherd-services conf) + (let* ((zfs-package (make-zfs-package conf)) + (zpool (file-append zfs-package "/sbin/zpool")) + (zfs (file-append zfs-package "/sbin/zfs")) + (zvol_wait (file-append zfs-package "/bin/zvol_wait")) + (scheme-modules `((srfi srfi-1) + (srfi srfi-34) + (srfi srfi-35) + (rnrs io ports) + ,@%default-modules))) + + (define zfs-scan + (shepherd-service + (provision '(zfs-scan)) + (documentation "Scans for ZFS pools.") + (requirement `(kernel-module-loader + root-file-system + ,@(map dependency->shepherd-service-name + (zfs-configuration-dependencies conf)))) + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "error importing zpools: ~a~%" + (condition-message c)) + #f)) + ; TODO: optionally use a cachefile, for systems with = dozens or + ; hundreds of devices. + (invoke/quiet #$zpool "import" "-a" "-N")))) + (stop #~(const #t)))) + + (define device-mapping-zvol/* + (shepherd-service + (provision '(device-mapping-zvol/*)) + (documentation "Waits for ZFS ZVOL devices to appear.") + (requirement '(zfs-scan)) + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "error waiting for zvols: ~a~%" + (condition-message c)) + #f)) + (invoke/quiet #$zvol_wait)))) + (stop #~(const #t)))) + + (define zfs-automount + (shepherd-service + (provision '(zfs-automount)) + (documentation "Automounts ZFS datasets.") + (requirement '(zfs-scan)) + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "error automounting zfs: ~a~$") + #f)) + ; (current-output-port) is typically connected to /de= v/klog, + ; so redirect it to (current-error-port) so that user= can see + ; prompts for passphrases on console + (with-output-to-port (current-error-port) + (lambda () + (invoke #$zfs "mount" "-a" "-l")))))) + (stop #~(lambda _ + ;; make sure we don't keep any ZFS mountpoints busy. + (chdir "/") + ;; unmount everything. + (invoke/quiet #$zfs "unmount" "-a" "-f"))))) + + (list zfs-scan + device-mapping-zvol/* + zfs-automount))) + +(define zfs-service-type + (service-type (name 'zfs) + (extensions + (list + ; install the kernel module + (service-extension kernel-loadable-module-service-type + zfs-loadable-module) + ; load the kernel module + (service-extension kernel-module-loader-service-type + (const '("zfs"))) + ; scan ZFS pools, automount filesystem, wait for zvols= . + (service-extension shepherd-root-service-type + zfs-shepherd-services) + ; make sure automount occurs before file-systems targe= t is reached + (service-extension file-systems-target-service-type + (const '(zfs-automount))) + ; install ZFS management tools + (service-extension profile-service-type + (compose list make-zfs-package)) + ; install ZFS udev rules + (service-extension udev-service-type + (compose list make-zfs-package)))) + (description + "Install ZFS, an advanced filesystem and volume manager.= "))) -- 2.30.0 From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 1/4] gnu: Allow services to install kernel-loadable modules. Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Jan 2021 16:17: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.161012258813025 (code B ref 45692); Fri, 08 Jan 2021 16:17:01 +0000 Received: (at 45692) by debbugs.gnu.org; 8 Jan 2021 16:16:28 +0000 Received: from localhost ([127.0.0.1]:50439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxuR9-0003Ny-Pj for submit@debbugs.gnu.org; Fri, 08 Jan 2021 11:16:28 -0500 Received: from mail-40141.protonmail.ch ([185.70.40.141]:47230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxuR7-0003Ne-M3 for 45692@debbugs.gnu.org; Fri, 08 Jan 2021 11:16:26 -0500 Date: Fri, 08 Jan 2021 16:16:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1610122579; bh=GYMcE88SCqUPmaRoJyfWgECfOCgErmWbbQhX8PJPoQA=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=iSOY6OUDPnQoxGg5KbW5D4oSzeoB948olYE/QCA+NBQ+7MUGiKhayCEjN90YcpIGS 71UZw0mVovMINE+EFg1SVfA9EMQLn8pHEj+mrqL5/6WuiQ+HG+ttv5DU5I5FLW4SUj uUqVp3FA0+GGm9kfxhWPLO9y+TiouEHHtqU/zz7g= From: raid5atemyhomework Message-ID: In-Reply-To: <2yOs7mxigs8_Vx_yi858pxAkoyXmU8IidizK5grcmX4M92O5QK-_Ywo9nrHMHvzLGj4U7B9ysl26eNbiPmzmeOQsuFvp5VjouVptRfwxKng=@protonmail.com> References: <2yOs7mxigs8_Vx_yi858pxAkoyXmU8IidizK5grcmX4M92O5QK-_Ywo9nrHMHvzLGj4U7B9ysl26eNbiPmzmeOQsuFvp5VjouVptRfwxKng=@protonmail.com> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Is this patch acceptable? https://lists.nongnu.org/archive/html/guix-devel/= 2021-01/msg00070.html I reported that I compared a `guix system build` resu= lt of an `operating-system` that used the existing `(kernel-loadable-module= s ...)` field, with and without this patch. The resulting builds resulted in different hashes, but with exactly the sam= e contents in the build --- `diff -r` very quickly reported no differences = because it saw that nearly all the symlinks pointed to the same gnu store i= tems. From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 4/4] gnu: Add ZFS service. Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 09 Jan 2021 08:32: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.161018111416117 (code B ref 45692); Sat, 09 Jan 2021 08:32:01 +0000 Received: (at 45692) by debbugs.gnu.org; 9 Jan 2021 08:31:54 +0000 Received: from localhost ([127.0.0.1]:51188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ky9f7-0004Bs-IY for submit@debbugs.gnu.org; Sat, 09 Jan 2021 03:31:54 -0500 Received: from mail-40137.protonmail.ch ([185.70.40.137]:14300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ky9f5-0004Bd-88 for 45692@debbugs.gnu.org; Sat, 09 Jan 2021 03:31:52 -0500 Date: Sat, 09 Jan 2021 08:31:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1610181104; bh=d643oRIfvk9MlprRc+g5Ld1PuPEGjmuzbCYSI31hQxU=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=xTqxNg5DjyvvJ/fYyrupt553KYdrXF8mISq9uK9Ys43BY0umRb7MlhA8szeHkjEE/ QPCoV4HeLa3rcCflAHBdR5h1TyL8aU9z+WXtmMdCfCKDTqUljO4Le/4knDMHP0Byd2 GI3WPBN1lKR4UOFG90mvyi5lIrXI0i9t2IUacEZA= From: raid5atemyhomework Message-ID: <4XtBUBZvLlaRj3Qw8d44cVUm2QWePWKlxR4G7yH_bwXA62SoedCr5VHkch5VkOXfEd5frGaddsTLEEyiVQC0kQmearhfiiveI626gGbVjts=@protonmail.com> In-Reply-To: References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) New version again. Change: Fix documentation `doc/guix.texi` to remove men= tions of `options` and add documentation about the new `dependencies` featu= res. >From dfe9ad7512d348933beb5b42041965ff604422b5 Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Wed, 6 Jan 2021 09:24:20 +0800 Subject: [PATCH 1/2] gnu: Add service to install ZFS. * gnu/services/file-systems.scm: New file. (zfs-service-type): New variable. (): New type. (%zfs-zvol-dependency): New variable. * gnu/local.mk: Add gnu/services/file-systems.scm. * gnu/services/base.scm (dependency->shepherd-service-name): Export. * doc/guix.texi (ZFS file system): New subsection. --- doc/guix.texi | 129 +++++++++++++++++++++++++ gnu/local.mk | 1 + gnu/services/base.scm | 4 +- gnu/services/file-systems.scm | 174 ++++++++++++++++++++++++++++++++++ 4 files changed, 307 insertions(+), 1 deletion(-) create mode 100644 gnu/services/file-systems.scm diff --git a/doc/guix.texi b/doc/guix.texi index a31d355780..7004efe3c4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13886,6 +13886,135 @@ a file system declaration such as: compress-force=3Dzstd,space_cache=3Dv2")) @end lisp +@node ZFS file system +@subsection ZFS file system + +The ZFS file system has a license incompatible with the Linux kernel, +and thus cannot be distributed with the kernel. However, as a user +you have the right to do whatever you want on your own hardware, +including download the ZFS source code, compile it, link it to your +own private copy of Linux, and run it. You can even use the Guix build +system to automate this. + +As a large and complex kernel module, ZFS on Linux has to be compiled +with a specific version of the kernel. Often even the latest ZFS +package available cannot be compiled with the latest Linux kernel +package provided by Guix System. Thus, installing the @code{zfs} +package is likely to fail. + +Instead, you have to use an older long-term-support Linux kernel. +Do not use @code{linux-libre-lts}, since the latest long-term-support +kernel might be too new for the ZFS package; instead, explicitly +select the version number, like @code{linux-libre-5.4}, and upgrade +it manually later when you have verified that the ZFS version +available on Guix can be compiled with a later LTS kernel. + +Then, you have to modify your system configuration file and use the +selected older kernel, and add the @code{zfs-service-type} service. + +@lisp +(use-modules (gnu)) +(use-package-modules + ; @dots{} + linux) +(use-service-modules + ; @dots{} + file-systems) + +(define my-kernel linux-libre-5.4) + +(operating-system + (kernel my-kernel) + ;; @dots{} + (services + (cons* (service zfs-service-type + (zfs-configuration + (kernel my-kernel))) + ; @dots{} + %desktop-services)) + ;; @dots{} + ) +@end lisp + +@defvr {Scheme Variable} zfs-service-type +This is the type of the service to compile and install OpenZFS to +your operating system. It loads the ZFS module at startup, imports +pools, mounts automounted ZFS datasets, and installs the ZFS command +line tools. Its value must be a @code{zfs-configuration} record +(see below). + +Here is an example use: + +@lisp +(service zfs-service-type + (zfs-configuration + (kernel linux-libre-5.4))) +@end lisp +@end defvr + +@deftp {Data Type} zfs-configuration +This data type represents the configuration of the ZFS service. +The available fields are: + +@table @asis +@item @code{kernel} +The package of the Linux kernel to compile ZFS for. Required. It +@emph{must} be the same kernel you use in your operating system. + +@item @code{base-zfs} (default: @code{zfs}) +The ZFS package to use. It will be modified to use the indicated +kernel. + +@item @code{dependencies} (default: @code{'()}) +A list of @code{}s or @code{}s that +must be mounted or opened before ZFS scans for pools to import. +For example, you might have LUKS containers as the leaf VDEVs of +a ZFS pool. +@end table +@end deftp + +Once your system has been configured to include the ZFS service +and you have restarted the system, you can manage ZFS pools and +datasets with @code{zpool} and @code{zfs} commands. + +ZFS datasets with an appropriate @code{mountpoint} property will +be automounted at startup after the root file system is started. +Encrypted datasets that are automounted will cause boot to pause +and prompt for the password to be provided on the console. + +It's possible to have a ZFS dataset as your @code{/home} by simply +setting the @code{mountpoint} ZFS property. However, note that ZFS +will refuse to mount over a non-empty directory, so if your root +filesystem already has a non-empty @code{/home}, you should remove +it and its contents, then restart the system. + +ZFS features @dfn{ZVOL}s, which are block devices that ZFS exposes +to the system. You can put any file system inside a ZVOL. In order +to mount such a filesystem at boot, you can declare it as dependent +on @code{%zfs-zvol-dependency}. + +@defvr {Scheme Variable} %zfs-zvol-dependency +This is an artificial @code{} object which tells +the file mounting service to wait for ZFS to provide ZVOLs before +mounting the file system that is dependent on it. For example: + +@lisp +(file-system + (device "/dev/zvol/pool-name/zvol-name") + (mount-point "/ext4-on-zfs") + (type "ext4") + (dependencies (list %zfs-zvol-dependency))) +@end lisp + +Do @emph{not} add @code{%zfs-zvol-dependency} to your +@code{mapped-devices} declaration, In addition, only use it as a +@code{file-system} dependency if you instantiate a +@code{zfs-service-type} service in your operating system. +@end defvr + +Having ZFS as a root filesystem or as @code{/boot} is not supported +yet. + @node Mapped Devices @section Mapped Devices diff --git a/gnu/local.mk b/gnu/local.mk index 1151d4642e..5aeb45c4c2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -602,6 +602,7 @@ GNU_SYSTEM_MODULES =3D=09=09=09=09\ %D%/services/dict.scm=09=09=09=09\ %D%/services/dns.scm=09=09=09=09\ %D%/services/docker.scm=09=09=09\ + %D%/services/file-systems.scm=09=09=09\ %D%/services/authentication.scm=09=09\ %D%/services/games.scm=09=09=09\ %D%/services/ganeti.scm=09=09=09\ diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 13cfb6a8a2..ef3680583b 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -188,7 +188,9 @@ references-file - %base-services)) + %base-services + + dependency->shepherd-service-name)) ;;; Commentary: ;;; diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.scm new file mode 100644 index 0000000000..9061ab9582 --- /dev/null +++ b/gnu/services/file-systems.scm @@ -0,0 +1,174 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2021 raid5atemyhomework +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services file-systems) + #:use-module (gnu packages file-systems) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu services linux) + #:use-module (gnu services shepherd) + #:use-module (gnu system mapped-devices) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix records) + #:export (zfs-service-type + + zfs-configuration + zfs-configuration? + zfs-configuration-kernel + zfs-configuration-base-zfs + zfs-configuration-dependencies + + %zfs-zvol-dependency)) + +(define-record-type* + zfs-configuration make-zfs-configuration zfs-configuration? + ; kernel you want to compile the base-zfs module for. + (kernel zfs-configuration-kernel) + ; base package that will be compiled for the kernel + (base-zfs zfs-configuration-base-zfs + (default zfs)) + ; list of | we should wait for, + ; before scanning for ZFS pools. + (dependencies zfs-configuration-dependencies + (default '()))) + +;; This is a synthetic and unusable MAPPED-DEVICE; its only use +;; is to be added as a (dependency ...) of some FILE-SYSTEM. +(define %zfs-zvol-dependency + (mapped-device + (source '()) + ;; The /* prevents naming conflict with non-ZFS device mappings, + ;; since it is not a valid name for mapped devices, and also + ;; implies "all zvols" in terms of globs. + (targets '("zvol/*")) + (type #f))) + +(define (make-zfs-package conf) + (let ((base-zfs (zfs-configuration-base-zfs conf)) + (kernel (zfs-configuration-kernel conf))) + (package + (inherit base-zfs) + (name (string-join (list (package-name base-zfs) + "for" + (package-name kernel) + (package-version kernel) + "version") + "-")) + (arguments (cons* #:linux kernel (package-arguments base-zfs)))))) + +(define (zfs-loadable-module conf) + (list (list (make-zfs-package conf) "module"))) + +(define (zfs-shepherd-services conf) + (let* ((zfs-package (make-zfs-package conf)) + (zpool (file-append zfs-package "/sbin/zpool")) + (zfs (file-append zfs-package "/sbin/zfs")) + (zvol_wait (file-append zfs-package "/bin/zvol_wait")) + (scheme-modules `((srfi srfi-1) + (srfi srfi-34) + (srfi srfi-35) + (rnrs io ports) + ,@%default-modules))) + + (define zfs-scan + (shepherd-service + (provision '(zfs-scan)) + (documentation "Scans for ZFS pools.") + (requirement `(kernel-module-loader + root-file-system + ,@(map dependency->shepherd-service-name + (zfs-configuration-dependencies conf)))) + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "error importing zpools: ~a~%" + (condition-message c)) + #f)) + ; TODO: optionally use a cachefile, for systems with = dozens or + ; hundreds of devices. + (invoke/quiet #$zpool "import" "-a" "-N")))) + (stop #~(const #t)))) + + (define device-mapping-zvol/* + (shepherd-service + (provision '(device-mapping-zvol/*)) + (documentation "Waits for ZFS ZVOL devices to appear.") + (requirement '(zfs-scan)) + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "error waiting for zvols: ~a~%" + (condition-message c)) + #f)) + (invoke/quiet #$zvol_wait)))) + (stop #~(const #t)))) + + (define zfs-automount + (shepherd-service + (provision '(zfs-automount)) + (documentation "Automounts ZFS datasets.") + (requirement '(zfs-scan)) + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "error automounting zfs: ~a~$") + #f)) + ; (current-output-port) is typically connected to /de= v/klog, + ; so redirect it to (current-error-port) so that user= can see + ; prompts for passphrases on console + (with-output-to-port (current-error-port) + (lambda () + (invoke #$zfs "mount" "-a" "-l")))))) + (stop #~(lambda _ + ;; make sure we don't keep any ZFS mountpoints busy. + (chdir "/") + ;; unmount everything. + (invoke/quiet #$zfs "unmount" "-a" "-f"))))) + + (list zfs-scan + device-mapping-zvol/* + zfs-automount))) + +(define zfs-service-type + (service-type (name 'zfs) + (extensions + (list + ; install the kernel module + (service-extension kernel-loadable-module-service-type + zfs-loadable-module) + ; load the kernel module + (service-extension kernel-module-loader-service-type + (const '("zfs"))) + ; scan ZFS pools, automount filesystem, wait for zvols= . + (service-extension shepherd-root-service-type + zfs-shepherd-services) + ; make sure automount occurs before file-systems targe= t is reached + (service-extension file-systems-target-service-type + (const '(zfs-automount))) + ; install ZFS management tools + (service-extension profile-service-type + (compose list make-zfs-package)) + ; install ZFS udev rules + (service-extension udev-service-type + (compose list make-zfs-package)))) + (description + "Install ZFS, an advanced filesystem and volume manager.= "))) -- 2.30.0 From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 2/4] gnu: Make file-systems target extensible by services. Resent-From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 Jan 2021 13:05: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: raid5atemyhomework Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16114070836324 (code B ref 45692); Sat, 23 Jan 2021 13:05:01 +0000 Received: (at 45692) by debbugs.gnu.org; 23 Jan 2021 13:04:43 +0000 Received: from localhost ([127.0.0.1]:33818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3Iap-0001dv-B2 for submit@debbugs.gnu.org; Sat, 23 Jan 2021 08:04:43 -0500 Received: from mail-oln040092255014.outbound.protection.outlook.com ([40.92.255.14]:18704 helo=APC01-HK2-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3Iam-0001dh-FU for 45692@debbugs.gnu.org; Sat, 23 Jan 2021 08:04:42 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mIMxghx8Z14GQUNmbrzS5LDBC2vWUQ9tiDcrjrRw7xZ/tz7VOea9qsPlXDvSbOzaIbQ/Ue5kWrO4p3G0t9PpRNb8ARD9x5X30N7Wk1AHqYTvpFQYzxqoZd/SrdBgF7viiZYnkN6AFhtCMg0UYk25m/s9Jr2DhVV0JgQYPLyXASqdR7/usuqR2BEJ7vydon3leD2qctZiCjYfavWqTbFAziGzrQ6SiTKI4mjcDAk2wy5BBkBuoqhMknT7AJkYCCJDpBYLphKPatMf/1DRPAd3OAAvFS0l9g77v2Nfk+2MFkJVDOtVShaLwZkgYqDhXT1TYkb5JKSApRwWswVuShHipg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D3oBjD9Dcj2FGBQOQlgE2NuhOy9GPSubTci567kf3OM=; b=awxwd0AHQMecwI3KOVQL/Kz1MHavz8LpenryOT9nFLieAu+BHyardWzKx9U2JjzoAOZF8MWTCtX08DYl3/qn9PD6C70YPRd9KwWJCsxtIyFMlrl5d5F6Z6qsDMNnlGbhoxfCryOmIrYwPb5g/Da3lsYz7O7PWe4NS51oXnn/UgfHKBTk/W1a7bChmMIwP37kiU8Hv/ogNGFDFC52/JbgUDu1+Rv4KkM0hEykZfWeYBtTYjdiuPJwhqcM7xO6RsKbznRP/NgzvAzaulbFQOyNM/gFzFpDJz05Vl+7NzM/awMokUCoB5vrMFx+cph5o/CLZuKM6j5odPEALLtCflmj6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D3oBjD9Dcj2FGBQOQlgE2NuhOy9GPSubTci567kf3OM=; b=rCMKfXRLy9BKyyvcuZRLXeoky/o6xvSg9ZIoQ+ev+E0TuLUNSLSKQ+SlkdL9IlH4Mepf6xfimH+XyLw0dN0u/d63O73L4BUWC9lasAJ2UZbel4L8QfNTQcz9OCUdNA64feKHBahRUC78nVRWoMFoNAzW+EBvZ/sffSqFWscJKAUQK9+WSaoEmYl+SApibzWHUtZB2bbi9pRw/HdnbXBMM8Dfhy+UHIMZIdb17p78vViiQEtqAZ3M5S71+E+pR5o2lYYCPDU/PhL6uyKg5e9HGHQWB1akAPmZD9FM/V25aoal5XjCjnJK6DcNWb8ZcN0ukr35N03AOuXAgwDXwHokIw== Received: from PU1APC01FT026.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebe::4a) by PU1APC01HT028.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebe::329) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11; Sat, 23 Jan 2021 13:04:29 +0000 Received: from OSZP286MB0664.JPNP286.PROD.OUTLOOK.COM (10.152.252.56) by PU1APC01FT026.mail.protection.outlook.com (10.152.252.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11 via Frontend Transport; Sat, 23 Jan 2021 13:04:29 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:52F3BB86BB62349C3ED0D3D26C52DF11289E966485B422BBD40DA849B3CD4D0D; UpperCasedChecksum:8617A2D03830379A80A0A7D356822EA01B73BEB8F405B85D771A8B5788751920; SizeAsReceived:9080; Count:46 Received: from OSZP286MB0664.JPNP286.PROD.OUTLOOK.COM ([fe80::4987:bbf2:2bff:6b22]) by OSZP286MB0664.JPNP286.PROD.OUTLOOK.COM ([fe80::4987:bbf2:2bff:6b22%5]) with mapi id 15.20.3784.016; Sat, 23 Jan 2021 13:04:28 +0000 From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= References: Date: Sat, 23 Jan 2021 21:05:36 +0800 In-Reply-To: (raid5atemyhomework@protonmail.com's message of "Wed, 06 Jan 2021 15:55:36 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Content-Type: multipart/mixed; boundary="=-=-=" X-TMN: [i3LMU7LzT9kGavNcn/tu7i4v+KhAoiaicViLi9nlbslVRatG481kwI+di7JFt9y3] X-ClientProxiedBy: AM0PR08CA0021.eurprd08.prod.outlook.com (2603:10a6:208:d2::34) To OSZP286MB0664.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:ec::11) X-Microsoft-Original-Message-ID: <87sg6r3isf.fsf@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (2409:8a62:37f:8120:2f1:f5ff:fe18:6bb) by AM0PR08CA0021.eurprd08.prod.outlook.com (2603:10a6:208:d2::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.13 via Frontend Transport; Sat, 23 Jan 2021 13:04:27 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 728127c2-37f6-4718-61c3-08d8bf9f6ab5 X-MS-TrafficTypeDiagnostic: PU1APC01HT028: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yaPFY+kVbeXOGXiaG6BYkELnBqbYwzPGW4wTCmpdWcyTe1Xnvu3FS3kXCL9tv7ernoLHu+a7rmy3ZhNfKEjb/p0kn0umLSIUV88ZxIm+AjNXCwUtCyUdROij3V95McMaHuuspP/9xnmoqLRE7yPuqXoc44kr9kKyi8wZIkzaW1eE0xhBUuUwvWDPrWjbz5qCjDxs032ygRqG8wtE9kNEBcSRgcz3ja4ZvpsTyoph+SLeJ0NouqMVtaZC5soSA8ih X-MS-Exchange-AntiSpam-MessageData: hTti5cVwdPUgPbRaD3K2blrsmePbU4DkDw9lsFszJLjQoxQ09M16x7ZflA5ctvoPLPpzgI1iR3HjO247za4Rznq140By2F8rDctmxWF7+UF5IB10amDPWVsfLsmDH9HJBseA44DBD6TCj3tYkmdMq6FO/n9WcGrjG+4cMyoOEy/3s1GN8+Jj9dAxHwViCDi3YSjHvLcqeFJ6efA3c5tHxw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 728127c2-37f6-4718-61c3-08d8bf9f6ab5 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2021 13:04:28.7566 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: PU1APC01FT026.eop-APC01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU1APC01HT028 X-Spam-Score: -0.0 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello! raid5atemyhomework writes: >>>From 792a8f8efc95e4fe9a94d42f839ddcfb034b8540 Mon Sep 17 00:00:00 2001 > From: raid5atemyhomework > Date: Wed, 6 Jan 2021 08:15:54 +0800 > Subject: [PATCH 2/4] gnu: Make file-systems target extensible by services= . It=E2=80=99s not clear to me what =E2=80=9Cfile-systems target=E2=80=9D is,= and why we=E2=80=99re extending =E2=80=98file-systems-target-service-type=E2=80=99=E2=80=A6 I th= ink what we want is to extend the =E2=80=98file-system-service-type=E2=80=99 with shepherd serv= ices=E2=80=99 names, which means some shepherd services that will handle file systems mounting themself instead of the usual objects, fstab entries, mounted by kernel. So I write with this patch to extend file-system-service-type directly instead of introducing a new =E2=80=98file-systems-target-service-type=E2= =80=99: --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-services-Allow-file-system-service-type-extensible-b.patch Content-Transfer-Encoding: quoted-printable >From 44ee1e470a2f9d4985af4d51654d9f943caa0f24 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?=3DE5=3DAE=3D8B=3DE6=3D96=3D87=3DE6=3DAD=3DA6?=3D Date: Sat, 23 Jan 2021 20:39:06 +0800 Subject: [PATCH] services: Allow 'file-system-service-type' extensible by service name. MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * gnu/services/base.scm (file-system-shepherd-services): Add 'extra-services-names' paramater. (file-system-service-type): Handle services=E2=80=99 names from extensions. --- gnu/services/base.scm | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index f6a490f712..7bddef5034 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -364,15 +364,16 @@ FILE-SYSTEM." (gnu system file-systems) ,@%default-modules))))))) =20 -(define (file-system-shepherd-services file-systems) +(define (file-system-shepherd-services file-systems extra-services-names) "Return the list of Shepherd services for FILE-SYSTEMS." (let* ((file-systems (filter file-system-mount? file-systems))) (define sink (shepherd-service (provision '(file-systems)) - (requirement (cons* 'root-file-system 'user-file-systems - (map file-system->shepherd-service-name - file-systems))) + (requirement (append '(root-file-system user-file-systems) + (map file-system->shepherd-service-name + file-systems) + extra-services-names)) (documentation "Target for all the initially-mounted file systems") (start #~(const #t)) (stop #~(const #f)))) @@ -429,13 +430,23 @@ FILE-SYSTEM." (service-type (name 'file-systems) (extensions (list (service-extension shepherd-root-service-type - file-system-shepherd-services) + (lambda (value) + (file-system-shepherd-services + (filter file-system? value) + (filter symbol? value)))) (service-extension fstab-service-type - file-system-fstab-entries) + (lambda (value) + (file-system-fstab-entries + (filter file-system? value)))= ) =20 ;; Have 'user-processes' depend on 'file-systems'. (service-extension user-processes-service-type (const '(file-systems))))) + + ;; Extensions consist of lists of objects or + ;; shepherd services=E2=80=99 names (symbols). In the lat= ter case, + ;; the provided shepherd services supposed to mount and + ;; unmount some file systems themself. (compose concatenate) (extend append) (description --=20 2.29.2 --=-=-= Content-Type: text/plain What do you think? Thank you! --=-=-=-- From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 2/4] gnu: Make file-systems target extensible by services. Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Jan 2021 00:19: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: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.161153390814007 (code B ref 45692); Mon, 25 Jan 2021 00:19:01 +0000 Received: (at 45692) by debbugs.gnu.org; 25 Jan 2021 00:18:28 +0000 Received: from localhost ([127.0.0.1]:37531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3paO-0003dq-6W for submit@debbugs.gnu.org; Sun, 24 Jan 2021 19:18:28 -0500 Received: from mail-40130.protonmail.ch ([185.70.40.130]:33797) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3paL-0003db-D4 for 45692@debbugs.gnu.org; Sun, 24 Jan 2021 19:18:26 -0500 Date: Mon, 25 Jan 2021 00:18:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1611533898; bh=D9VoTTPZCwyOkQsPug+GJ0CHaSS7PN5C5DpxCO3zVrM=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=UEeI9diarz717d+BV/h0FPdQtzJ70qj61HP8HIsCItW9faC1ADY9lp5LF2N6AvkTC TeN9lJT9RElDIvM7fyNEuhxu0kCK/PMWgsc16e2DCYDoEp3NVU8QTfCZVs6MPUFEfh WH/cpso0GQijqWjVN7Rdzbu1PC1VGYQXLUzi+44I= From: raid5atemyhomework Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_mRpjfOIGz2vYuhY0dGPkTxi3aglT1aRajDjpt4h2RQ" 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This is a multi-part message in MIME format. --b1_mRpjfOIGz2vYuhY0dGPkTxi3aglT1aRajDjpt4h2RQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello as well, That is certainly another possibility, would this be more palatable to Guix= ? Thanks raid5atemyhomework > Hello! > > raid5atemyhomework raid5atemyhomework@protonmail.com writes: > > > > From 792a8f8efc95e4fe9a94d42f839ddcfb034b8540 Mon Sep 17 00:00:00 200= 1 > > > From: raid5atemyhomework raid5atemyhomework@protonmail.com > > > Date: Wed, 6 Jan 2021 08:15:54 +0800 > > > Subject: [PATCH 2/4] gnu: Make file-systems target extensible by serv= ices. > > It=E2=80=99s not clear to me what =E2=80=9Cfile-systems target=E2=80= =9D is, and why we=E2=80=99re > extending =E2=80=98file-systems-target-service-type=E2=80=99=E2=80=A6 I t= hink what we want is > to extend the =E2=80=98file-system-service-type=E2=80=99 with shepherd se= rvices=E2=80=99 names, > which means some shepherd services that will handle file systems > mounting themself instead of the usual objects, fstab > entries, mounted by kernel. > > So I write with this patch to extend file-system-service-type directly > instead of introducing a new =E2=80=98file-systems-target-service-type= =E2=80=99: > > What do you think? Thank you! --b1_mRpjfOIGz2vYuhY0dGPkTxi3aglT1aRajDjpt4h2RQ Content-Type: text/x-patch; name=0001-services-Allow-file-system-service-type-extensible-b.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=0001-services-Allow-file-system-service-type-extensible-b.patch RnJvbSA0NGVlMWU0NzBhMmY5ZDQ5ODVhZjRkNTE2NTRkOWY5NDNjYWEwZjI0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/PUU1PUFFPThCPUU2PTk2PTg3PUU2PUFEPUE2 Pz0gPGl5enNvbmdAbWVtYmVyLmZzZi5vcmc+CkRhdGU6IFNhdCwgMjMgSmFuIDIwMjEgMjA6Mzk6 MDYgKzA4MDAKU3ViamVjdDogW1BBVENIXSBzZXJ2aWNlczogQWxsb3cgJ2ZpbGUtc3lzdGVtLXNl cnZpY2UtdHlwZScgZXh0ZW5zaWJsZSBieQogc2VydmljZSBuYW1lLgpNSU1FLVZlcnNpb246IDEu MApDb250ZW50LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9VVRGLTgKQ29udGVudC1UcmFuc2Zl ci1FbmNvZGluZzogOGJpdAoKKiBnbnUvc2VydmljZXMvYmFzZS5zY20gKGZpbGUtc3lzdGVtLXNo ZXBoZXJkLXNlcnZpY2VzKTogQWRkCidleHRyYS1zZXJ2aWNlcy1uYW1lcycgcGFyYW1hdGVyLgoo ZmlsZS1zeXN0ZW0tc2VydmljZS10eXBlKTogSGFuZGxlIHNlcnZpY2Vz4oCZIG5hbWVzIGZyb20g ZXh0ZW5zaW9ucy4KLS0tCiBnbnUvc2VydmljZXMvYmFzZS5zY20gfCAyMyArKysrKysrKysrKysr KysrKy0tLS0tLQogMSBmaWxlIGNoYW5nZWQsIDE3IGluc2VydGlvbnMoKyksIDYgZGVsZXRpb25z KC0pCgpkaWZmIC0tZ2l0IGEvZ251L3NlcnZpY2VzL2Jhc2Uuc2NtIGIvZ251L3NlcnZpY2VzL2Jh c2Uuc2NtCmluZGV4IGY2YTQ5MGY3MTIuLjdiZGRlZjUwMzQgMTAwNjQ0Ci0tLSBhL2dudS9zZXJ2 aWNlcy9iYXNlLnNjbQorKysgYi9nbnUvc2VydmljZXMvYmFzZS5zY20KQEAgLTM2NCwxNSArMzY0 LDE2IEBAIEZJTEUtU1lTVEVNLiIKICAgICAgICAgICAgICAgICAgICAgICAgKGdudSBzeXN0ZW0g ZmlsZS1zeXN0ZW1zKQogICAgICAgICAgICAgICAgICAgICAgICAsQCVkZWZhdWx0LW1vZHVsZXMp KSkpKSkpCiAKLShkZWZpbmUgKGZpbGUtc3lzdGVtLXNoZXBoZXJkLXNlcnZpY2VzIGZpbGUtc3lz dGVtcykKKyhkZWZpbmUgKGZpbGUtc3lzdGVtLXNoZXBoZXJkLXNlcnZpY2VzIGZpbGUtc3lzdGVt cyBleHRyYS1zZXJ2aWNlcy1uYW1lcykKICAgIlJldHVybiB0aGUgbGlzdCBvZiBTaGVwaGVyZCBz ZXJ2aWNlcyBmb3IgRklMRS1TWVNURU1TLiIKICAgKGxldCogKChmaWxlLXN5c3RlbXMgKGZpbHRl ciBmaWxlLXN5c3RlbS1tb3VudD8gZmlsZS1zeXN0ZW1zKSkpCiAgICAgKGRlZmluZSBzaW5rCiAg ICAgICAoc2hlcGhlcmQtc2VydmljZQogICAgICAgIChwcm92aXNpb24gJyhmaWxlLXN5c3RlbXMp KQotICAgICAgIChyZXF1aXJlbWVudCAoY29ucyogJ3Jvb3QtZmlsZS1zeXN0ZW0gJ3VzZXItZmls ZS1zeXN0ZW1zCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAobWFwIGZpbGUtc3lzdGVtLT5z aGVwaGVyZC1zZXJ2aWNlLW5hbWUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmls ZS1zeXN0ZW1zKSkpCisgICAgICAgKHJlcXVpcmVtZW50IChhcHBlbmQgJyhyb290LWZpbGUtc3lz dGVtIHVzZXItZmlsZS1zeXN0ZW1zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtYXAg ZmlsZS1zeXN0ZW0tPnNoZXBoZXJkLXNlcnZpY2UtbmFtZQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgZmlsZS1zeXN0ZW1zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4 dHJhLXNlcnZpY2VzLW5hbWVzKSkKICAgICAgICAoZG9jdW1lbnRhdGlvbiAiVGFyZ2V0IGZvciBh bGwgdGhlIGluaXRpYWxseS1tb3VudGVkIGZpbGUgc3lzdGVtcyIpCiAgICAgICAgKHN0YXJ0ICN+ KGNvbnN0ICN0KSkKICAgICAgICAoc3RvcCAjfihjb25zdCAjZikpKSkKQEAgLTQyOSwxMyArNDMw LDIzIEBAIEZJTEUtU1lTVEVNLiIKICAgKHNlcnZpY2UtdHlwZSAobmFtZSAnZmlsZS1zeXN0ZW1z KQogICAgICAgICAgICAgICAgIChleHRlbnNpb25zCiAgICAgICAgICAgICAgICAgIChsaXN0IChz ZXJ2aWNlLWV4dGVuc2lvbiBzaGVwaGVyZC1yb290LXNlcnZpY2UtdHlwZQotICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZS1zeXN0ZW0tc2hlcGhlcmQtc2Vydmlj ZXMpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobGFtYmRhICh2 YWx1ZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGZpbGUt c3lzdGVtLXNoZXBoZXJkLXNlcnZpY2VzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAoZmlsdGVyIGZpbGUtc3lzdGVtPyB2YWx1ZSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChmaWx0ZXIgc3ltYm9sPyB2YWx1ZSkpKSkK ICAgICAgICAgICAgICAgICAgICAgICAgKHNlcnZpY2UtZXh0ZW5zaW9uIGZzdGFiLXNlcnZpY2Ut dHlwZQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZS1zeXN0 ZW0tZnN0YWItZW50cmllcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChsYW1iZGEgKHZhbHVlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAoZmlsZS1zeXN0ZW0tZnN0YWItZW50cmllcworICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKGZpbHRlciBmaWxlLXN5c3RlbT8gdmFsdWUpKSkpCiAK ICAgICAgICAgICAgICAgICAgICAgICAgOzsgSGF2ZSAndXNlci1wcm9jZXNzZXMnIGRlcGVuZCBv biAnZmlsZS1zeXN0ZW1zJy4KICAgICAgICAgICAgICAgICAgICAgICAgKHNlcnZpY2UtZXh0ZW5z aW9uIHVzZXItcHJvY2Vzc2VzLXNlcnZpY2UtdHlwZQogICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKGNvbnN0ICcoZmlsZS1zeXN0ZW1zKSkpKSkKKworICAgICAgICAg ICAgICAgIDs7IEV4dGVuc2lvbnMgY29uc2lzdCBvZiBsaXN0cyBvZiA8ZmlsZS1zeXN0ZW0+IG9i amVjdHMgb3IKKyAgICAgICAgICAgICAgICA7OyBzaGVwaGVyZCBzZXJ2aWNlc+KAmSBuYW1lcyAo c3ltYm9scykuICBJbiB0aGUgbGF0dGVyIGNhc2UsCisgICAgICAgICAgICAgICAgOzsgdGhlIHBy b3ZpZGVkIHNoZXBoZXJkIHNlcnZpY2VzIHN1cHBvc2VkIHRvIG1vdW50IGFuZAorICAgICAgICAg ICAgICAgIDs7IHVubW91bnQgc29tZSBmaWxlIHN5c3RlbXMgdGhlbXNlbGYuCiAgICAgICAgICAg ICAgICAgKGNvbXBvc2UgY29uY2F0ZW5hdGUpCiAgICAgICAgICAgICAgICAgKGV4dGVuZCBhcHBl bmQpCiAgICAgICAgICAgICAgICAgKGRlc2NyaXB0aW9uCi0tIAoyLjI5LjIKCg== --b1_mRpjfOIGz2vYuhY0dGPkTxi3aglT1aRajDjpt4h2RQ-- From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 4/4] gnu: Add ZFS service. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Feb 2021 03:32: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: 45692@debbugs.gnu.org Cc: raid5atemyhomework@protonmail.com X-Debbugs-Original-To: raid5atemyhomework via Guix-patches via X-Debbugs-Original-Cc: raid5atemyhomework , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.1612755120570 (code B ref 45692); Mon, 08 Feb 2021 03:32:02 +0000 Received: (at 45692) by debbugs.gnu.org; 8 Feb 2021 03:32:00 +0000 Received: from localhost ([127.0.0.1]:49286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8xHM-000098-EV for submit@debbugs.gnu.org; Sun, 07 Feb 2021 22:32:00 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:40308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8xHK-00008y-5s for 45692@debbugs.gnu.org; Sun, 07 Feb 2021 22:31:59 -0500 Received: from localhost (80-110-127-104.cgn.dynamic.surfer.at [80.110.127.104]) by dd26836.kasserver.com (Postfix) with ESMTPSA id D772233648C5; Mon, 8 Feb 2021 04:31:55 +0100 (CET) Date: Mon, 8 Feb 2021 04:31:52 +0100 From: Danny Milosavljevic Message-ID: <20210208043152.7cdd5900@scratchpost.org> In-Reply-To: <4XtBUBZvLlaRj3Qw8d44cVUm2QWePWKlxR4G7yH_bwXA62SoedCr5VHkch5VkOXfEd5frGaddsTLEEyiVQC0kQmearhfiiveI626gGbVjts=@protonmail.com> References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com> <4XtBUBZvLlaRj3Qw8d44cVUm2QWePWKlxR4G7yH_bwXA62SoedCr5VHkch5VkOXfEd5frGaddsTLEEyiVQC0kQmearhfiiveI626gGbVjts=@protonmail.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/L.zr+T00e3XjmyYQWRUWlj0"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --Sig_/L.zr+T00e3XjmyYQWRUWlj0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hello, is it necessary to manually load the ZFS Linux kernel module? Usually, Lin= ux should autoload its drivers when the device files are accessed--module or n= ot. If that fails, didn't you patch the zfs package so it refers to modprobe an= yway? (I wanna prevent having 543 places in Guix where modprobe is invoked) If it doesn't autoload, we can totally modprobe it, though. --Sig_/L.zr+T00e3XjmyYQWRUWlj0 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAmAgsKgACgkQ5xo1VCww uqWYlAf+LmpUSOE+T8s2fUOta0h6kXCDklfZ7ehCrHa83LfNAuOl0jVQS9Oeoabc IN6y9gujcUY345NJI/QvWTqiKoU6deogK2Ut4VDLHfzhiD5H4J7WYGm1Z//ygFEq ku7+YL1rbMTo/qe0s40U0MeMNq7V0PEDyg3XvKZmL7GdtYa71sAKRID3RMQ6M5pd GJUUWOlNOs9p+VQOcobReTS1t9NMRhrCHg6tjrVtTrnc7aVQxuEg7y+BSGeNC6Mp LA/SHxYcu8w6vomlNyGQL7oY6xNMNc6NihiToWrinkV56bG7x7ssLenJGYsWOCOG 5xqXwUy5VmcTHDYADCmx0q2v/4iJvQ== =jbFl -----END PGP SIGNATURE----- --Sig_/L.zr+T00e3XjmyYQWRUWlj0-- From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 4/4] gnu: Add ZFS service. Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Feb 2021 06:26: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: Danny Milosavljevic Cc: 45692@debbugs.gnu.org X-Debbugs-Original-Cc: raid5atemyhomework via Guix-patches via , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.161276555317308 (code B ref 45692); Mon, 08 Feb 2021 06:26:02 +0000 Received: (at 45692) by debbugs.gnu.org; 8 Feb 2021 06:25:53 +0000 Received: from localhost ([127.0.0.1]:49413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8zzd-0004V6-HL for submit@debbugs.gnu.org; Mon, 08 Feb 2021 01:25:53 -0500 Received: from mail-40138.protonmail.ch ([185.70.40.138]:37622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8zzb-0004Up-II for 45692@debbugs.gnu.org; Mon, 08 Feb 2021 01:25:52 -0500 Date: Mon, 08 Feb 2021 06:25:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1612765545; bh=8f3vakDa0PSC+MpmUEEbq8x/pEN+kqp0SMX/+KjqP/k=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=fhkfIZFuaec4aWg4B9rA36cAncpnOP86Xf6tw1UYPH/SYf7lFq5svQ0cpRvoQ4cc4 0zlxuz/LGPIDlYLZwU70iw8LcUQAQdrO1hTMV6r4xnzGBlRFtedyp0fNs88zGP3ex5 Fl77S0RZxLnN3MBGNVUdbOsROECjW7TqY1DfDlzI= From: raid5atemyhomework Message-ID: In-Reply-To: <20210208043152.7cdd5900@scratchpost.org> References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com> <4XtBUBZvLlaRj3Qw8d44cVUm2QWePWKlxR4G7yH_bwXA62SoedCr5VHkch5VkOXfEd5frGaddsTLEEyiVQC0kQmearhfiiveI626gGbVjts=@protonmail.com> <20210208043152.7cdd5900@scratchpost.org> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Sent with ProtonMail Secure Email. =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Monday, February 8, 2021 3:31 AM, Danny Milosavljevic wrote: > Hello, > > is it necessary to manually load the ZFS Linux kernel module? Usually, Li= nux > should autoload its drivers when the device files are accessed--module or= not. > > If that fails, didn't you patch the zfs package so it refers to modprobe = anyway? It does, for `udev`. Not certain if it would trigger the load, though. Pr= esumably it would, but I have not tested. A lot of this code was written in 0.8.5, where the ZFS tools will *not* att= empt to `modprobe` the module first, they just error out. I think in 2.0.1= upstream added code to load the module if the ZFS tool(s) were invoked whi= le the module was not loaded, which is why additional patch was added by me= for the 2.0.1 to patch in `modprobe`. I have not tested if the `modprobe`= -ing by the ZFS tools actually *works*, though. Maybe when I find some amount of motivation I can go test it. > > (I wanna prevent having 543 places in Guix where modprobe is invoked) > > If it doesn't autoload, we can totally modprobe it, though. Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/4] Even Better ZFS Support on Guix Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Feb 2021 14:14: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: raid5atemyhomework Cc: Danny Milosavljevic , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.161296641812027 (code B ref 45692); Wed, 10 Feb 2021 14:14:01 +0000 Received: (at 45692) by debbugs.gnu.org; 10 Feb 2021 14:13:38 +0000 Received: from localhost ([127.0.0.1]:55805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9qFO-00037v-3W for submit@debbugs.gnu.org; Wed, 10 Feb 2021 09:13:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9qFK-00037g-IG for 45692@debbugs.gnu.org; Wed, 10 Feb 2021 09:13:37 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43952) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9qFF-0002xf-6l; Wed, 10 Feb 2021 09:13:29 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42956 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l9qF8-0005gf-AP; Wed, 10 Feb 2021 09:13:27 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <2yOs7mxigs8_Vx_yi858pxAkoyXmU8IidizK5grcmX4M92O5QK-_Ywo9nrHMHvzLGj4U7B9ysl26eNbiPmzmeOQsuFvp5VjouVptRfwxKng=@protonmail.com> Date: Wed, 10 Feb 2021 15:13:19 +0100 In-Reply-To: <2yOs7mxigs8_Vx_yi858pxAkoyXmU8IidizK5grcmX4M92O5QK-_Ywo9nrHMHvzLGj4U7B9ysl26eNbiPmzmeOQsuFvp5VjouVptRfwxKng=@protonmail.com> (raid5atemyhomework@protonmail.com's message of "Wed, 06 Jan 2021 15:54:33 +0000") Message-ID: <87zh0c6mf4.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) raid5atemyhomework skribis: > +(define (kernel-builder-configuration->system-entry config) > + "Return the kernel and hurd entries of the 'system' directory." > + (mbegin %store-monad > + (let* ((kernel (kernel-builder-configuration-kernel config)) > + (hurd (kernel-builder-configuration-hurd config)) > + (modules (kernel-builder-configuration-modules config)) > + (kernel (if hurd > + kernel > + (profile > + (content (packages->manifest > + (cons kernel > + (map (lambda (module) > + (if (package? module) > + (package-for-kernel = kernel module) > + module)) > + modules)))) > + (hooks (list linux-module-database)))))) > + (return `(("kernel" ,kernel) > + ,@(if hurd `(("hurd" ,hurd)) '())))))) It may be clearer to avoid =E2=80=98mbegin=E2=80=99 and instead write it th= is way: (define (kernel-builder-configuration-modules config) (let* =E2=80=A6 (with-monad %store-monad (return =E2=80=A6)))) Both work but I find this variant slightly clearer. Ludo=E2=80=99. From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/4] Even Better ZFS Support on Guix Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Feb 2021 14:18: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: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.161296666812492 (code B ref 45692); Wed, 10 Feb 2021 14:18:02 +0000 Received: (at 45692) by debbugs.gnu.org; 10 Feb 2021 14:17:48 +0000 Received: from localhost ([127.0.0.1]:55811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9qJP-0003FQ-Nw for submit@debbugs.gnu.org; Wed, 10 Feb 2021 09:17:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9qJO-0003F9-Jq for 45692@debbugs.gnu.org; Wed, 10 Feb 2021 09:17:46 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44032) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9qJH-0004iP-QN; Wed, 10 Feb 2021 09:17:40 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42972 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l9qJH-0005xM-EB; Wed, 10 Feb 2021 09:17:39 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Wed, 10 Feb 2021 15:17:37 +0100 In-Reply-To: (raid5atemyhomework@protonmail.com's message of "Mon, 25 Jan 2021 00:18:12 +0000") Message-ID: <87sg646m7y.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi! I agree with =E5=AE=8B=E6=96=87=E6=AD=A6. Still=E2=80=A6 raid5atemyhomework skribis: > (service-type (name 'file-systems) > (extensions > (list (service-extension shepherd-root-service-type > - file-system-shepherd-services) > + (lambda (value) > + (file-system-shepherd-servic= es > + (filter file-system? value) > + (filter symbol? value)))) > (service-extension fstab-service-type > - file-system-fstab-entries) > + (lambda (value) > + (file-system-fstab-entries > + (filter file-system? value)= ))) >=20=20 > ;; Have 'user-processes' depend on 'file-systems'. > (service-extension user-processes-service-type > (const '(file-systems))))) > + > + ;; Extensions consist of lists of objects = or > + ;; shepherd services=E2=80=99 names (symbols). In the l= atter case, > + ;; the provided shepherd services supposed to mount and > + ;; unmount some file systems themself. Why do we need to extend with symbols? In general it=E2=80=99s much clearer if extensions receive only one type of object ( records in this case). It=E2=80=99s also best to avo= id passing around symbolic names (that=E2=80=99s why we extend with records rather than with Shepherd service names or whatever.) Ludo=E2=80=99. From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/4] Even Better ZFS Support on Guix Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Feb 2021 14:28: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: raid5atemyhomework Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.161296725113388 (code B ref 45692); Wed, 10 Feb 2021 14:28:01 +0000 Received: (at 45692) by debbugs.gnu.org; 10 Feb 2021 14:27:31 +0000 Received: from localhost ([127.0.0.1]:55816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9qSi-0003Tm-LV for submit@debbugs.gnu.org; Wed, 10 Feb 2021 09:27:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9qSg-0003TV-Ln for 45692@debbugs.gnu.org; Wed, 10 Feb 2021 09:27:23 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44294) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9qSa-0008I9-Px; Wed, 10 Feb 2021 09:27:16 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43094 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l9qSU-0008I0-9a; Wed, 10 Feb 2021 09:27:11 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com> Date: Wed, 10 Feb 2021 15:27:08 +0100 In-Reply-To: (raid5atemyhomework@protonmail.com's message of "Fri, 08 Jan 2021 15:02:21 +0000") Message-ID: <87eeho6ls3.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) raid5atemyhomework skribis: >>>From d0e095136cd471f083d92416f12ca22b47301f31 Mon Sep 17 00:00:00 2001 > From: raid5atemyhomework > Date: Wed, 6 Jan 2021 09:24:20 +0800 > Subject: [PATCH 4/4] gnu: Add service to install ZFS. > > * gnu/services/file-systems.scm: New file. > (zfs-service-type): New variable. > (): New type. > (%zfs-zvol-dependency): New variable. > * gnu/local.mk: Add gnu/services/file-systems.scm. > * gnu/services/base.scm (dependency->shepherd-service-name): Export. > * doc/guix.texi (ZFS file system): New subsection. A bit of nitpicking on the documentation bits=E2=80=A6 > +@node ZFS file system > +@subsection ZFS file system Please follow the same typographical conventions as in the rest of the manual. In particular, capitalize section titles and leave two spaces after end-of-sentence periods. Here I recommend s/ZFS file system/ZFS/ in all the text. > +The ZFS file system has a license incompatible with the Linux kernel, > +and thus cannot be distributed with the kernel. However, as a user > +you have the right to do whatever you want on your own hardware, > +including download the ZFS source code, compile it, link it to your > +own private copy of Linux, and run it. You can even use the Guix build > +system to automate this. How about: ZFS is free software; unfortunately its license is incompatible with the GNU General Public License (GPL), the license of the Linux kernel, which means they cannot be distributed together. However, as a user, you can choose to build ZFS and use it together with Linux; you can even rely on Guix to automate this task. See @uref{https://www.fsf.org/licensing/zfs-and-linux, this analysis by the Free Software Foundation} for more information. ? > +As a large and complex kernel module, ZFS on Linux has to be compiled ^ I think it=E2=80=99s a proper noun and is spelled =E2=80=9CZFS-on-Linux=E2= =80=9D. > +with a specific version of the kernel. Often even the latest ZFS > +package available cannot be compiled with the latest Linux kernel ^ s/Linux/Linux-libre/ Thanks, Ludo=E2=80=99. From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/4] Even Better ZFS Support on Guix Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Feb 2021 14:33: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.161296756613912 (code B ref 45692); Wed, 10 Feb 2021 14:33:02 +0000 Received: (at 45692) by debbugs.gnu.org; 10 Feb 2021 14:32:46 +0000 Received: from localhost ([127.0.0.1]:55820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9qXu-0003cK-J2 for submit@debbugs.gnu.org; Wed, 10 Feb 2021 09:32:46 -0500 Received: from mail-40130.protonmail.ch ([185.70.40.130]:51354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9qXs-0003c5-8v for 45692@debbugs.gnu.org; Wed, 10 Feb 2021 09:32:45 -0500 Date: Wed, 10 Feb 2021 14:32:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1612967557; bh=MpaDQVBQ8f5ck7fA1bwdQuXIG33Qn9xo03gJyylv4+M=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=YE3ur6OyAiO6zrF3s7su97HOVQ+BnSh6oQ/1dllusbDGi04vI1E4ZXaVRQ/n/AQxE OdmJOYcI0bZsRphc2LgryFSY+LJfRdlIiiRR+2sx5KGUhPfbxVJmf4zOrn5ibvUUmN mM5nOP7UeNQfnCh6JdhdA9XHXd7JssVSgyfFJpDA= From: raid5atemyhomework Message-ID: In-Reply-To: <87eeho6ls3.fsf_-_@gnu.org> References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com> <87eeho6ls3.fsf_-_@gnu.org> 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.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi Ludo, > raid5atemyhomework raid5atemyhomework@protonmail.com skribis: > > > > From d0e095136cd471f083d92416f12ca22b47301f31 Mon Sep 17 00:00:00 200= 1 > > > From: raid5atemyhomework raid5atemyhomework@protonmail.com > > > Date: Wed, 6 Jan 2021 09:24:20 +0800 > > > Subject: [PATCH 4/4] gnu: Add service to install ZFS. > > > > - gnu/services/file-systems.scm: New file. > > (zfs-service-type): New variable. > > (): New type. > > (%zfs-zvol-dependency): New variable. > > > > - gnu/local.mk: Add gnu/services/file-systems.scm. > > - gnu/services/base.scm (dependency->shepherd-service-name): Export. > > - doc/guix.texi (ZFS file system): New subsection. > > A bit of nitpicking on the documentation bits=E2=80=A6 > > > +@node ZFS file system > > +@subsection ZFS file system > > Please follow the same typographical conventions as in the rest of the > manual. In particular, capitalize section titles and leave two spaces > after end-of-sentence periods. This was imitated from the `@subsection Btrfs file system`. Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/4] Even Better ZFS Support on Guix Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Feb 2021 14:47: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.161296841815182 (code B ref 45692); Wed, 10 Feb 2021 14:47:02 +0000 Received: (at 45692) by debbugs.gnu.org; 10 Feb 2021 14:46:58 +0000 Received: from localhost ([127.0.0.1]:55831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9qld-0003wn-VW for submit@debbugs.gnu.org; Wed, 10 Feb 2021 09:46:58 -0500 Received: from mail-40138.protonmail.ch ([185.70.40.138]:43652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9qla-0003wZ-VJ for 45692@debbugs.gnu.org; Wed, 10 Feb 2021 09:46:56 -0500 Date: Wed, 10 Feb 2021 14:46:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1612968408; bh=+P5ouiEcYLvUVQm8glVp+e1u+fQuAdb8u0ce7sgJdxY=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=D64u2AO96kFAlJGLlsuQnIq4N+lZ3V2JJ22L04sW9x5MfYOv8TlmvSWsdh5Eg+DKk hvb/ga/iCPhcYjsgidofss9l9OrQwA1rjoMUyKOjvN9z9Odg5GDCiyzX1DSYadOkPZ +qO5TKWxvB/daGRuz6NJ81r++vcy7mo7Ye2MkF1I= From: raid5atemyhomework Message-ID: In-Reply-To: <87sg646m7y.fsf_-_@gnu.org> References: <87sg646m7y.fsf_-_@gnu.org> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Why do we need to extend with symbols? > > In general it=E2=80=99s much clearer if extensions receive only one type = of > object ( records in this case). It=E2=80=99s also best to av= oid > passing around symbolic names (that=E2=80=99s why we extend with > records rather than with Shepherd service names or whatever.) For this case, how would it be done? ZFS file system, on other operating systems and distributions, is documente= d as automatically mounting filesystems, without management in an `fstab` o= r similar file, because the intent is that you would make lots of filesyste= ms for various uses and managing an `fstab` would be too onerous. Thus, ZF= S file system expects to mount multiple file systems with a single `zfs mou= nt -a` command at startup. Would the below sketch be acceptable? ```scheme ; gnu/system/file-systems.scm (define-record-type* file-system #;... #;... (has-fstab-entry? file-system-has-fstab-entry? (default #t))) ;... ; gnu/services/base,scm (define file-system-service-type (service-type #;... (extensions (list #;... (service-extension fstab-service-type (lambda (file-systems) (filter file-system-has-fstab-entry? file-systems))) #;...)) #;...)) ;... ; gnu/services/file-systems.scm (define zfs-service-type (service-type #;... (extensions (list #;... (service-extension file-system-service-type (const (list (file-system (device "dummy") (mount-point "zfs/= *") (has-fstab-entry? = #f))))))) #;...)) ``` Then there will be a Shepherd service providing `file-system-zfs/*` which w= ould perform `zfs mount -a -l` on `start` and `zfs unmount -a -f` on `stop`= . Would that be acceptable? I am wary of this since it creates a dummy file-= system and needs an additional field on every `file-system` record, one whi= ch is *only* used by ZFS. I feel the `file-system-target-service-type` is = more generic and does not use trickery. Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/4] Even Better ZFS Support on Guix Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Feb 2021 15:46: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: raid5atemyhomework Cc: Danny Milosavljevic , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.161297190221691 (code B ref 45692); Wed, 10 Feb 2021 15:46:01 +0000 Received: (at 45692) by debbugs.gnu.org; 10 Feb 2021 15:45:02 +0000 Received: from localhost ([127.0.0.1]:56937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9rfp-0005db-U3 for submit@debbugs.gnu.org; Wed, 10 Feb 2021 10:45:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9rfm-0005d4-Cz for 45692@debbugs.gnu.org; Wed, 10 Feb 2021 10:45:00 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45623) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9rff-0006Xc-DM; Wed, 10 Feb 2021 10:44:51 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43354 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l9rfe-0000YD-SJ; Wed, 10 Feb 2021 10:44:51 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <2yOs7mxigs8_Vx_yi858pxAkoyXmU8IidizK5grcmX4M92O5QK-_Ywo9nrHMHvzLGj4U7B9ysl26eNbiPmzmeOQsuFvp5VjouVptRfwxKng=@protonmail.com> Date: Wed, 10 Feb 2021 16:44:49 +0100 In-Reply-To: <2yOs7mxigs8_Vx_yi858pxAkoyXmU8IidizK5grcmX4M92O5QK-_Ywo9nrHMHvzLGj4U7B9ysl26eNbiPmzmeOQsuFvp5VjouVptRfwxKng=@protonmail.com> (raid5atemyhomework@protonmail.com's message of "Wed, 06 Jan 2021 15:54:33 +0000") Message-ID: <87zh0c53m6.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, raid5atemyhomework skribis: >>>From 4beb73c62995cf236b402dad8e1c36016027c781 Mon Sep 17 00:00:00 2001 > From: raid5atemyhomework > Date: Tue, 5 Jan 2021 22:27:56 +0800 > Subject: [PATCH 1/4] gnu: Allow services to install kernel-loadable modul= es. > > * gnu/system.scm (operating-system-directory-base-entries): Remove code > to handle generation of "kernel" and "hurd". > (operating-system-default-essential-services): Instantiate > kernel-loadable-module-service. > (hurd-default-essential-services): Instantiate > kernel-loadable-module-service. > (package-for-kernel): Move ... > * gnu/services.scm: ... to here. > (kernel-loadable-module-service-type): New variable. > (kernel-loadable-module-service): New procedure. > * gnu/tests/linux-modules.scm (run-loadable-kernel-modules-test): Move > code to ... > (run-loadable-kernel-modules-test-base): ... new procedure here. > (run-loadable-kernel-modules-service-test): New procedure. > (%test-loadable-kernel-modules-service-0): New variable. > (%test-loadable-kernel-modules-service-1): New variable. > (%test-loadable-kernel-modules-service-2): New variable. > * doc/guix.texi: Document kernel-loadable-module-service-type. [=E2=80=A6] > +@defvr {Scheme Variable} kernel-loadable-module-service-type > +Type of the service that collects lists of packages containing > +kernel-loadable modules, and adds them to the set of kernel-loadable > +modules. > +@end defvr Would be nice to expound a bit here, in particular by adding an example (along the lines of those used in system tests maybe?). Otherwise it can be hard to fathom how this is meant to be used. > +;; Configuration for the kernel builder. > +(define-record-type* kernel-builder-confi= guration > + make-kernel-builder-configuration > + kernel-builder-configuration? > + this-kernel-builder-configuration > + > + (kernel kernel-builder-configuration-kernel (default #f)) > + (hurd kernel-builder-configuration-hurd (default #f)) > + (modules kernel-builder-configuration-modules (default '()))) How about instead? In general, throughout the project, we do not use =E2=80=9Ckernel=E2=80=9D = and =E2=80=9CLinux=E2=80=9D interchangeably. Since this is a Linux-only feature, let=E2=80=99s call it= that way and remove the =E2=80=98hurd=E2=80=99 field (the Hurd has no notion of = in-kernel modules since pretty much everything happens in user-space.) > +(define kernel-loadable-module-service-type > + (service-type (name 'kernel-loadable-modules) Same here: =E2=80=98linux-loadable-module-service-type=E2=80=99. But=E2=80=A6 it=E2=80=99s not clear at first sight how this differs from th= e existing =E2=80=98kernel-module-loader=E2=80=99. Perhaps =E2=80=98linux-build-servi= ce-type=E2=80=99 would be more accurate? Or am I missing something? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 10 10:47:37 2021 Received: (at control) by debbugs.gnu.org; 10 Feb 2021 15:47:37 +0000 Received: from localhost ([127.0.0.1]:56944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9riL-0005i4-JM for submit@debbugs.gnu.org; Wed, 10 Feb 2021 10:47:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9riK-0005hq-SC for control@debbugs.gnu.org; Wed, 10 Feb 2021 10:47:37 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45655) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9riF-0007aK-KR for control@debbugs.gnu.org; Wed, 10 Feb 2021 10:47:31 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43368 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l9riE-0000l8-Vx for control@debbugs.gnu.org; Wed, 10 Feb 2021 10:47:31 -0500 Date: Wed, 10 Feb 2021 16:47:29 +0100 Message-Id: <87y2fv6i26.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #45692 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) merge 45692 45703 quit From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 10 10:48:02 2021 Received: (at control) by debbugs.gnu.org; 10 Feb 2021 15:48:02 +0000 Received: from localhost ([127.0.0.1]:56947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9rij-0005il-T4 for submit@debbugs.gnu.org; Wed, 10 Feb 2021 10:48:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9rii-0005iT-Gb for control@debbugs.gnu.org; Wed, 10 Feb 2021 10:48:00 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45659) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9rid-0007jf-9N for control@debbugs.gnu.org; Wed, 10 Feb 2021 10:47:55 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43372 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l9ric-0000li-SD for control@debbugs.gnu.org; Wed, 10 Feb 2021 10:47:55 -0500 Date: Wed, 10 Feb 2021 16:47:53 +0100 Message-Id: <87wnvf6i1i.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #45692 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) merge 45692 45643 quit From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/4] Even Better ZFS Support on Guix Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Feb 2021 16:50: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Danny Milosavljevic , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16129758013716 (code B ref 45692); Wed, 10 Feb 2021 16:50:01 +0000 Received: (at 45692) by debbugs.gnu.org; 10 Feb 2021 16:50:01 +0000 Received: from localhost ([127.0.0.1]:57097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9sgi-0000xr-N4 for submit@debbugs.gnu.org; Wed, 10 Feb 2021 11:50:00 -0500 Received: from mail4.protonmail.ch ([185.70.40.27]:13189) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9sgh-0000xd-KP for 45692@debbugs.gnu.org; Wed, 10 Feb 2021 11:50:00 -0500 Date: Wed, 10 Feb 2021 16:49:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1612975792; bh=OYp5BBpXT+pt7UqkRkTUinLGi8WDuTPB5HNigwwIfwc=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=qULyoRUncvnNzZX0J8eqrrLZKGy0l3huoilU5Cv2tfJId7XNjB2gEsu53soaol+uP QOdbmRsSLOR9Iv8Lej1GJL6xJQcbc8Y8YRnOgW5mwT4F8Qw62wLNXB1scRMgufAfTT o7rBfP1fF8FmKOBCopvbbKoAId6dPF4X9uGyuJJo= From: raid5atemyhomework Message-ID: In-Reply-To: <87zh0c53m6.fsf_-_@gnu.org> References: <2yOs7mxigs8_Vx_yi858pxAkoyXmU8IidizK5grcmX4M92O5QK-_Ywo9nrHMHvzLGj4U7B9ysl26eNbiPmzmeOQsuFvp5VjouVptRfwxKng=@protonmail.com> <87zh0c53m6.fsf_-_@gnu.org> 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.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > > +;; Configuration for the kernel builder. > > +(define-record-type* kernel-builder-con= figuration > > > > - make-kernel-builder-configuration > > - kernel-builder-configuration? > > - this-kernel-builder-configuration > > - > > - (kernel kernel-builder-configuration-kernel (default #f)) > > - (hurd kernel-builder-configuration-hurd (default #f)) > > - (modules kernel-builder-configuration-modules (default '()))) > > How about instead? > > In general, throughout the project, we do not use =E2=80=9Ckernel= =E2=80=9D and =E2=80=9CLinux=E2=80=9D > interchangeably. Since this is a Linux-only feature, let=E2=80=99s call i= t that > way and remove the =E2=80=98hurd=E2=80=99 field (the Hurd has no notion o= f in-kernel > modules since pretty much everything happens in user-space.) The `operating-system` record uses `kernel-loadable-modules` as the record = field name. I suggest changing that first, if you truly want to differenti= ate "kernel" from "linux" "throughout the project". Or deprecate it entire= ly and instead use the new `linux-loadable-modules-service-type`, in princi= ple the only field needed in `operating-system` should be `services`. > > > +(define kernel-loadable-module-service-type > > > > - (service-type (name 'kernel-loadable-modules) > > Same here: =E2=80=98linux-loadable-module-service-type=E2=80=99. > > But=E2=80=A6 it=E2=80=99s not clear at first sight how this differs from = the existing > =E2=80=98kernel-module-loader=E2=80=99. Perhaps =E2=80=98linux-build-serv= ice-type=E2=80=99 would be > more accurate? Or am I missing something? `kernel-module-loader` explicitly loads a module at startup, it does not ma= ke a non-Linux-libre-built-in module actually *loadable*. So there is a ne= ed for something to augment the `linux-loadable-modules` record field of `o= perating-system`. Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/4] Even Better ZFS Support on Guix Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Feb 2021 01:50: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.161318096331425 (code B ref 45692); Sat, 13 Feb 2021 01:50:02 +0000 Received: (at 45692) by debbugs.gnu.org; 13 Feb 2021 01:49:23 +0000 Received: from localhost ([127.0.0.1]:33266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAk3n-0008Am-E2 for submit@debbugs.gnu.org; Fri, 12 Feb 2021 20:49:23 -0500 Received: from mail-40132.protonmail.ch ([185.70.40.132]:54282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAk3i-0008AJ-Og for 45692@debbugs.gnu.org; Fri, 12 Feb 2021 20:49:20 -0500 Date: Sat, 13 Feb 2021 01:49:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1613180951; bh=nFtjDIdcilGJnBLHikjgo9HqHW88QRpZIgzQqrp7bmc=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=wi4kgscd/bKUJJDTz45YJb23tI3H9M0wS7U+yc3ETCDjUQdqctyMvyqJx9dA1tWkK u7cxysTNWBr35qSOBGs16Oz77FpqldjfbpemJvcC6GiDcK0iX2CxlMfB2iMlbgKzJG O2lToNw0K4Gd3LoRzq3RPjB/UnD54AwAJX5mbai8= From: raid5atemyhomework Message-ID: <20Uzjlb-aGAMYW_UfB_P-PUylV-NrHRtq3NpXLe6Fsfuuq-wssW64sgoWoRSzwQdj-t5g2P4ebBJR2fllYCiQc5LyLb8oc2YrDs021q9u-g=@protonmail.com> In-Reply-To: <87eeho6ls3.fsf_-_@gnu.org> References: <6wemXB-PfHUqbuVr5-XRf0-tY4cKGGtKiUqrZPrIZYXoBw17L3xRuZrGOJQfTo5PKfFNCM8KyRTllidoc7asPE2x98BTiJSPVR7OSjxCuw8=@protonmail.com> <87eeho6ls3.fsf_-_@gnu.org> 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.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello Ludo', > > +As a large and complex kernel module, ZFS on Linux has to be compiled > > ^ > > > I think it=E2=80=99s a proper noun and is spelled =E2=80=9CZFS-on-Linux= =E2=80=9D. FWIW ZFSonLinux is now folded into OpenZFS (which is now a package that inc= ludes both Linux and FreeBSD support, with plans to merge in the Illumos co= debase as well) since 2.0.0. The documentation was written when Guix was s= till at 0.8.5 (when it was definitely ZoL), so I should probably change thi= s to OpenZFS, and clarify whether I am referring to the ZFS file system or = the OpenZFS package. Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] ZFS on Guix, again Resent-From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Feb 2021 11:44: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: "guix-devel@gnu.org" , Ludovic =?UTF-8?Q?Court=C3=A8s?= , 45692@debbugs.gnu.org Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.161382138311009 (code B ref 45692); Sat, 20 Feb 2021 11:44:02 +0000 Received: (at 45692) by debbugs.gnu.org; 20 Feb 2021 11:43:03 +0000 Received: from localhost ([127.0.0.1]:51142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lDQf8-0002rB-Pt for submit@debbugs.gnu.org; Sat, 20 Feb 2021 06:43:03 -0500 Received: from mail-oln040092253108.outbound.protection.outlook.com ([40.92.253.108]:64912 helo=APC01-SG2-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lDQf6-0002qa-Jo for 45692@debbugs.gnu.org; Sat, 20 Feb 2021 06:43:01 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EA4bQT3I94SrTfCqNX5GmqH+DsV1mmNS+C+NixvNhaAc950naXUH+IHw/34pFewcgtlY/0kvcvli4svYS6efoRp/wWwyVjb3Ei6yOs9kdgLQL+DD36I49YCo95baBUErNYyWVtmGCGrKT5ySaORIBsa/NXW8YsPUc1WQOunZEHGZPGa5GB1ZPi5UfDFOfq+s1cfsMgpIoxUqws9+dz0r97gKGYvmECHK8RYInCRGXG1ioQp4tzf5yRgBuiXVh8rUmOwxK+1UoEgm9mLfhMbzZD6HPWa35nn5n+Ghefzcp5N0GvVBldTCRAWpZxLAFwOyeFWLCKGtlK5I2g2gRSETGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3YSZyGG5RpCHCPAYQMU5+b1HJyW1wqbQvoaOJinjvPE=; b=VFc5kyOK2yu41U3zqXlb5LFgjW1HTjYxstA3TuIxh5Ciq5hLCf1/Tm6yXyAXaf5gvT8M2AH6WeD0VstOicOWW5sCbn0Wai0NyBm0sta/sU+8OWBAHrhHTA+LjZrUNLGVMG2pFeoXw2kZY+jBJjgAudcpfzeufSnpdOUyxOcG09QlaINgtV4hBXbt/ioWlc/K3BngJNB/GWNi+mNEw7V0Xoz7DN9hhIxTYKplrsg+MbrwSSSicVUMIWm6UVrjkF7hxsxPmxFro+eeX3k5S47wM1c/ehfucnYWqhc47lXsDi+76xKZvkmilTRVWHVcv350gQkKfRlIhC1bwHVB6vwh2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3YSZyGG5RpCHCPAYQMU5+b1HJyW1wqbQvoaOJinjvPE=; b=Nfz3rJLOT/LRgaSbqq07mFO1JQUdS4l2Ohgs1DHPkeL1hWIEBeE1Cbxt1i7wUV9NaV6VeXHfBF3mC5At0Z0Ujm9KRJTHpZAlOoz3rHiEdQPWVaapYMhgd+5UUqf585gBxNxsgo31KBI+ez77vF5mLXL8kag9kytJfeCJVvmOTlza+uxTurZ6wdUtZHe7l4X/EE80Pm1bu1I4F3TMcFVHeluTEWO7w9+tP40y0PTT2iS9jx/YF6WBFSQePM53L8nIb0cv6hpVkm54ETekPAiyp09L1Mov8ElNeAYopCFmeWzDy8Vse8/M9ktVUfea+FbH7EzCC2Nbj0yWlmgW01wf7A== Received: from SG2APC01FT062.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebd::47) by SG2APC01HT210.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebd::471) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.27; Sat, 20 Feb 2021 11:42:47 +0000 Received: from OS3P286MB0660.JPNP286.PROD.OUTLOOK.COM (2a01:111:e400:7ebd::46) by SG2APC01FT062.mail.protection.outlook.com (2a01:111:e400:7ebd::417) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.27 via Frontend Transport; Sat, 20 Feb 2021 11:42:47 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:48B493884BF96639DE4552D4DB5F5915C2AB3F22666623496EE930C45F917BA9; UpperCasedChecksum:A6AABE73A988609F50F55AAC985E2D069ABCF4108B4F5383C000A1C771EF365F; SizeAsReceived:7817; Count:46 Received: from OS3P286MB0660.JPNP286.PROD.OUTLOOK.COM ([fe80::9dbe:2c7:8c21:a40d]) by OS3P286MB0660.JPNP286.PROD.OUTLOOK.COM ([fe80::9dbe:2c7:8c21:a40d%7]) with mapi id 15.20.3868.030; Sat, 20 Feb 2021 11:42:47 +0000 From: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= References: Date: Sat, 20 Feb 2021 19:44:34 +0800 In-Reply-To: (raid5atemyhomework@protonmail.com's message of "Sat, 20 Feb 2021 08:48:04 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Content-Type: text/plain X-TMN: [nyiGdd0qosyfjqVtuxVOI/zabaLgsTMHx8lRvbtz+WXpnuXkoSuEDhG5TzkJt32R] X-ClientProxiedBy: AM8P191CA0028.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:21a::33) To OS3P286MB0660.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:e4::6) X-Microsoft-Original-Message-ID: <87ft1r2cbh.fsf@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (2409:8a62:373:4790:2f1:f5ff:fe18:6bb) by AM8P191CA0028.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:21a::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.27 via Frontend Transport; Sat, 20 Feb 2021 11:42:45 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 157db083-3087-48f0-e235-08d8d594a497 X-MS-TrafficTypeDiagnostic: SG2APC01HT210: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZBxT+JXwUflJMWbiMjU+zgQf2ypwqKcjw3I3Ywizlg0hxfXSZYWAGfqfUu0fY5qfMIaIBGDqy8iUiL2kb54agdt0RaZFcGM4O813c6ZmT/c2ICLIwYaqslBdFIr+h+MDm49fjcMBbYedNstSh/UYl4/jYLbtJeIeNrT5VT0iiGwiEwfPTjyB6Y0jOoqADWtRS81uJpxTlTU5sAhQo5D8nn+UVm2nqq7N3m1czW9TiTURkgREACMMz8OlmJwoeJpabAIX6ewqg6a6n5F9HnvazEKAxtKX+vQn5jON89NyCbNcPJqH7A5l8S8s5BHBQv0EN8t9OmsdDFwc5p562PW9xZse480/wKoKJlzNNhWY/FUZDtQ1KZeGcgkw3vwcjLdn X-MS-Exchange-AntiSpam-MessageData: 0w82LLYL6JDr9+J6U/aNrHyp9KqITYRuvQxB30pqy9a4EhWJNai0ZlycfDUtvJHVQePsBWF5L0tFkEDwBMRJH4XXPZNN26j1rFDFV+M0Kv5+oQzrqJL8E8Z53bYg/OO62rLc3G9VBTvlpjgMwSE99IAlpZt3sPs2+LUe3kkEu4yx8vB9nzq8MSkyZWrQEnnv4Sh1VAMhYr3Hf6VdkfdL0A== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 157db083-3087-48f0-e235-08d8d594a497 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2021 11:42:47.1395 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: SG2APC01FT062.eop-APC01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2APC01HT210 X-Spam-Score: -0.0 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) raid5atemyhomework writes: > Hi guix-devel, > > I had some questions on the big ZFS guix bugpatches a week ago, and > did not find any response, so I am back here pestering everyone. Hello, thank you for working on ZFS for guix! > > [...] > There are two alternatives: > > * Go with what I already proposed which I think is more general-purpose and cleaner (there is a separate service type that accepts symbols, and a separate service type that accepts `` records, and the latter just extends the former). > * Don't make a separate service type, but now we need to add some kind of `fstab?` field to `file-system` so that the ZFS shepherd service that mounts ZFS file systems will not be included in the `/etc/fstab`. > > I think overall that having lots of tiny service types that are then > combined together fits the functional design of Guix better. So I > would strongly propose my original design rather than hacks on top of > `file-system-service-type`. Well, I think the 'file-system-service-type' should handle all file systems related configurations, but my opion is not strong. Waiting ludo to decide... From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v3 0/3] New patch series for Even Better ZFS Support on Guix References: In-Reply-To: Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 22 Mar 2021 14:34: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16164235977287 (code B ref 45692); Mon, 22 Mar 2021 14:34:01 +0000 Received: (at 45692) by debbugs.gnu.org; 22 Mar 2021 14:33:17 +0000 Received: from localhost ([127.0.0.1]:58237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOLcK-0001tS-OS for submit@debbugs.gnu.org; Mon, 22 Mar 2021 10:33:17 -0400 Received: from mail-40141.protonmail.ch ([185.70.40.141]:42384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOLcI-0001tF-Ve for 45692@debbugs.gnu.org; Mon, 22 Mar 2021 10:33:16 -0400 Date: Mon, 22 Mar 2021 14:33:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1616423588; bh=DC02iGnLztxxykyEBl27bvddguEo/755+Ne4CN7ZtdA=; h=Date:To:From:Reply-To:Subject:From; b=nHnnzL4wPST9/Xd7FPFbnxNL/mLDznyJ4Y0XQJPFJvlgbp4pcubF22PdD7g9HEDt9 YYhDOMeES3dTk+Qw99mxv0uLNHbPAC47CnizGRL9E+s+B3RfzlVOG0oVSb46hrZz4C UJhTfOdr75+/PFwgSkoIjWDFaOWyAY/Utc5beI+Q= From: raid5atemyhomework Message-ID: 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This is a new patch series, please completely forget the previous patch ser= ies. Notable differences are: * ZFS automounted datasets are mounted before `user-processes` instead of `= file-systems`, since there is strong objection to modifying `file-systems` = so it can be extended to allow ZFS automounted datasets to be mounted befor= e `file-systems`. This prevents easy `/home` on ZFS (though see the added = documentation in 3/3 for a workaround). * The old `kernel-loadable-module-service-type` is renamed to `linux-loadab= le-module-service-type`, despite the corresponding `operating-system` field= being named `kernel-loadable-modules`, and the loader service type being n= amed `kernel-module-loader-service-type` :rolleyes:. * There is a new `linux-builder-service-type`, which can be extended with a= function to modify its `linux-builder-configuration`. The `linux-loadable= -module-service-type` extends this base service. I think this design pattt= ern should be more extensively used in Guix; currently services are only ex= tensible via one field of their configuration, this pattern allows creating= multiple service types for each extensible field of the configuration. In= this particular case, the `kernel` of the `linux-builder-service-type` can= be extended (by adding/removing `configure` or `make` flags, or added `inp= uts`) independently of the list of loadable modules using this design patte= rn. * Auto-scrub and auto-snapshot is now supported, with additional fields in = `zfs-configuration` to support it. * The auto-mounting Shepherd service has been renamed `zfs-auto-mount` (pre= viously `zfs-automount`). * Documentation includes a list of things that are currently not (fully) su= pported. Personally I'm not particularly motivated to push this anymore. I have a f= rankenstein's `configuration.scm` that gets me the bits of ZFS functionalit= y that I absolutely need, with the rest something I'm just living without, = and while it would be *nice* to have *some* out-of-the-box support for ZFS = (or at least make it easy to get a box to get support for ZFS out of), I pe= rsonally don't need it at this point. Patch 1/3 corresponds to the original Patch 1/4. Patch 2/3 has no correspo= nding patch in the original patch set, but is the same patch as https://iss= ues.guix.gnu.org/47134 which nobody is looking at, as usual. Patch 3/3 cor= responds to the original Patch 4/4. The original Patch 2/4 has been removed since it's what makes `/home` on ZF= S work by making `file-systems` extensible. The original Patch 3/4 was alr= eady merged. This patch series is minimally tested compared to the previous patch series= ; I have homework to store on my ZFS pool and should really stop fooling ar= ound with the operating system. I have this patch series running in a VM w= ith a ZFS pool. Auto-scrub is not tested, though auto-snapshot looks worki= ng. Auto-mounting works as with previous patch series. Encrypted and comp= ressed filesystems are untested but I don't expect it to be significantly r= egressed compared to the previous patch series. More work can be done for ZFS support. But I think the current set gives a= workable ZFS support; further work can be done piecemeal afterwards. The = documentation includes notes for anyone who feels motivated enough to keep = improving the ZFS support. Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v3 1/3] gnu: Allow services to install kernel-loadable modules. References: In-Reply-To: Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 22 Mar 2021 14:35: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16164236437374 (code B ref 45692); Mon, 22 Mar 2021 14:35:02 +0000 Received: (at 45692) by debbugs.gnu.org; 22 Mar 2021 14:34:03 +0000 Received: from localhost ([127.0.0.1]:58240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOLcz-0001uM-5P for submit@debbugs.gnu.org; Mon, 22 Mar 2021 10:34:03 -0400 Received: from mail-40137.protonmail.ch ([185.70.40.137]:18535) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOLcw-0001u8-Uk for 45692@debbugs.gnu.org; Mon, 22 Mar 2021 10:33:56 -0400 Date: Mon, 22 Mar 2021 14:33:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1616423627; bh=nC0SrT1UUqmuzzJcLCVexazP+FJ9FVBa+IiJp76WntA=; h=Date:To:From:Reply-To:Subject:From; b=D6Mp92VTvJjiM0x7mwj3F8aFsiOspXJJRoSLGUHqyeGmuENEI/RP9FdnFggNGDeuy 2lzda1PvhpTTzqQoRgo03PfZ+GpHL4usBHKOKuYZPeM63SP05Vdj4WFPwF12mBJ1jC bPS6JiZoSHErd8f1wp/FMCYPlPCnaobRW1whkplE= From: raid5atemyhomework Message-ID: 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >From d54d718dd83195041d9f536e8c675eb2bffdcb8d Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Mon, 22 Mar 2021 11:23:32 +0800 Subject: [PATCH 1/3] gnu: Allow services to install kernel-loadable modules= . * gnu/system.scm (operating-system-directory-base-entries): Remove code to handle generation of "kernel" for linux-libre kernels. (operating-system-default-essential-services): Instantiate linux-builder-service-type. (package-for-kernel): Move ... * gnu/services.scm: ... to here. (linux-builder-service-type): New variable. (linux-builder-configuration): New type. (linux-loadable-module-service-type): New variable. * gnu/tests/linux-modules.scm (run-loadable-kernel-modules-test): Move code to ... (run-loadable-kernel-modules-test-base): ... new procedure here. (run-loadable-kernel-modules-service-test): New procedure. (%test-loadable-kernel-modules-service-0): New variable. (%test-loadable-kernel-modules-service-1): New variable. (%test-loadable-kernel-modules-service-2): New variable. * doc/guix.texi: Document linux-loadable-module-service-type. --- doc/guix.texi | 22 +++++++++ gnu/services.scm | 90 +++++++++++++++++++++++++++++++++++++ gnu/system.scm | 34 ++++---------- gnu/tests/linux-modules.scm | 80 ++++++++++++++++++++++++++++----- 4 files changed, 191 insertions(+), 35 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 386169b2a5..86b22f3673 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33967,6 +33967,28 @@ configuration when you use @command{guix system re= configure}, @command{guix system init}, or @command{guix deploy}. @end defvr +@defvr {Scheme Variable} linux-loadable-module-service-type +Type of the service that collects lists of packages containing +kernel-loadable modules, and adds them to the set of kernel-loadable +modules. + +This service type is intended to be extended by other service types, +such as below: + +@lisp +(define module-installing-service-type + (service-type + (name 'module-installing-service) + (extensions (list (service-extension linux-loadable-module-service-typ= e + (const (list module-to-install-1 + module-to-install-2)= )))) + (default-value #f))) +@end lisp + +This does not actually load modules at bootup, only adds it to the +kernel profile so that it @emph{can} be loaded by other means. +@end defvr + @node Shepherd Services @subsection Shepherd Services diff --git a/gnu/services.scm b/gnu/services.scm index ddd1bac30c..a20edeb8ec 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -2,6 +2,7 @@ ;;; Copyright =C2=A9 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Court= =C3=A8s ;;; Copyright =C2=A9 2016 Chris Marusich ;;; Copyright =C2=A9 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright =C2=A9 2021 raid5atemyhomework ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,6 +34,8 @@ #:use-module (guix diagnostics) #:autoload (guix openpgp) (openpgp-format-fingerprint) #:use-module (guix modules) + #:use-module (guix packages) + #:use-module (guix utils) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages hurd) @@ -106,6 +109,12 @@ profile-service-type firmware-service-type gc-root-service-type + linux-builder-service-type + linux-builder-configuration + linux-builder-configuration? + linux-builder-configuration-kernel + linux-builder-configuration-modules + linux-loadable-module-service-type %boot-service %activation-service @@ -872,6 +881,87 @@ as Wifi cards."))) will not be reclaimed by the garbage collector.") (default-value '()))) +;; Configuration for the Linux kernel builder. +(define-record-type* + linux-builder-configuration + make-linux-builder-configuration + linux-builder-configuration? + this-linux-builder-configuration + + (kernel linux-builder-configuration-kernel) ; packag= e + (modules linux-builder-configuration-modules (default '()))) ; list o= f packages + +(define (package-for-kernel target-kernel module-package) + "Return a package like MODULE-PACKAGE, adapted for TARGET-KERNEL, if +possible (that is if there's a LINUX keyword argument in the build system)= ." + (package + (inherit module-package) + (arguments + (substitute-keyword-arguments (package-arguments module-package) + ((#:linux kernel #f) + target-kernel))))) + +(define (linux-builder-configuration->system-entry config) + "Return the kernel entry of the 'system' directory." + (let* ((kernel (linux-builder-configuration-kernel config)) + (modules (linux-builder-configuration-modules config)) + (kernel (profile + (content (packages->manifest + (cons kernel + (map (lambda (module) + (cond + ((package? module) + (package-for-kernel kernel m= odule)) + ;; support (,package "kernel-= module-output") + ((and (list? module) (package= ? (car module))) + (cons (package-for-kernel ke= rnel + (c= ar module)) + (cdr module))) + (else + module))) + modules)))) + (hooks (list linux-module-database))))) + (with-monad %store-monad + (return `(("kernel" ,kernel)))))) + +(define linux-builder-service-type + (service-type (name 'linux-builder) + (extensions + (list (service-extension system-service-type + linux-builder-configuration->sy= stem-entry))) + (default-value '()) + (compose identity) + (extend (lambda (config modifiers) + (if (null? modifiers) + config + ((apply compose modifiers) config)))) + (description "Builds the linux-libre kernel profile, conta= ining +the kernel itself and any linux-loadable kernel modules. This can be exte= nded +with a function that accepts the current configuration and returns a new +configuration."))) + +(define (linux-loadable-module-builder-modifier modules) + "Extends linux-builder-service-type by appending the given MODULES to th= e +configuration of linux-builder-service-type." + (lambda (config) + (linux-builder-configuration + (inherit config) + (modules (append (linux-builder-configuration-modules config) + modules))))) + +(define linux-loadable-module-service-type + (service-type (name 'linux-loadable-modules) + (extensions + (list (service-extension linux-builder-service-type + linux-loadable-module-builder-m= odifier))) + (default-value '()) + (compose concatenate) + (extend append) + (description "Adds packages and package outputs as modules +included in the booted linux-libre profile. Other services can extend thi= s +service type to add particular modules to the set of linux-loadable module= s."))) + + =0C ;;; ;;; Service folding. diff --git a/gnu/system.scm b/gnu/system.scm index 5bf2a85272..7cc4f134b7 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -13,6 +13,7 @@ ;;; Copyright =C2=A9 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright =C2=A9 2020 Efraim Flashner ;;; Copyright =C2=A9 2021 Maxime Devos +;;; Copyright =C2=A9 2021 raid5atemyhomework ;;; ;;; This file is part of GNU Guix. ;;; @@ -601,16 +602,6 @@ OS." (file-append (operating-system-kernel os) "/" (system-linux-image-file-name)))) -(define (package-for-kernel target-kernel module-package) - "Return a package like MODULE-PACKAGE, adapted for TARGET-KERNEL, if -possible (that is if there's a LINUX keyword argument in the build system)= ." - (package - (inherit module-package) - (arguments - (substitute-keyword-arguments (package-arguments module-package) - ((#:linux kernel #f) - target-kernel))))) - (define %default-modprobe-blacklist ;; List of kernel modules to blacklist by default. '("usbmouse" ;races with bcm5974, see @@ -628,23 +619,12 @@ value of the SYSTEM-SERVICE-TYPE service." (let* ((locale (operating-system-locale-directory os)) (kernel (operating-system-kernel os)) (hurd (operating-system-hurd os)) - (modules (operating-system-kernel-loadable-modules os)) - (kernel (if hurd - kernel - (profile - (content (packages->manifest - (cons kernel - (map (lambda (module) - (if (package? module) - (package-for-kernel kern= el - modu= le) - module)) - modules)))) - (hooks (list linux-module-database))))) (initrd (and (not hurd) (operating-system-initrd-file os))) (params (operating-system-boot-parameters-file os))) - `(("kernel" ,kernel) - ,@(if hurd `(("hurd" ,hurd)) '()) + `(,@(if hurd + `(("hurd" ,hurd) + ("kernel" ,kernel)) + '()) ("parameters" ,params) ,@(if initrd `(("initrd" ,initrd)) '()) ("locale" ,locale)))) ;used by libc @@ -664,6 +644,10 @@ bookkeeping." (host-name (host-name-service (operating-system-host-name os))) (entries (operating-system-directory-base-entries os))) (cons* (service system-service-type entries) + (service linux-builder-service-type + (linux-builder-configuration + (kernel (operating-system-kernel os)) + (modules (operating-system-kernel-loadable-modules = os)))) %boot-service ;; %SHEPHERD-ROOT-SERVICE must come last so that the gexp that diff --git a/gnu/tests/linux-modules.scm b/gnu/tests/linux-modules.scm index 953b132ef7..30d8eae03b 100644 --- a/gnu/tests/linux-modules.scm +++ b/gnu/tests/linux-modules.scm @@ -2,6 +2,7 @@ ;;; Copyright =C2=A9 2019 Jakob L. Kreuze ;;; Copyright =C2=A9 2020 Danny Milosavljevic ;;; Copyright =C2=A9 2020 Brice Waegeneire +;;; Copyright =C2=A9 2021 raid5atemyhomework ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,7 +35,10 @@ #:use-module (guix utils) #:export (%test-loadable-kernel-modules-0 %test-loadable-kernel-modules-1 - %test-loadable-kernel-modules-2)) + %test-loadable-kernel-modules-2 + %test-loadable-kernel-modules-service-0 + %test-loadable-kernel-modules-service-1 + %test-loadable-kernel-modules-service-2)) ;;; Commentary: ;;; @@ -66,17 +70,11 @@ that MODULES are actually loaded." (member module modules string=3D?)) '#$modules)))))) -(define* (run-loadable-kernel-modules-test module-packages module-names) - "Run a test of an OS having MODULE-PACKAGES, and verify that MODULE-NAME= S -are loaded in memory." +(define* (run-loadable-kernel-modules-test-base base-os module-names) + "Run a test of BASE-OS, verifying that MODULE-NAMES are loaded in memory= ." (define os (marionette-operating-system - (operating-system - (inherit (simple-operating-system)) - (services (cons (service kernel-module-loader-service-type module-na= mes) - (operating-system-user-services - (simple-operating-system)))) - (kernel-loadable-modules module-packages)) + base-os #:imported-modules '((guix combinators)))) (define vm (virtual-machine os)) (define (test script) @@ -98,6 +96,36 @@ are loaded in memory." (gexp->derivation "loadable-kernel-modules" (test (modules-loaded?-program os module-names)))) +(define* (run-loadable-kernel-modules-test module-packages module-names) + "Run a test of an OS having MODULE-PACKAGES, and verify that MODULE-NAME= S +are loaded in memory." + (run-loadable-kernel-modules-test-base + (operating-system + (inherit (simple-operating-system)) + (services (cons (service kernel-module-loader-service-type module-na= mes) + (operating-system-user-services + (simple-operating-system)))) + (kernel-loadable-modules module-packages)) + module-names)) + +(define* (run-loadable-kernel-modules-service-test module-packages module-= names) + "Run a test of an OS having MODULE-PACKAGES, which are loaded by creatin= g a +service that extends LINUXL-LOADABLE-MODULE-SERVICE-TYPE. Then verify that +MODULE-NAMES are loaded in memory." + (define module-installing-service-type + (service-type + (name 'module-installing-service) + (extensions (list (service-extension linux-loadable-module-service-t= ype + (const module-packages)))) + (default-value #f))) + (run-loadable-kernel-modules-test-base + (operating-system + (inherit (simple-operating-system)) + (services (cons* (service module-installing-service-type) + (operating-system-user-services + (simple-operating-system))))) + module-names)) + (define %test-loadable-kernel-modules-0 (system-test (name "loadable-kernel-modules-0") @@ -129,3 +157,35 @@ with two extra modules.") (package-arguments ddcci-driver-linux)))))) '("acpi_call" "ddcci"))))) + +(define %test-loadable-kernel-modules-service-0 + (system-test + (name "loadable-kernel-modules-service-0") + (description "Tests loadable kernel modules extensible service with no +extra modules.") + (value (run-loadable-kernel-modules-service-test '() '())))) + +(define %test-loadable-kernel-modules-service-1 + (system-test + (name "loadable-kernel-modules-service-1") + (description "Tests loadable kernel modules extensible service with one +extra module.") + (value (run-loadable-kernel-modules-service-test + (list ddcci-driver-linux) + '("ddcci"))))) + +(define %test-loadable-kernel-modules-service-2 + (system-test + (name "loadable-kernel-modules-service-2") + (description "Tests loadable kernel modules extensible service with two +extra modules.") + (value (run-loadable-kernel-modules-service-test + (list acpi-call-linux-module + (package + (inherit ddcci-driver-linux) + (arguments + `(#:linux #f + ,@(strip-keyword-arguments '(#:linux) + (package-arguments + ddcci-driver-linux)))))) + '("acpi_call" "ddcci"))))) -- 2.31.0 From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v3 2/3] gnu: Add zfs-auto-snapshot. References: In-Reply-To: Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 22 Mar 2021 14:35: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16164236817427 (code B ref 45692); Mon, 22 Mar 2021 14:35:02 +0000 Received: (at 45692) by debbugs.gnu.org; 22 Mar 2021 14:34:41 +0000 Received: from localhost ([127.0.0.1]:58244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOLdh-0001vj-A7 for submit@debbugs.gnu.org; Mon, 22 Mar 2021 10:34:41 -0400 Received: from mail-40141.protonmail.ch ([185.70.40.141]:34184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOLdf-0001vX-KP for 45692@debbugs.gnu.org; Mon, 22 Mar 2021 10:34:40 -0400 Date: Mon, 22 Mar 2021 14:34:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1616423673; bh=QQM+qwaT1UTcQHbQW8JOM7Zj5IQqKU2fIhbum0hDGSM=; h=Date:To:From:Reply-To:Subject:From; b=IE2RzgCDCj6AUqxMq/WkpEeEYxhA+hUlqW2gKt4E5xpGdjAQ+sJl4l4EupiS5waR/ ZRkkPsPmF3jIXBNUIF4FqXI5reNMxZNWw4WXMLfwFSGHzfRUmJ2KcziK3ieIDMYjNf N8tTGC0D8Hs9TaqJQpYvMiHUMwS6jG2OwVax5FzQ= From: raid5atemyhomework Message-ID: <2c97vRukDGd4mnnPwPzLZOBq6qR5EqiBvaevyGcaoh1zc8NQkJO8y2DvtaMuafb6R9m5_Hhizx41nJjyggYPiHNXmnYKkQCejKsw_n1-wec=@protonmail.com> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >From 481dc87f77743b7a282777656e78615ea57d19cc Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Sun, 14 Mar 2021 16:40:47 +0800 Subject: [PATCH 2/3] gnu: Add zfs-auto-snapshot. * gnu/packages/file-systems.scm (zfs-auto-snapshot): New variable. --- gnu/packages/file-systems.scm | 75 +++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm index 198653c639..6877f89f6e 100644 --- a/gnu/packages/file-systems.scm +++ b/gnu/packages/file-systems.scm @@ -976,6 +976,81 @@ originally developed for Solaris and is now maintained= by the OpenZFS community.") (license license:cddl1.0))) +(define-public zfs-auto-snapshot + (package + (name "zfs-auto-snapshot") + (version "1.2.4") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/zfsonlinux/zfs-auto-snapshot/archive/up= stream/" + version ".tar.gz")) + (sha256 + (base32 "16ry1w43i44xc67gr73x6fa48ninfhqxr498ad4m3kya93vp2zrh"))= )) + (build-system gnu-build-system) + (inputs + ;; Note: if you are inheriting from the above zfs package in order + ;; to provide a specific stable kernel version, you should also + ;; inherit this package and replace the sole input below. + `(("zfs" ,zfs))) + (arguments + `(#:tests? #f ; No tests + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + ;; Guix System may not have a traditional cron system, but + ;; the cron scripts installed by this package are convenient + ;; to use as targets for an mcron job specification, so make + ;; sure they can be run in-store. + (add-before 'install 'fix-scripts + (lambda* (#:key outputs inputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (zfs-auto-snapshot (string-append + out + "/sbin/zfs-auto-snapshot")) + (zfs-package (assoc-ref inputs "zfs")) + (zpool (string-append + zfs-package + "/sbin/zpool")) + (zfs (string-append + zfs-package + "/sbin/zfs"))) + (substitute* '("etc/zfs-auto-snapshot.cron.daily" + "etc/zfs-auto-snapshot.cron.frequent" + "etc/zfs-auto-snapshot.cron.hourly" + "etc/zfs-auto-snapshot.cron.monthly" + "etc/zfs-auto-snapshot.cron.weekly") + (("zfs-auto-snapshot") + zfs-auto-snapshot)) + (substitute* "src/zfs-auto-snapshot.sh" + (("LC_ALL=3DC zfs list") + (string-append "LC_ALL=3DC " zfs " list")) + (("LC_ALL=3DC zpool status") + (string-append "LC_ALL=3DC " zpool " status")) + (("zfs snapshot") + (string-append zfs " snapshot")) + (("zfs destroy") + (string-append zfs " destroy")))))) + ;; Provide DESTDIR and PREFIX on make command. + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (invoke "make" "install" + "PREFIX=3D" + (string-append "DESTDIR=3D" out))) + #t))))) + (home-page "https://github.com/zfsonlinux/zfs-auto-snapshot") + (synopsis "Automatically create, rotate, and destroy periodic ZFS snap= shots") + (description + "An alternative implementation of the zfs-auto-snapshot service for = Linux +that is compatible with zfs-linux (now OpenZFS) and zfs-fuse. + +On Guix System, you will need to invoke the included shell scripts as @cod= e{job} +definitions in your @code{operating-system} declaration.") + (license license:gpl2+))) + (define-public mergerfs (package (name "mergerfs") -- 2.31.0 From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v3 3/3] gnu: Add ZFS service type. References: In-Reply-To: Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 22 Mar 2021 14:36: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16164237427547 (code B ref 45692); Mon, 22 Mar 2021 14:36:02 +0000 Received: (at 45692) by debbugs.gnu.org; 22 Mar 2021 14:35:42 +0000 Received: from localhost ([127.0.0.1]:58249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOLeb-0001xb-NA for submit@debbugs.gnu.org; Mon, 22 Mar 2021 10:35:42 -0400 Received: from mail-40135.protonmail.ch ([185.70.40.135]:33449) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOLeY-0001xH-9d for 45692@debbugs.gnu.org; Mon, 22 Mar 2021 10:35:36 -0400 Date: Mon, 22 Mar 2021 14:35:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1616423726; bh=9PtqP++rDIoVYVwYXmmlkhWAcNn7cKWB1EdEnjdRF6M=; h=Date:To:From:Reply-To:Subject:From; b=C0Xwo5F2fCCsH4IbLsPPS3GuUc5SUHJRXChAorhrs/dp53HB4tVDkpAlyUi2XuGH4 XAzcYvhiy9RvtoSTfXYqaCNMsIbwIg49VR3TnDgOJ+aS9VEuJM8EPHTVBxpT4ecO5k luOGxZwAVAIMkypKWiAvYPyOjVBKU36WK2jst5GY= From: raid5atemyhomework Message-ID: 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.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >From 7c039aee628bdb0188c0da27defb591f7791053e Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Mon, 22 Mar 2021 16:26:28 +0800 Subject: [PATCH 3/3] gnu: Add ZFS service type. * gnu/services/file-systems.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/services/base.scm: Export dependency->shepherd-service-name. * doc/guix.texi (ZFS File System): New subsection. --- doc/guix.texi | 351 ++++++++++++++++++++++++++++++++++ gnu/local.mk | 2 + gnu/services/base.scm | 4 +- gnu/services/file-systems.scm | 295 ++++++++++++++++++++++++++++ 4 files changed, 651 insertions(+), 1 deletion(-) create mode 100644 gnu/services/file-systems.scm diff --git a/doc/guix.texi b/doc/guix.texi index 86b22f3673..a2a092b31b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -87,6 +87,7 @@ Copyright @copyright{} 2020 Daniel Brooks@* Copyright @copyright{} 2020 John Soo@* Copyright @copyright{} 2020 Jonathan Brielmaier@* Copyright @copyright{} 2020 Edgar Vincent@* +Copyright @copyright{} 2021 raid5atemyhomework@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -14095,6 +14096,356 @@ a file system declaration such as: compress-force=3Dzstd,space_cache=3Dv2")) @end lisp + +@node ZFS File System +@subsection ZFS File System + +Support for ZFS file systems is provided on Guix by the OpenZFS project. +OpenZFS currently only supports Linux-Libre and is not available on the +Hurd. + +OpenZFS is free software; unfortunately its license is incompatible with +the GNU General Public License (GPL), the license of the Linux kernel, +which means they cannot be distributed together. However, as a user, +you can choose to build ZFS and use it together with Linux; you can +even rely on Guix to automate this task. See +@uref{https://www.fsf.org/licensing/zfs-and-linux, this analysis by +the Free Software Foundation} for more information. + +As a large and complex kernel module, OpenZFS has to be compiled for a +specific version of Linux-Libre. At times, the latest OpenZFS package +available in Guix is not compatible with the latest Linux-Libre version. +Thus, directly installing the @code{zfs} package can fail. + +Instead, you are recommended to select a specific older long-term-support +Linux-Libre kernel. Do not use @code{linux-libre-lts}, as even the +latest long-term-support kernel may be too new for @code{zfs}. Instead, +explicitly select a specific older version, such as @code{linux-libre-5.10= }, +and upgrade it manually later as new long-term-support kernels become +available that you have confirmed is compatible with the latest available +OpenZFS version on Guix. + +For example, you can modify your system configuration file to a specific +Linux-Libre version and add the @code{zfs-service-type} service. + +@lisp +(use-modules (gnu)) +(use-package-modules + #;@dots{} + linux) +(use-service-modules + #;@dots{} + file-systems) + +(define my-kernel linux-libre-5.10) + +(operating-system + (kernel my-kernel) + #;@dots{} + (services + (cons* (service zfs-service-type + (zfs-configuration + (kernel my-kernel))) + #;@dots{} + %desktop-services)) + #;@dots{}) +@end lisp + +@defvr {Scheme Variable} zfs-service-type +This is the type for a service that adds ZFS support to your operating +system. The service is configured using a @code{zfs-configuration} +record. + +Here is an example use: + +@lisp +(service zfs-service-type + (zfs-configuration + (kernel linux-libre-5.4))) +@end lisp +@end defvr + +@deftp {Data Type} zfs-configuration +This data type represents the configuration of the ZFS support in Guix +System. Its fields are: + +@table @asis +@item @code{kernel} +The package of the Linux-Libre kernel to compile OpenZFS for. This field +is always required. It @emph{must} be the same kernel you use in your +@code{operating-system} form. + +@item @code{base-zfs} (default: @code{zfs}) +The OpenZFS package that will be compiled for the given Linux-Libre kernel= . + +@item @code{base-zfs-auto-snapshot} (default: @code{zfs-auto-snapshot}) +The @code{zfs-auto-snapshot} package to use. It will be modified to +specifically use the OpenZFS compiled for your kernel. + +@item @code{dependencies} (default: @code{'()}) +A list of @code{} or @code{} records that must +be mounted or opened before OpenZFS scans for pools to import. For exampl= e, +if you have set up LUKS containers as leaf VDEVs in a pool, you have to +include their corresponding @code{} records so that OpenZF= S +can import the pool correctly at bootup. + +@item @code{auto-mount?} (default: @code{#t}) +Whether to mount datasets with the ZFS @code{mountpoint} property automati= cally +at startup. This is the behavior that ZFS users usually expect. You migh= t +set this to @code{#f} for an operating system intended as a ``rescue'' sys= tem +that is intended to help debug problems with the disks rather than actuall= y +work in production. + +@item @code{auto-scrub} (default: @code{'weekly}) +Specifies how often to scrub all pools. Can be the symbols @code{'weekly}= or +@code{'monthly}, or a schedule specification understood by +@xref{mcron, mcron job specifications,, mcron, GNU@tie{}mcron}, such as +@code{"0 3 * * 6"} for ``every 3AM on Saturday''. +It can also be @code{#f} to disable auto-scrubbing (@strong{not recommende= d}). + +The general guideline is to scrub weekly when using consumer-quality drive= s, and +to scrub monthly when using enterprise-quality drives. + +@code{'weekly} scrubs are done on Sunday midnight, while @code{monthly} sc= rubs +are done on midnight on the first day of each month. + +@item @code{auto-snapshot?} (default: @code{#t}) +Specifies whether to auto-snapshot by default. If @code{#t}, then snapsho= ts +are automatically created except for ZFS datasets with the +@code{com.sun:auto-snapshot} ZFS vendor property set to @code{false}. + +If @code{#f}, snapshots will not be automatically created, unless the ZFS +dataset has the @code{com.sun:auto-snapshot} ZFS vendor property set to +@code{true}. + +@item @code{auto-snapshot-keep} (default: @code{'()}) +Specifies an association list of symbol-number pairs, indicating the numbe= r +of automatically-created snapshots to retain for each frequency type. + +If not specified via this field, by default there are 4 @code{frequent}, 2= 4 +@code{hourly}, 31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly} sna= pshots. + +For example: + +@lisp +(zfs-configuration + (kernel my-kernel) + (auto-snapshot-keep + '((frequent . 8) + (hourly . 12)))) +@end lisp + +The above will keep 8 @code{frequent} snapshots and 12 @code{hourly} snaps= hots. +@code{daily}, @code{weekly}, and @code{monthly} snapshots will keep their +defaults (31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly}). + +@end table +@end deftp + +@subsubsection ZFS Auto-Snapshot + +The ZFS service on Guix System supports auto-snapshots as implemented in t= he +Solaris operating system. + +@code{frequent} (every 15 minutes), @code{hourly}, @code{daily}, @code{wee= kly}, +and @code{monthly} snapshots are created automatically for ZFS datasets th= at +have auto-snapshot enabled. They will be named, for example, +@code{zfs-auto-snap_frequent-2021-03-22-1415}. You can continue to use +manually-created snapshots as long as they do not conflict with the naming +convention used by auto-snapshot. You can also safely manually destroy +automatically-created snapshots, for example to free up space. + +The @code{com.sun:auto-snapshot} ZFS property controls auto-snapshot on a +per-dataset level. Sub-datasets will inherit this property from their par= ent +dataset, but can have their own property. + +You @emph{must} set this property to @code{true} or @code{false} exactly, +otherwise it will be treated as if the property is unset. + +For example: + +@example +# zfs list -o name +NAME +tank +tank/important-data +tank/tmp +# zfs set com.sun:auto-snapshot=3Dtrue tank +# zfs set com.sun:auto-snapshot=3Dfalse tank/tmp +@end example + +The above will set @code{tank} and @code{tank/important-data} to be +auto-snapshot, while @code{tank/tmp} will not be auto-snapshot. + +If the @code{com.sun:auto-snapshot} property is not set for a dataset +(the default when pools and datasets are created), then whether +auto-snapshot is done or not will depend on the @code{auto-snapshot?} +field of the @code{zfs-configuration} record. + +There are also @code{com.sun:auto-snapshot:frequent}, +@code{com.sun:auto-snapshot:hourly}, @code{com.sun:auto-snapshot:daily}, +@code{com.sun:auto-snapshot:weekly}, and @code{com.sun:auto-snapshot:month= ly} +properties that give finer-grained control of whether to auto-snapshot a +dataset at a particular schedule. + +The number of snapshots kept for all datasets can be overridden via the +@code{auto-snapshot-keep} field of the @code{zfs-configuration} record. +There is currently no support to have different numbers of snapshots to +keep for different datasets. + +@subsubsection ZVOLs + +ZFS supports ZVOLs, block devices that ZFS exposes to the operating +system in the @code{/dev/zvol/} directory. The ZVOL will have the same +resilience and self-healing properties as other datasets on your ZFS pool. +ZVOLs can also be snapshotted (and will be included in auto-snapshotting +if enabled), which snapshots the state of the block device, effectively +snapshotting the hosted file system. + +You can put any file system inside the ZVOL. However, in order to mount t= his +file system at system start, you need to add @code{%zfs-zvol-dependency} a= s a +dependency of each file system inside a ZVOL. + +@defvr {Scheme Variable} %zfs-zvol-dependency +An artificial @code{} which tells the file system mounting +service to wait for ZFS to provide ZVOLs before mounting the +@code{} dependent on it. +@end defvr + +For example, suppose you create a ZVOL and put an ext4 filesystem +inside it: + +@example +# zfs create -V 100G tank/ext4-on-zfs +# mkfs.ext4 /dev/zvol/tank/ext4-on-zfs +# mkdir /ext4-on-zfs +# mount /dev/zvol/tank/ext4-on-zfs /ext4-on-zfs +@end example + +You can then set this up to be mounted at boot by adding this to the +@code{file-systems} field of your @code{operating-system} record: + +@lisp +(file-system + (device "/dev/zvol/tank/ext4-on-zfs") + (mount-point "/ext4-on-zfs") + (type "ext4") + (dependencies (list %zfs-zvol-dependency))) +@end lisp + +You @emph{must not} add @code{%zfs-zvol-dependency} to your +@code{operating-system}'s @code{mapped-devices} field, and you @emph{must +not} add it (or any @code{}s dependent on it) to the +@code{dependencies} field of @code{zfs-configuration}. Finally, you +@emph{must not} use @code{%zfs-zvol-dependency} unless you actually +instantiate @code{zfs-service-type} on your system. + +@subsubsection Unsupported Features + +Some common features and uses of ZFS are currently not supported, or not +fully supported, on Guix. + +@enumerate +@item +Shepherd-managed daemons that are configured to read from or write to ZFS +mountpoints need to include @code{user-processes} in their @code{requireme= nt} +field. This is the earliest that ZFS file systems are assured of being +mounted. + +Generally, most daemons will, directly or indirectly, require +@code{networking}, or @code{user-processes}, or both. Most implementation= s +of @code{networking} will also require @code{user-processes} so daemons th= at +require only @code{networking} will also generally start up after +@code{user-processes}. A notable exception, however, is +@code{static-networking-service-type}. You will need to explicitly add +@code{user-processes} as a @code{requirement} of your @code{static-network= ing} +record. + +@item +@code{mountpoint=3Dlegacy} ZFS file systems. The handlers for the Guix mo= unting +system have not yet been modified to support ZFS, and will expect @code{/d= ev} +paths in the @code{}'s @code{device} field, but ZFS file syst= ems +are referred to via non-path @code{pool/file/system} names. Such file sys= tems +also need to be mounted @emph{after} OpenZFS has scanned for pools. + +You can still manually mount these file systems after system boot; what is +only unsupported is mounting them automatically at system boot by specifyi= ng +them in @code{} records of your @code{operating-system}. + +@item +@code{/home} on ZFS. Guix will create home directories for users, but thi= s +process currently cannot be scheduled after ZFS file systems are mounted. +Thus, the ZFS file system might be mounted @emph{after} Guix has created +home directories at boot, at which point OpenZFS will refuse to mount sinc= e +the mountpoint is not empty. However, you @emph{can} create an ext4, xfs, +btrfs, or other supported file system inside a ZVOL, have that depend on +@code{%zfs-zvol-dependency}, and set it to mount on the @code{/home} +directory; they will be scheduled to mount before the @code{user-homes} +process. + +Similarly, other locations like @code{/var}, @code{/gnu/store} and so +on cannot be reliably put in a ZFS file system, though they may be +possible to create as other file systems inside ZVOL containers. + +@item +@code{/} and @code{/boot} on ZFS. These require Guix to expose more of +the @code{initrd} very early boot process to services. It also requires +Guix to have the ability to explicitly load modules while still in +@code{initrd} (currently kernel modules loaded by +@code{kernel-module-loader-service-type} are loaded after @code{/} is +mounted). Further, since one of ZFS's main advantages is that it can +continue working despite the loss of one or more devices, it makes sense +to also support installing the bootloader on all devices of the pool that +contains the @code{/} and @code{/boot}; after all, if ZFS can survive the +loss of one device, the bootloader should also be able to survive the loss +of one device. + +@item +ZVOL swap devices. Mapped swap devices need to be listed in +@code{mapped-devices} to ensure they are opened before the system attempts +to use them, but you cannot currently add @code{%zfs-zvol-dependency} to +@code{mapped-devices}. + +This will also require significant amounts of testing, as various kernel +build options and patches may affect how swapping works, which are possibl= y +different on Guix System compared to other distributions that this feature= is +known to work on. + +@item +ZFS Event Daemon. Support for this has not been written yet, patches are +welcome. The main issue is how to design this in a Guix style while +supporting legacy shell-script styles as well. In particular, OpenZFS its= elf +comes with a number of shell scripts intended for ZFS Event Daemon, and we +need to figure out how the user can choose to use or not use the provided +scripts (and configure any settings they have) or override with their own +custom code (which could be shell scripts they have written and trusted fr= om +previous ZFS installations). + +As-is, you can create your own service that activates the ZFS Event Daemon +by creating the @file{/etc/zfs/zed} directory and filling it appropriately= , +then launching @code{zed}. + +@item +@file{/etc/zfs/zpool.cache}. Currently the ZFS support on Guix always for= ces +scanning of all devices at bootup to look for ZFS pools. For systems with +dozens or hundreds of storage devices, this can lead to slow bootup. One = issue +is that tools should really not write to @code{/etc} which is supposed to = be for +configuration; possibly it could be moved to @code{/var} instead. Another= issue +is that if Guix ever supports @code{/} on ZFS, we would need to somehow ke= ep the +@code{zpool.cache} file inside the @code{initrd} up-to-date with what is i= n the +@code{/} mount point. + +@item +@code{zfs share}. This will require some (unknown amount of) work to inte= grate +into the Samba and NFS services of Guix. You @emph{can} manually set up S= amba +and NFS to share any mounted ZFS datasets by setting up their configuratio= ns +properly; it just can't be done for you by @code{zfs share} and the +@code{sharesmb} and @code{sharenfs} properties. +@end enumerate + +Hopefully, support for the above only requires code to be written, so user= s +are encouraged to hack on Guix to implement the above features. + @node Mapped Devices @section Mapped Devices diff --git a/gnu/local.mk b/gnu/local.mk index 3d4147a879..6fd8284a9b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -40,6 +40,7 @@ # Copyright =C2=A9 2020 Malte Frank Gerdes # Copyright =C2=A9 2020 Vinicius Monego # Copyright =C2=A9 2021 Bj=C3=B6rn H=C3=B6fling +# Copyright =C2=A9 2021 raid5atemyhomework # # This file is part of GNU Guix. # @@ -607,6 +608,7 @@ GNU_SYSTEM_MODULES =3D=09=09=09=09\ %D%/services/docker.scm=09=09=09\ %D%/services/authentication.scm=09=09\ %D%/services/file-sharing.scm=09=09=09\ + %D%/services/file-systems.scm=09=09=09\ %D%/services/games.scm=09=09=09\ %D%/services/ganeti.scm=09=09=09\ %D%/services/getmail.scm=09=09=09=09\ diff --git a/gnu/services/base.scm b/gnu/services/base.scm index f50bcfdcb4..09a2d7c45b 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -187,7 +187,9 @@ references-file - %base-services)) + %base-services + + dependency->shepherd-service-name)) ;;; Commentary: ;;; diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.scm new file mode 100644 index 0000000000..0b1aae38ac --- /dev/null +++ b/gnu/services/file-systems.scm @@ -0,0 +1,295 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2021 raid5atemyhomework +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services file-systems) + #:use-module (gnu packages file-systems) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu services linux) + #:use-module (gnu services mcron) + #:use-module (gnu services shepherd) + #:use-module (gnu system mapped-devices) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix records) + #:export (zfs-service-type + + zfs-configuration + zfs-configuration? + zfs-configuration-kernel + zfs-configuration-base-zfs + zfs-configuration-base-zfs-auto-snapshot + zfs-configuration-dependencies + zfs-configuration-auto-mount? + zfs-configuration-auto-scrub + zfs-configuration-auto-snapshot? + zfs-configuration-auto-snapshot-keep + + %zfs-zvol-dependency)) + +(define-record-type* + zfs-configuration + make-zfs-configuration + zfs-configuration? + + ; linux-libre kernel you want to compile the base-zfs module for. + (kernel zfs-configuration-kernel) + + ; the OpenZFS package that will be modified to compile for the + ; given kernel. + (base-zfs zfs-configuration-base-zfs + (default zfs)) + + ; the zfs-auto-snapshot package that will be modified to compile + ; for the given kernel. + (base-zfs-auto-snapshot zfs-configuration-base-zfs-auto-snapshot + (default zfs-auto-snapshot)) + + ; list of or objects that must be + ; opened/mounted before we import any ZFS pools. + (dependencies zfs-configuration-dependencies + (default '())) + + ; #t if mountable datasets are to be mounted automatically. + ; #f if not mounting. + ; #t is the expected behavior on other operating systems, the + ; #f is only supported for "rescue" operating systems where + ; the user wants lower-level control of when to mount. + (auto-mount? zfs-configuration-auto-mount? + (default #t)) + + ; 'weekly for weekly scrubbing, 'monthly for monthly scrubbing, an + ; mcron time specification that can be given to `job`, or #f to + ; disable. + (auto-scrub zfs-configuration-auto-scrub + (default 'weekly)) + + ; #t if auto-snapshot is default (and `com.sun:auto-snapshot=3Dfalse` + ; disables auto-snapshot per dataset), #f if no auto-snapshotting + ; is default (and `com.sun:auto-snapshot=3Dtrue` enables auto-snapshot + ; per dataset). + (auto-snapshot? zfs-configuration-auto-snapshot? + (default #t)) + + ; association list of symbol-number pairs to indicate the number + ; of automatic snapshots to keep for each of 'frequent, 'hourly, + ; 'daily, 'weekly, and 'monthly. + ; e.g. '((frequent . 8) (hourly . 12)) + (auto-snapshot-keep zfs-configuration-auto-snapshot-keep + (default '()))) + +(define %default-auto-snapshot-keep + '((frequent . 4) + (hourly . 24) + (daily . 31) + (weekly . 8) + (monthly . 12))) + +(define %auto-snapshot-mcron-schedule + '((frequent . "0,15,30,45 * * * *") + (hourly . "0 * * * *") + (daily . "0 0 * * *") + (weekly . "0 0 * * 7") + (monthly . "0 0 1 * *"))) + +;; A synthetic and unusable MAPPED-DEVICE intended for use when +;; the user has created a mountable filesystem inside a ZFS +;; zvol and wants it mounted inside the configuration.scm. +(define %zfs-zvol-dependency + (mapped-device + (source '()) + (targets '("zvol/*")) + (type #f))) + +(define (make-zfs-package conf) + (let ((kernel (zfs-configuration-kernel conf)) + (base-zfs (zfs-configuration-base-zfs conf))) + (package + (inherit base-zfs) + (arguments (cons* #:linux kernel + (package-arguments base-zfs)))))) + +(define (make-zfs-auto-snapshot-package conf) + (let ((zfs (make-zfs-package conf)) + (base-zfs-auto-snapshot (zfs-configuration-base-zfs-auto-snapshot = conf))) + (package + (inherit base-zfs-auto-snapshot) + (inputs `(("zfs" ,zfs)))))) + +(define (zfs-loadable-modules conf) + (list (list (make-zfs-package conf) "module"))) + +(define (zfs-shepherd-services conf) + (let* ((zfs-package (make-zfs-package conf)) + (zpool (file-append zfs-package "/sbin/zpool")) + (zfs (file-append zfs-package "/sbin/zfs")) + (zvol_wait (file-append zfs-package "/bin/zvol_wait")) + (scheme-modules `((srfi srfi-1) + (srfi srfi-34) + (srfi srfi-35) + (rnrs io ports) + ,@%default-modules))) + (define zfs-scan + (shepherd-service + (provision '(zfs-scan)) + (requirement `(root-file-system + kernel-module-loader + udev + ,@(map dependency->shepherd-service-name + (zfs-configuration-dependencies conf)))) + (documentation "Scans for and imports ZFS pools.") + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "zfs: error importing pools: ~s~%" + (condition-message c)) + #f)) + ; TODO: optionally use a cachefile. + (invoke #$zpool "import" "-a" "-N")))) + ;; Why not one-shot? Because we don't really want to rescan + ;; this each time a requiring process is restarted, as scanning + ;; can take a long time and a lot of I/O. + (stop #~(const #f)))) + + (define device-mapping-zvol/* + (shepherd-service + (provision '(device-mapping-zvol/*)) + (requirement '(zfs-scan)) + (documentation "Waits for all ZFS ZVOLs to be opened.") + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "zfs: error opening zvols: ~s~%" + (condition-message c)) + #f)) + (invoke #$zvol_wait)))) + (stop #~(const #f)))) + + (define zfs-auto-mount + (shepherd-service + (provision '(zfs-auto-mount)) + (requirement '(zfs-scan)) + (documentation "Mounts all non-legacy mounted ZFS filesystems.") + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "zfs: error mounting file systems: ~= s~%" + (condition-message c)) + #f)) + ;; 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/console ? + (with-output-to-port (current-error-port) + (lambda () + (invoke #$zfs "mount" "-a" "-l")))))) + (stop #~(lambda _ + ;; Make sure that Shepherd does not have a CWD that + ;; is a mounted ZFS filesystem, which would prevent + ;; unmounting. + (chdir "/") + (invoke #$zfs "unmount" "-a" "-f"))))) + + `(,zfs-scan + ,device-mapping-zvol/* + ,@(if (zfs-configuration-auto-mount? conf) + `(,zfs-auto-mount) + '())))) + +(define (zfs-user-processes conf) + (if (zfs-configuration-auto-mount? conf) + '(zfs-auto-mount) + '(zfs-scan))) + +(define (zfs-mcron-auto-snapshot-jobs conf) + (let* ((user-auto-snapshot-keep (zfs-configuration-auto-snapshot-ke= ep conf)) + ;; assoc-ref has earlier entries overriding later ones. + (auto-snapshot-keep (append user-auto-snapshot-keep + %default-auto-snapshot-keep= )) + (auto-snapshot? (zfs-configuration-auto-snapshot? c= onf)) + (zfs-auto-snapshot-package (make-zfs-auto-snapshot-package con= f)) + (zfs-auto-snapshot (file-append zfs-auto-snapshot-pack= age + "/sbin/zfs-auto-snapsh= ot"))) + (map + (lambda (label) + (let ((keep (assoc-ref auto-snapshot-keep label)) + (sched (assoc-ref %auto-snapshot-mcron-schedule label))) + #~(job '#$sched + (string-append #$zfs-auto-snapshot + " --quiet --syslog " + " --label=3D" #$(symbol->string label) + " --keep=3D" #$(number->string keep) + " //")))) + '(frequent hourly daily weekly monthly)))) + +(define (zfs-mcron-auto-scrub-jobs conf) + (let* ((zfs-package (make-zfs-package conf)) + (zpool (file-append zfs-package "/sbin/zpool")) + (auto-scrub (zfs-configuration-auto-scrub conf)) + (sched (cond + ((eq? auto-scrub 'weekly) "0 0 * * 7") + ((eq? auto-scrub 'monthly) "0 0 1 * *") + (else auto-scrub)))) + (list + #~(job '#$sched + ;; Suppress errors: if there are no ZFS pools, the + ;; scrub will not be given any arguments, which makes + ;; it error out. + (string-append "(" #$zpool " scrub `" #$zpool " list -o name = -H` " + "> /dev/null 2>&1) " + "|| exit 0"))))) + +(define (zfs-mcron-jobs conf) + (append (zfs-mcron-auto-snapshot-jobs conf) + (if (zfs-configuration-auto-scrub conf) + (zfs-mcron-auto-scrub-jobs conf) + '()))) + +(define zfs-service-type + (service-type + (name 'zfs) + (extensions + (list ;; Install OpenZFS kernel module into kernel profile. + (service-extension linux-loadable-module-service-type + zfs-loadable-modules) + ;; And load it. + (service-extension kernel-module-loader-service-type + (const '("zfs"))) + ;; Make sure ZFS pools and datasets are mounted at + ;; boot. + (service-extension shepherd-root-service-type + zfs-shepherd-services) + ;; Make sure user-processes don't start until + ;; after ZFS does. + (service-extension user-processes-service-type + zfs-user-processes) + ;; Install automated scrubbing and snapshotting. + (service-extension mcron-service-type + zfs-mcron-jobs) + + ;; Install ZFS management commands in the system + ;; profile. + (service-extension profile-service-type + (compose list make-zfs-package)) + ;; Install ZFS udev rules. + (service-extension udev-service-type + (compose list make-zfs-package)))) + (description "Installs ZFS, an advanced filesystem and volume manager.= "))) -- 2.31.0 From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v3 0/3] New patch series for Even Better ZFS Support on Guix Resent-From: =?UTF-8?Q?L=C3=A9o?= Le Bouter Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 28 Mar 2021 12:56: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 , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16169361186307 (code B ref 45692); Sun, 28 Mar 2021 12:56:02 +0000 Received: (at 45692) by debbugs.gnu.org; 28 Mar 2021 12:55:18 +0000 Received: from localhost ([127.0.0.1]:45514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQUwo-0001df-2o for submit@debbugs.gnu.org; Sun, 28 Mar 2021 08:55:18 -0400 Received: from mail.zaclys.net ([178.33.93.72]:54069) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQUwl-0001dL-GP for 45692@debbugs.gnu.org; Sun, 28 Mar 2021 08:55:16 -0400 Received: from guix-xps.local (82-64-145-38.subs.proxad.net [82.64.145.38]) (authenticated bits=0) by mail.zaclys.net (8.14.7/8.14.7) with ESMTP id 12SCt847049688 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 28 Mar 2021 14:55:08 +0200 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.zaclys.net 12SCt847049688 Authentication-Results: mail.zaclys.net; dmarc=fail (p=reject dis=none) header.from=zaclys.net Authentication-Results: mail.zaclys.net; spf=fail smtp.mailfrom=lle-bout@zaclys.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zaclys.net; s=default; t=1616936108; bh=1TK40wrwptZSXbcShmWZlFEcODzxAvGnZ/MY1grg+yk=; h=Subject:From:To:Date:In-Reply-To:References:From; b=PWbt8A3EU2UBmpvRhaOWM5mLWUhwqVAGT50ZcSEcT+2J+AbLIU1tR/xrxLOUqf8JC 04OUFM2vW3U4rtU8VLNylMr5KJi6nWai7wGSNW84zwzCO4zZ9whQbh3yjxQJNAMw6+ l2ViVAmfwIsL01WsYnkHbuxcEk2hWjssD/D1TbGs= Message-ID: From: =?UTF-8?Q?L=C3=A9o?= Le Bouter Date: Sun, 28 Mar 2021 14:55:03 +0200 In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-yDUacXRpvAmJ28SsXPe+" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 X-Spam-Score: 0.0 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-yDUacXRpvAmJ28SsXPe+ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks a lot for the patches! On Mon, 2021-03-22 at 14:33 +0000, raid5atemyhomework via Guix-patches via wrote: > Personally I'm not particularly motivated to push this anymore. I > have a frankenstein's `configuration.scm` that gets me the bits of > ZFS functionality that I absolutely need, with the rest something I'm > just living without, and while it would be *nice* to have *some* out- > of-the-box support for ZFS (or at least make it easy to get a box to > get support for ZFS out of), I personally don't need it at this > point. I understand your frustration but also understand that the people who are able to review your patches can't make themselves available in the way you desire, there's lots of pending patches to GNU Guix and as much as ZFS support is valuable, there's also lots of other things that are valuable and are in the backlog. > Patch 1/3 corresponds to the original Patch 1/4. Patch 2/3 has no > corresponding patch in the original patch set, but is the same patch > as https://issues.guix.gnu.org/47134 which nobody is looking at, as > usual. Patch 3/3 corresponds to the original Patch 4/4. Please do not blame or shame us for not looking at patches, it's not very nice, we do our best, at all times. We are overworked and the people who are knowledgeable about GNU Guix and Scheme particularily so. I don't feel like I am knowledgeable about Scheme and GNU Guix enough to review your patches, sorry for that. L=C3=A9o --=-yDUacXRpvAmJ28SsXPe+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEFIvLi9gL+xax3g6RRaix6GvNEKYFAmBgfKcACgkQRaix6GvN EKYfYw/+N51EZdVvf6GLz3EyT1f6fTeAB+XoBj8iCKFLXdNPe1dop67AW2djKQDR 4pIn1jN+gFqcP9P4NsyNLCT7KWyrYJ7AHa9vYKa0AZ5WEoNlmfsX+debqbLB3MlS R3oXPLoQcTqvDoR+s07g6hX5HcG42CQIlMVyHA3NzboCEC/RIzeWsJDZb50ctVYJ 44yDgRQ1Ejhwx50T0bIk4OZR+/tpEgrqjPU+rYobcCi+YFDkqtkvFsiau7gVoNZ3 uHJb8T9Yw21vUPtgQsP+T/2EUA8sUiVyeykXh2KKEcV/Z/C5BjYGTEpWZ2e7LM2v p1Vn/qxQVPUYNE/x+l7u7XH/cF2CyQw1o2dZdu/ZwosLcNxbzt6R9g1MSeXS9IKa LON8F1oTKKBVjAfhqvCov6uCuEHFfVWi7EFhGe6a2JIljApLK+0KXoFDTa5/4HKP ERF0/MH9keTIKiWH1l35r4UIIyccU67gkxqCFNTgr6BlZW33qyHUhHqQljbUB5qr ibUdoF/R6/Whxk+aGJ5bnw32BxwKdT9oty7nq1rrVXC+zf5KN4p4A1Sb5aTY2EU0 9qL3OvF3Wd+u8Y+/7cbBwAA06HhJ1EQYrn5szKUp4hx909z0OuoUEkXUA81HE6FI U8jDvw3ZDNPfc9VW3+y8OoDSijd0A5IYuX1UcHyZPsgZXxQbdEA= =qHhm -----END PGP SIGNATURE----- --=-yDUacXRpvAmJ28SsXPe+-- From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v3 0/3] New patch series for Even Better ZFS Support on Guix Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 29 Mar 2021 04:40: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: =?UTF-8?Q?L=C3=A9o?= Le Bouter Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.161699277730257 (code B ref 45692); Mon, 29 Mar 2021 04:40:02 +0000 Received: (at 45692) by debbugs.gnu.org; 29 Mar 2021 04:39:37 +0000 Received: from localhost ([127.0.0.1]:47470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQjgf-0007rx-HN for submit@debbugs.gnu.org; Mon, 29 Mar 2021 00:39:37 -0400 Received: from mail-40137.protonmail.ch ([185.70.40.137]:25068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQjgd-0007rj-L4 for 45692@debbugs.gnu.org; Mon, 29 Mar 2021 00:39:36 -0400 Date: Mon, 29 Mar 2021 04:39:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1616992768; bh=hrTMIorCjSrx0Al3eyoZR9XyV1MlB6lt7axkIWHL2AY=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=n0dAtFtZNDHdzQStpKvhPIle77tHD6hdcaU3SG2EDiSc7T54zXbYb0a47IEJqOhMz Y3CmlNlzVx/3ifoPPb3mnZHpVg7jbN1KN9p8KebDLbH1a798M4567eMyvWJS8BBCrS hRAAgZlgX1srll1fqOxOKBWxSsX6YynrNvHBl6F8= From: raid5atemyhomework Message-ID: <6_CTNY0LKnK4gdEM41_839GBi_6dql-yEVzGPVMQDFvi6JNkQF1BoxQu9_6gRx6bTNqk6rSpUhxDtDWveZOBnxYdMMW9h87WPP8uWZPteZk=@protonmail.com> In-Reply-To: References: 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Mon, 2021-03-22 at 14:33 +0000, raid5atemyhomework via Guix-patches > via wrote: > > > Personally I'm not particularly motivated to push this anymore. I > > have a frankenstein's `configuration.scm` that gets me the bits of > > ZFS functionality that I absolutely need, with the rest something I'm > > just living without, and while it would be nice to have some out- > > of-the-box support for ZFS (or at least make it easy to get a box to > > get support for ZFS out of), I personally don't need it at this > > point. > > I understand your frustration but also understand that the people who > are able to review your patches can't make themselves available in the > way you desire, there's lots of pending patches to GNU Guix and as much > as ZFS support is valuable, there's also lots of other things that are > valuable and are in the backlog. > > > Patch 1/3 corresponds to the original Patch 1/4. Patch 2/3 has no > > corresponding patch in the original patch set, but is the same patch > > as https://issues.guix.gnu.org/47134 which nobody is looking at, as > > usual. Patch 3/3 corresponds to the original Patch 4/4. > > Please do not blame or shame us for not looking at patches, it's not > very nice, we do our best, at all times. We are overworked and the > people who are knowledgeable about GNU Guix and Scheme particularily > so. I don't feel like I am knowledgeable about Scheme and GNU Guix > enough to review your patches, sorry for that. Okay. Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v3 2/3] gnu: Add zfs-auto-snapshot. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 11 May 2021 14:06: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.162074194723338 (code B ref 45692); Tue, 11 May 2021 14:06:02 +0000 Received: (at 45692) by debbugs.gnu.org; 11 May 2021 14:05:47 +0000 Received: from localhost ([127.0.0.1]:36982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgT19-00064M-KP for submit@debbugs.gnu.org; Tue, 11 May 2021 10:05:47 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:35430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgT18-000649-Lx for 45692@debbugs.gnu.org; Tue, 11 May 2021 10:05:47 -0400 Received: from localhost (80-110-127-104.cgn.dynamic.surfer.at [80.110.127.104]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 0C3493362D7F; Tue, 11 May 2021 16:05:44 +0200 (CEST) Date: Tue, 11 May 2021 16:05:42 +0200 From: Danny Milosavljevic Message-ID: <20210511160434.6b88bba3@scratchpost.org> In-Reply-To: <2c97vRukDGd4mnnPwPzLZOBq6qR5EqiBvaevyGcaoh1zc8NQkJO8y2DvtaMuafb6R9m5_Hhizx41nJjyggYPiHNXmnYKkQCejKsw_n1-wec=@protonmail.com> References: <2c97vRukDGd4mnnPwPzLZOBq6qR5EqiBvaevyGcaoh1zc8NQkJO8y2DvtaMuafb6R9m5_Hhizx41nJjyggYPiHNXmnYKkQCejKsw_n1-wec=@protonmail.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hi, > + (invoke "make" "install" > + "PREFIX=" > + (string-append "DESTDIR=" out))) Are you sure about that? Usually, DESTDIR is in order to supply a temporary build root (which will not be referred-to by the installed programs--because that directory will be deleted after the build) and PREFIX is in order to supply an actual installation directory (installed programs can refer to that whenever they want). Is it different for this program? Also, I'd suggest to use #:make-flags so other phases can also see the PREFIX chosen. Otherwise, those could erroneously default to another prefix (for loading of config files at runtime etc). What do you think? From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v3 1/3] gnu: Allow services to install kernel-loadable modules. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 11 May 2021 14:18: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.162074262524446 (code B ref 45692); Tue, 11 May 2021 14:18:02 +0000 Received: (at 45692) by debbugs.gnu.org; 11 May 2021 14:17:05 +0000 Received: from localhost ([127.0.0.1]:37018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgTC4-0006ME-SV for submit@debbugs.gnu.org; Tue, 11 May 2021 10:17:04 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:36220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgTC3-0006Lq-Mj for 45692@debbugs.gnu.org; Tue, 11 May 2021 10:17:04 -0400 Received: from localhost (80-110-127-104.cgn.dynamic.surfer.at [80.110.127.104]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 108FD3362612; Tue, 11 May 2021 16:17:01 +0200 (CEST) Date: Tue, 11 May 2021 16:17:00 +0200 From: Danny Milosavljevic Message-ID: <20210511161700.30208638@scratchpost.org> In-Reply-To: References: X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/PePUeF8pcvWKvBQ/Y_yTebW"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --Sig_/PePUeF8pcvWKvBQ/Y_yTebW Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Pushed this patch to guix master as commit a3df382525ac515d1aa083f7f5bd3bd3= 1eb1df40. --Sig_/PePUeF8pcvWKvBQ/Y_yTebW Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAmCakdwACgkQ5xo1VCww uqW1Xwf+LDsPUcMzmaFmYOgNRFjOC5mfd/2cJnUDJEMBsedSkSd+VL0CVe0iI/G0 ylTMzAIkNREGb9E6C79AR+yh5SxfwhgjOzR6J+Nq9WKt9ZBvP4ujPS8nkxOHdwrA egXmhxdty7Qu6GD1AGMG1+wzcBe7U1oH5CTlA1GvjbQTJ29uHIFgBNlLtHisWqZc bLN2C4yjv52Qjsd9uenhFHXcsvlWT/yp5BUdeJ4cJ1PBCNSI9+PADABAIQc39epD Ef2/uhb0+XZKpZPmk3Z6F9EgjAEWMMvbiqxX+CT5/cb9ZVUMh9eCgo13GLFG6j+g xMRZMN3oFQn89i2eMjB2jnXbwF91jw== =OiQJ -----END PGP SIGNATURE----- --Sig_/PePUeF8pcvWKvBQ/Y_yTebW-- From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v3 2/3] gnu: Add zfs-auto-snapshot. Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 May 2021 01:22: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: Danny Milosavljevic Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16208689083580 (code B ref 45692); Thu, 13 May 2021 01:22:01 +0000 Received: (at 45692) by debbugs.gnu.org; 13 May 2021 01:21:48 +0000 Received: from localhost ([127.0.0.1]:40933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lh02u-0000vg-A8 for submit@debbugs.gnu.org; Wed, 12 May 2021 21:21:48 -0400 Received: from mail-40138.protonmail.ch ([185.70.40.138]:33811) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lh02r-0000vP-Mo for 45692@debbugs.gnu.org; Wed, 12 May 2021 21:21:47 -0400 Date: Thu, 13 May 2021 01:21:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1620868898; bh=ExaDA5EOcT4dIZ4jfVjLNBE41emd66bx4u2BpNLKp54=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=fSlX5LbFPSfJ8XQC259QYcoGpA4/3Yqda+If77qBG2LPQt0Yxdbui7vcvpm+D5ICz WcaYatfakOHXur/vq6pHqO+ogqws+ZFpItoG63SQ0bhrqzAjvSL95qXlthByqlLXcM qOoWBaBOIlzBaFO+hBuiT7e2EsUaIBtCySBI89LQ= From: raid5atemyhomework Message-ID: In-Reply-To: <20210511160434.6b88bba3@scratchpost.org> References: <2c97vRukDGd4mnnPwPzLZOBq6qR5EqiBvaevyGcaoh1zc8NQkJO8y2DvtaMuafb6R9m5_Hhizx41nJjyggYPiHNXmnYKkQCejKsw_n1-wec=@protonmail.com> <20210511160434.6b88bba3@scratchpost.org> 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.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello Danny, > Hi, > > > - (invoke "make" "install" > > > > > > - "PREFIX=3D" > > > > > > - (string-append "DESTDIR=3D" out))) > > > > > > Are you sure about that? > > Usually, DESTDIR is in order to supply a temporary build root (which will= not > be referred-to by the installed programs--because that directory will be > deleted after the build) and PREFIX is in order to supply an actual > installation directory (installed programs can refer to that whenever the= y > want). > > Is it different for this program? > > Also, I'd suggest to use #:make-flags so other phases can also see the PR= EFIX > chosen. Otherwise, those could erroneously default to another prefix (for > loading of config files at runtime etc). > > What do you think? Yes, I am quite sure; the program uses a custom `Makefile` that is fairly s= imple and can be trivially quoted here for your review: ```Makefile PREFIX :=3D /usr/local all: install: =09install -d $(DESTDIR)/etc/cron.d =09install -d $(DESTDIR)/etc/cron.daily =09install -d $(DESTDIR)/etc/cron.hourly =09install -d $(DESTDIR)/etc/cron.weekly =09install -d $(DESTDIR)/etc/cron.monthly =09install -m 0644 etc/zfs-auto-snapshot.cron.frequent $(DESTDIR)/etc/cron.= d/zfs-auto-snapshot =09install etc/zfs-auto-snapshot.cron.hourly $(DESTDIR)/etc/cron.hourly/z= fs-auto-snapshot =09install etc/zfs-auto-snapshot.cron.daily $(DESTDIR)/etc/cron.daily/zf= s-auto-snapshot =09install etc/zfs-auto-snapshot.cron.weekly $(DESTDIR)/etc/cron.weekly/z= fs-auto-snapshot =09install etc/zfs-auto-snapshot.cron.monthly $(DESTDIR)/etc/cron.monthly/= zfs-auto-snapshot =09install -d $(DESTDIR)$(PREFIX)/share/man/man8 =09install -m 0644 src/zfs-auto-snapshot.8 $(DESTDIR)$(PREFIX)/share/man/ma= n8/zfs-auto-snapshot.8 =09install -d $(DESTDIR)$(PREFIX)/sbin =09install src/zfs-auto-snapshot.sh $(DESTDIR)$(PREFIX)/sbin/zfs-auto-snaps= hot uninstall: =09rm $(DESTDIR)/etc/cron.d/zfs-auto-snapshot =09rm $(DESTDIR)/etc/cron.hourly/zfs-auto-snapshot =09rm $(DESTDIR)/etc/cron.daily/zfs-auto-snapshot =09rm $(DESTDIR)/etc/cron.weekly/zfs-auto-snapshot =09rm $(DESTDIR)/etc/cron.monthly/zfs-auto-snapshot =09rm $(DESTDIR)$(PREFIX)/share/man/man8/zfs-auto-snapshot.8 =09rm $(DESTDIR)$(PREFIX)/sbin/zfs-auto-snapshot ``` Notice how it does not modify any of the source files at all, so the source= s do not refer to anything provided in `$PREFIX`. However, it does create = directories in `$DESTDIR`, so it has to use `$DESTDIR`. Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v3 2/3] gnu: Add zfs-auto-snapshot. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 May 2021 13:09: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: raid5atemyhomework Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.162091128732569 (code B ref 45692); Thu, 13 May 2021 13:09:01 +0000 Received: (at 45692) by debbugs.gnu.org; 13 May 2021 13:08:07 +0000 Received: from localhost ([127.0.0.1]:41648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhB4R-0008TF-5f for submit@debbugs.gnu.org; Thu, 13 May 2021 09:08:07 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:39840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhB4P-0008T7-VH for 45692@debbugs.gnu.org; Thu, 13 May 2021 09:08:06 -0400 Received: from localhost (80-110-127-104.cgn.dynamic.surfer.at [80.110.127.104]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 3D081336057C; Thu, 13 May 2021 15:08:04 +0200 (CEST) Date: Thu, 13 May 2021 15:08:03 +0200 From: Danny Milosavljevic Message-ID: <20210513150803.27df82a2@scratchpost.org> In-Reply-To: References: <2c97vRukDGd4mnnPwPzLZOBq6qR5EqiBvaevyGcaoh1zc8NQkJO8y2DvtaMuafb6R9m5_Hhizx41nJjyggYPiHNXmnYKkQCejKsw_n1-wec=@protonmail.com> <20210511160434.6b88bba3@scratchpost.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/c=A1zVnKJWr5WTCj5KM9UfI"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --Sig_/c=A1zVnKJWr5WTCj5KM9UfI Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi, thanks for the explanation! Pushed zfs-auto-snapshot to guix master as commit ba3b295a3ee956ac7500b5f9b= b1d151b28ab30ed. --Sig_/c=A1zVnKJWr5WTCj5KM9UfI Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAmCdJLMACgkQ5xo1VCww uqV55AgAm7RU9/STq0MECt9hjSFZSYJY/k1A1+f0IaP9eWE6SPW8/C06opazXK/c xRnA+WFXadKnkgL+9C9heJu6S8BXJbpd6qWoKX5bUpVhEyTC4wAPCjuoWtTtxFPf nrdby0RnQSvWEHYafo5bHscD+deZV8sT6XniK+t5lgOSWzrVpIjfXX4rI3p/I7jY joshzV4flFzcGZG6W5Vs759mQMmTRJAk3P5/czlnn4xMNbQxF8prq12rIs/81pQd b2s7zoD/xNqU59fG6yBApsp0BrcIm1tRSfYXx4je14V35URcv9XfuCvC6iahcVqg dP85SvmLV2fDGlWN8a0ev42/eLQIuw== =INaF -----END PGP SIGNATURE----- --Sig_/c=A1zVnKJWr5WTCj5KM9UfI-- From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v3 0/3] New patch series for Even Better ZFS Support on Guix Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Jul 2021 15:13: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.162705312415071 (code B ref 45692); Fri, 23 Jul 2021 15:13:02 +0000 Received: (at 45692) by debbugs.gnu.org; 23 Jul 2021 15:12:04 +0000 Received: from localhost ([127.0.0.1]:44315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6wqK-0003v1-8b for submit@debbugs.gnu.org; Fri, 23 Jul 2021 11:12:04 -0400 Received: from mail-4319.protonmail.ch ([185.70.43.19]:25835) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6wqI-0003uS-9L for 45692@debbugs.gnu.org; Fri, 23 Jul 2021 11:12:03 -0400 Date: Fri, 23 Jul 2021 15:11:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1627053115; bh=4DxGQOmqTQcfJZN8Sff4y6qsVid/PlfeoIWcdbajAc8=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=SD8CxKwZIBsppcB6ySEkYw1bwnrhAiPRNRqjNA1rCDu5tirMqK1mKEmmGoEVQtNfs U1v3fPmZcP6iQ5t2nyp9GEXnnSnZQOt6z9+7jYFv59Apl1vNHruDfQGAZrNsNuUn+M R0KONsho9dv6s6bNg/bI1XytX5YqXJytuVRiONrQ= From: raid5atemyhomework Message-ID: In-Reply-To: <6_CTNY0LKnK4gdEM41_839GBi_6dql-yEVzGPVMQDFvi6JNkQF1BoxQu9_6gRx6bTNqk6rSpUhxDtDWveZOBnxYdMMW9h87WPP8uWZPteZk=@protonmail.com> References: <6_CTNY0LKnK4gdEM41_839GBi_6dql-yEVzGPVMQDFvi6JNkQF1BoxQu9_6gRx6bTNqk6rSpUhxDtDWveZOBnxYdMMW9h87WPP8uWZPteZk=@protonmail.com> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Can I get any particular feedback here at this point, from anyone at all? From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v3 3/3] gnu: Add ZFS service type. Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 25 Jul 2021 14:04: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.162722184020490 (code B ref 45692); Sun, 25 Jul 2021 14:04:01 +0000 Received: (at 45692) by debbugs.gnu.org; 25 Jul 2021 14:04:00 +0000 Received: from localhost ([127.0.0.1]:49068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7ejY-0005KQ-AC for submit@debbugs.gnu.org; Sun, 25 Jul 2021 10:04:00 -0400 Received: from mail-40140.protonmail.ch ([185.70.40.140]:39543) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7ejV-0005KB-Tw for 45692@debbugs.gnu.org; Sun, 25 Jul 2021 10:03:59 -0400 Date: Sun, 25 Jul 2021 14:03:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1627221831; bh=wNOwRdzIr5RlG7ooigT2PlJfMn8/cvrgsETyMIckmLE=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=voaHjUDVDZc/uheun2hIv8vDyh1ExD8OXQStB1A5fPMwjys661FqSquBgSt5dyKT0 VFbgVgbdBr/bpBP6NUZYOV14oEAaSFgfOAJaHO+JYMsKymj9KAmnQLwIP1552XIA0Q Zj84kaW7Ne+66gAj2k7G14wmfVG3BpoLmS/+NPLg= From: raid5atemyhomework Message-ID: In-Reply-To: References: 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Because it has been so long, the latest patch has bitrotted. I really think at this point shaming people into reviewing this is my only = option. Give me a few hours or days to get a new patch that applies cleanly to orig= in/master. Thanks raid5atemyhomewkr From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type. References: In-Reply-To: Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 25 Jul 2021 14:33: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.162722352923275 (code B ref 45692); Sun, 25 Jul 2021 14:33:01 +0000 Received: (at 45692) by debbugs.gnu.org; 25 Jul 2021 14:32:09 +0000 Received: from localhost ([127.0.0.1]:49104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7fAi-00063H-1G for submit@debbugs.gnu.org; Sun, 25 Jul 2021 10:32:08 -0400 Received: from mail-40138.protonmail.ch ([185.70.40.138]:44313) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7fAc-00062j-Mg for 45692@debbugs.gnu.org; Sun, 25 Jul 2021 10:32:02 -0400 Date: Sun, 25 Jul 2021 14:31:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1627223510; bh=G401Hf2cn60LfSnJr6Wxnq5IDzgqvYoTAfzVfNnmOM0=; h=Date:To:From:Reply-To:Subject:From; b=UAnbXGVmU/cXLdVvEF5QNsPVNH3NiSJoUGFUdL0v/E1SNT+dlAheIJKiaQ9hqrUrV iDe/SBsH2F8G8BJGkkCEYpwifk6bvBrYDC9oxo+9cTbuxCbOrE1eqy9iSt5gHPc5jN ognZOte8aMG9JJixZnny3kGvYK/TrIrTrT5zyh7s= From: raid5atemyhomework Message-ID: 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello nonexistent reviewer, I updated this patch to latest `origin/master` because the previous version= has bitrotted and will not `git am` cleanly anymore. There are no changes relative to v3, just rebased it so that the patch appl= ies cleanly. Testing has been very minimal: I created a VM with the added service, then = ran it in a VM session that included additional devices (qcow2 files) from = a previous VM run that formatted those as devices of a ZFS pool, and confir= med that the new VM could read it and manage that pool. Is there any chance this will get reviewed or should I just not bother and = move on with my life and forget about Guix? At this point as well, I would like to point out what I think is a failing = of how the Guix distribution is managed. Guix does not assign any particular committers to any particular tasks or a= reas. The intent is that any committer can review and commit any particular patch= . However, this fails as the Guix project has grown. No single committer wants to review ***all*** the available patches, and th= is is understandable, as the Guix project has grown significantly and inclu= des a wide variety of people with diverging interests and as an open-source= project you cannot really require that particular people look at particula= r things. Unfortunately, I do not know *who* committers are, and more importantly, *w= hich* committer might be interested in this ZFS service type. Because "any committer can review and commit any patch!!" there is no parti= cular list or table I can refer to, to figure out who might be useful to pi= ng for this patchset. At the same time, because no committer is interested in *all* patches I can= not just ping some particular person and expect to somehow get on some list= somewhere that tells me "you will be the 48486th patch that will be review= ed by who is interested in all patches". It is very discouraging to work on this code for a few weeks, release it, n= ot get any reviews, and end up in a situation where I have to make annoying= small changes just to keep the patch from bitrotting. I understand that there are few possible reviewers, but if potential new co= ntributors get discouraged from contributing because they do not see their = code actually getting in, then you really cannot expect the number of revie= wers to increase, either. I think it would be nice if I could at least be told some number of people = who *might* be interested in this patch, or just throw the towel and not bo= ther. Thanks raid5atemyhomework >From 5351aa7c1c14d4fea032adad895c436e02d1f261 Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Mon, 22 Mar 2021 16:26:28 +0800 Subject: [PATCH] gnu: Add ZFS service type. * gnu/services/file-systems.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/services/base.scm: Export dependency->shepherd-service-name. * doc/guix.texi (ZFS File System): New subsection. --- doc/guix.texi | 351 ++++++++++++++++++++++++++++++++++ gnu/local.mk | 2 + gnu/services/base.scm | 4 +- gnu/services/file-systems.scm | 295 ++++++++++++++++++++++++++++ 4 files changed, 651 insertions(+), 1 deletion(-) create mode 100644 gnu/services/file-systems.scm diff --git a/doc/guix.texi b/doc/guix.texi index b3c16e6507..e21c47d7ca 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -94,6 +94,7 @@ Copyright @copyright{} 2021 Xinglu Chen@* Copyright @copyright{} 2021 Raghav Gururajan@* Copyright @copyright{} 2021 Domagoj Stolfa@* Copyright @copyright{} 2021 Hui Lu@* +Copyright @copyright{} 2021 raid5atemyhomework@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -14265,6 +14266,356 @@ a file system declaration such as: compress-force=3Dzstd,space_cache=3Dv2")) @end lisp + +@node ZFS File System +@subsection ZFS File System + +Support for ZFS file systems is provided on Guix by the OpenZFS project. +OpenZFS currently only supports Linux-Libre and is not available on the +Hurd. + +OpenZFS is free software; unfortunately its license is incompatible with +the GNU General Public License (GPL), the license of the Linux kernel, +which means they cannot be distributed together. However, as a user, +you can choose to build ZFS and use it together with Linux; you can +even rely on Guix to automate this task. See +@uref{https://www.fsf.org/licensing/zfs-and-linux, this analysis by +the Free Software Foundation} for more information. + +As a large and complex kernel module, OpenZFS has to be compiled for a +specific version of Linux-Libre. At times, the latest OpenZFS package +available in Guix is not compatible with the latest Linux-Libre version. +Thus, directly installing the @code{zfs} package can fail. + +Instead, you are recommended to select a specific older long-term-support +Linux-Libre kernel. Do not use @code{linux-libre-lts}, as even the +latest long-term-support kernel may be too new for @code{zfs}. Instead, +explicitly select a specific older version, such as @code{linux-libre-5.10= }, +and upgrade it manually later as new long-term-support kernels become +available that you have confirmed is compatible with the latest available +OpenZFS version on Guix. + +For example, you can modify your system configuration file to a specific +Linux-Libre version and add the @code{zfs-service-type} service. + +@lisp +(use-modules (gnu)) +(use-package-modules + #;@dots{} + linux) +(use-service-modules + #;@dots{} + file-systems) + +(define my-kernel linux-libre-5.10) + +(operating-system + (kernel my-kernel) + #;@dots{} + (services + (cons* (service zfs-service-type + (zfs-configuration + (kernel my-kernel))) + #;@dots{} + %desktop-services)) + #;@dots{}) +@end lisp + +@defvr {Scheme Variable} zfs-service-type +This is the type for a service that adds ZFS support to your operating +system. The service is configured using a @code{zfs-configuration} +record. + +Here is an example use: + +@lisp +(service zfs-service-type + (zfs-configuration + (kernel linux-libre-5.4))) +@end lisp +@end defvr + +@deftp {Data Type} zfs-configuration +This data type represents the configuration of the ZFS support in Guix +System. Its fields are: + +@table @asis +@item @code{kernel} +The package of the Linux-Libre kernel to compile OpenZFS for. This field +is always required. It @emph{must} be the same kernel you use in your +@code{operating-system} form. + +@item @code{base-zfs} (default: @code{zfs}) +The OpenZFS package that will be compiled for the given Linux-Libre kernel= . + +@item @code{base-zfs-auto-snapshot} (default: @code{zfs-auto-snapshot}) +The @code{zfs-auto-snapshot} package to use. It will be modified to +specifically use the OpenZFS compiled for your kernel. + +@item @code{dependencies} (default: @code{'()}) +A list of @code{} or @code{} records that must +be mounted or opened before OpenZFS scans for pools to import. For exampl= e, +if you have set up LUKS containers as leaf VDEVs in a pool, you have to +include their corresponding @code{} records so that OpenZF= S +can import the pool correctly at bootup. + +@item @code{auto-mount?} (default: @code{#t}) +Whether to mount datasets with the ZFS @code{mountpoint} property automati= cally +at startup. This is the behavior that ZFS users usually expect. You migh= t +set this to @code{#f} for an operating system intended as a ``rescue'' sys= tem +that is intended to help debug problems with the disks rather than actuall= y +work in production. + +@item @code{auto-scrub} (default: @code{'weekly}) +Specifies how often to scrub all pools. Can be the symbols @code{'weekly}= or +@code{'monthly}, or a schedule specification understood by +@xref{mcron, mcron job specifications,, mcron, GNU@tie{}mcron}, such as +@code{"0 3 * * 6"} for ``every 3AM on Saturday''. +It can also be @code{#f} to disable auto-scrubbing (@strong{not recommende= d}). + +The general guideline is to scrub weekly when using consumer-quality drive= s, and +to scrub monthly when using enterprise-quality drives. + +@code{'weekly} scrubs are done on Sunday midnight, while @code{monthly} sc= rubs +are done on midnight on the first day of each month. + +@item @code{auto-snapshot?} (default: @code{#t}) +Specifies whether to auto-snapshot by default. If @code{#t}, then snapsho= ts +are automatically created except for ZFS datasets with the +@code{com.sun:auto-snapshot} ZFS vendor property set to @code{false}. + +If @code{#f}, snapshots will not be automatically created, unless the ZFS +dataset has the @code{com.sun:auto-snapshot} ZFS vendor property set to +@code{true}. + +@item @code{auto-snapshot-keep} (default: @code{'()}) +Specifies an association list of symbol-number pairs, indicating the numbe= r +of automatically-created snapshots to retain for each frequency type. + +If not specified via this field, by default there are 4 @code{frequent}, 2= 4 +@code{hourly}, 31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly} sna= pshots. + +For example: + +@lisp +(zfs-configuration + (kernel my-kernel) + (auto-snapshot-keep + '((frequent . 8) + (hourly . 12)))) +@end lisp + +The above will keep 8 @code{frequent} snapshots and 12 @code{hourly} snaps= hots. +@code{daily}, @code{weekly}, and @code{monthly} snapshots will keep their +defaults (31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly}). + +@end table +@end deftp + +@subsubsection ZFS Auto-Snapshot + +The ZFS service on Guix System supports auto-snapshots as implemented in t= he +Solaris operating system. + +@code{frequent} (every 15 minutes), @code{hourly}, @code{daily}, @code{wee= kly}, +and @code{monthly} snapshots are created automatically for ZFS datasets th= at +have auto-snapshot enabled. They will be named, for example, +@code{zfs-auto-snap_frequent-2021-03-22-1415}. You can continue to use +manually-created snapshots as long as they do not conflict with the naming +convention used by auto-snapshot. You can also safely manually destroy +automatically-created snapshots, for example to free up space. + +The @code{com.sun:auto-snapshot} ZFS property controls auto-snapshot on a +per-dataset level. Sub-datasets will inherit this property from their par= ent +dataset, but can have their own property. + +You @emph{must} set this property to @code{true} or @code{false} exactly, +otherwise it will be treated as if the property is unset. + +For example: + +@example +# zfs list -o name +NAME +tank +tank/important-data +tank/tmp +# zfs set com.sun:auto-snapshot=3Dtrue tank +# zfs set com.sun:auto-snapshot=3Dfalse tank/tmp +@end example + +The above will set @code{tank} and @code{tank/important-data} to be +auto-snapshot, while @code{tank/tmp} will not be auto-snapshot. + +If the @code{com.sun:auto-snapshot} property is not set for a dataset +(the default when pools and datasets are created), then whether +auto-snapshot is done or not will depend on the @code{auto-snapshot?} +field of the @code{zfs-configuration} record. + +There are also @code{com.sun:auto-snapshot:frequent}, +@code{com.sun:auto-snapshot:hourly}, @code{com.sun:auto-snapshot:daily}, +@code{com.sun:auto-snapshot:weekly}, and @code{com.sun:auto-snapshot:month= ly} +properties that give finer-grained control of whether to auto-snapshot a +dataset at a particular schedule. + +The number of snapshots kept for all datasets can be overridden via the +@code{auto-snapshot-keep} field of the @code{zfs-configuration} record. +There is currently no support to have different numbers of snapshots to +keep for different datasets. + +@subsubsection ZVOLs + +ZFS supports ZVOLs, block devices that ZFS exposes to the operating +system in the @code{/dev/zvol/} directory. The ZVOL will have the same +resilience and self-healing properties as other datasets on your ZFS pool. +ZVOLs can also be snapshotted (and will be included in auto-snapshotting +if enabled), which snapshots the state of the block device, effectively +snapshotting the hosted file system. + +You can put any file system inside the ZVOL. However, in order to mount t= his +file system at system start, you need to add @code{%zfs-zvol-dependency} a= s a +dependency of each file system inside a ZVOL. + +@defvr {Scheme Variable} %zfs-zvol-dependency +An artificial @code{} which tells the file system mounting +service to wait for ZFS to provide ZVOLs before mounting the +@code{} dependent on it. +@end defvr + +For example, suppose you create a ZVOL and put an ext4 filesystem +inside it: + +@example +# zfs create -V 100G tank/ext4-on-zfs +# mkfs.ext4 /dev/zvol/tank/ext4-on-zfs +# mkdir /ext4-on-zfs +# mount /dev/zvol/tank/ext4-on-zfs /ext4-on-zfs +@end example + +You can then set this up to be mounted at boot by adding this to the +@code{file-systems} field of your @code{operating-system} record: + +@lisp +(file-system + (device "/dev/zvol/tank/ext4-on-zfs") + (mount-point "/ext4-on-zfs") + (type "ext4") + (dependencies (list %zfs-zvol-dependency))) +@end lisp + +You @emph{must not} add @code{%zfs-zvol-dependency} to your +@code{operating-system}'s @code{mapped-devices} field, and you @emph{must +not} add it (or any @code{}s dependent on it) to the +@code{dependencies} field of @code{zfs-configuration}. Finally, you +@emph{must not} use @code{%zfs-zvol-dependency} unless you actually +instantiate @code{zfs-service-type} on your system. + +@subsubsection Unsupported Features + +Some common features and uses of ZFS are currently not supported, or not +fully supported, on Guix. + +@enumerate +@item +Shepherd-managed daemons that are configured to read from or write to ZFS +mountpoints need to include @code{user-processes} in their @code{requireme= nt} +field. This is the earliest that ZFS file systems are assured of being +mounted. + +Generally, most daemons will, directly or indirectly, require +@code{networking}, or @code{user-processes}, or both. Most implementation= s +of @code{networking} will also require @code{user-processes} so daemons th= at +require only @code{networking} will also generally start up after +@code{user-processes}. A notable exception, however, is +@code{static-networking-service-type}. You will need to explicitly add +@code{user-processes} as a @code{requirement} of your @code{static-network= ing} +record. + +@item +@code{mountpoint=3Dlegacy} ZFS file systems. The handlers for the Guix mo= unting +system have not yet been modified to support ZFS, and will expect @code{/d= ev} +paths in the @code{}'s @code{device} field, but ZFS file syst= ems +are referred to via non-path @code{pool/file/system} names. Such file sys= tems +also need to be mounted @emph{after} OpenZFS has scanned for pools. + +You can still manually mount these file systems after system boot; what is +only unsupported is mounting them automatically at system boot by specifyi= ng +them in @code{} records of your @code{operating-system}. + +@item +@code{/home} on ZFS. Guix will create home directories for users, but thi= s +process currently cannot be scheduled after ZFS file systems are mounted. +Thus, the ZFS file system might be mounted @emph{after} Guix has created +home directories at boot, at which point OpenZFS will refuse to mount sinc= e +the mountpoint is not empty. However, you @emph{can} create an ext4, xfs, +btrfs, or other supported file system inside a ZVOL, have that depend on +@code{%zfs-zvol-dependency}, and set it to mount on the @code{/home} +directory; they will be scheduled to mount before the @code{user-homes} +process. + +Similarly, other locations like @code{/var}, @code{/gnu/store} and so +on cannot be reliably put in a ZFS file system, though they may be +possible to create as other file systems inside ZVOL containers. + +@item +@code{/} and @code{/boot} on ZFS. These require Guix to expose more of +the @code{initrd} very early boot process to services. It also requires +Guix to have the ability to explicitly load modules while still in +@code{initrd} (currently kernel modules loaded by +@code{kernel-module-loader-service-type} are loaded after @code{/} is +mounted). Further, since one of ZFS's main advantages is that it can +continue working despite the loss of one or more devices, it makes sense +to also support installing the bootloader on all devices of the pool that +contains the @code{/} and @code{/boot}; after all, if ZFS can survive the +loss of one device, the bootloader should also be able to survive the loss +of one device. + +@item +ZVOL swap devices. Mapped swap devices need to be listed in +@code{mapped-devices} to ensure they are opened before the system attempts +to use them, but you cannot currently add @code{%zfs-zvol-dependency} to +@code{mapped-devices}. + +This will also require significant amounts of testing, as various kernel +build options and patches may affect how swapping works, which are possibl= y +different on Guix System compared to other distributions that this feature= is +known to work on. + +@item +ZFS Event Daemon. Support for this has not been written yet, patches are +welcome. The main issue is how to design this in a Guix style while +supporting legacy shell-script styles as well. In particular, OpenZFS its= elf +comes with a number of shell scripts intended for ZFS Event Daemon, and we +need to figure out how the user can choose to use or not use the provided +scripts (and configure any settings they have) or override with their own +custom code (which could be shell scripts they have written and trusted fr= om +previous ZFS installations). + +As-is, you can create your own service that activates the ZFS Event Daemon +by creating the @file{/etc/zfs/zed} directory and filling it appropriately= , +then launching @code{zed}. + +@item +@file{/etc/zfs/zpool.cache}. Currently the ZFS support on Guix always for= ces +scanning of all devices at bootup to look for ZFS pools. For systems with +dozens or hundreds of storage devices, this can lead to slow bootup. One = issue +is that tools should really not write to @code{/etc} which is supposed to = be for +configuration; possibly it could be moved to @code{/var} instead. Another= issue +is that if Guix ever supports @code{/} on ZFS, we would need to somehow ke= ep the +@code{zpool.cache} file inside the @code{initrd} up-to-date with what is i= n the +@code{/} mount point. + +@item +@code{zfs share}. This will require some (unknown amount of) work to inte= grate +into the Samba and NFS services of Guix. You @emph{can} manually set up S= amba +and NFS to share any mounted ZFS datasets by setting up their configuratio= ns +properly; it just can't be done for you by @code{zfs share} and the +@code{sharesmb} and @code{sharenfs} properties. +@end enumerate + +Hopefully, support for the above only requires code to be written, o users +are encouraged to hack on Guix to implement the above features. + @node Mapped Devices @section Mapped Devices diff --git a/gnu/local.mk b/gnu/local.mk index b944c671af..a2ff871277 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -43,6 +43,7 @@ # Copyright =C2=A9 2021 Philip McGrath # Copyright =C2=A9 2021 Arun Isaac # Copyright =C2=A9 2021 Sharlatan Hellseher +# Copyright =C2=A9 2021 raid5atemyhomework # # This file is part of GNU Guix. # @@ -618,6 +619,7 @@ GNU_SYSTEM_MODULES =3D=09=09=09=09\ %D%/services/docker.scm=09=09=09\ %D%/services/authentication.scm=09=09\ %D%/services/file-sharing.scm=09=09=09\ + %D%/services/file-systems.scm=09=09=09\ %D%/services/games.scm=09=09=09\ %D%/services/ganeti.scm=09=09=09\ %D%/services/getmail.scm=09=09=09=09\ diff --git a/gnu/services/base.scm b/gnu/services/base.scm index ab3e441a7b..bcca24f93a 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -185,7 +185,9 @@ references-file - %base-services)) + %base-services + + dependency->shepherd-service-name)) ;;; Commentary: ;;; diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.scm new file mode 100644 index 0000000000..0b1aae38ac --- /dev/null +++ b/gnu/services/file-systems.scm @@ -0,0 +1,295 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2021 raid5atemyhomework +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services file-systems) + #:use-module (gnu packages file-systems) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu services linux) + #:use-module (gnu services mcron) + #:use-module (gnu services shepherd) + #:use-module (gnu system mapped-devices) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix records) + #:export (zfs-service-type + + zfs-configuration + zfs-configuration? + zfs-configuration-kernel + zfs-configuration-base-zfs + zfs-configuration-base-zfs-auto-snapshot + zfs-configuration-dependencies + zfs-configuration-auto-mount? + zfs-configuration-auto-scrub + zfs-configuration-auto-snapshot? + zfs-configuration-auto-snapshot-keep + + %zfs-zvol-dependency)) + +(define-record-type* + zfs-configuration + make-zfs-configuration + zfs-configuration? + + ; linux-libre kernel you want to compile the base-zfs module for. + (kernel zfs-configuration-kernel) + + ; the OpenZFS package that will be modified to compile for the + ; given kernel. + (base-zfs zfs-configuration-base-zfs + (default zfs)) + + ; the zfs-auto-snapshot package that will be modified to compile + ; for the given kernel. + (base-zfs-auto-snapshot zfs-configuration-base-zfs-auto-snapshot + (default zfs-auto-snapshot)) + + ; list of or objects that must be + ; opened/mounted before we import any ZFS pools. + (dependencies zfs-configuration-dependencies + (default '())) + + ; #t if mountable datasets are to be mounted automatically. + ; #f if not mounting. + ; #t is the expected behavior on other operating systems, the + ; #f is only supported for "rescue" operating systems where + ; the user wants lower-level control of when to mount. + (auto-mount? zfs-configuration-auto-mount? + (default #t)) + + ; 'weekly for weekly scrubbing, 'monthly for monthly scrubbing, an + ; mcron time specification that can be given to `job`, or #f to + ; disable. + (auto-scrub zfs-configuration-auto-scrub + (default 'weekly)) + + ; #t if auto-snapshot is default (and `com.sun:auto-snapshot=3Dfalse` + ; disables auto-snapshot per dataset), #f if no auto-snapshotting + ; is default (and `com.sun:auto-snapshot=3Dtrue` enables auto-snapshot + ; per dataset). + (auto-snapshot? zfs-configuration-auto-snapshot? + (default #t)) + + ; association list of symbol-number pairs to indicate the number + ; of automatic snapshots to keep for each of 'frequent, 'hourly, + ; 'daily, 'weekly, and 'monthly. + ; e.g. '((frequent . 8) (hourly . 12)) + (auto-snapshot-keep zfs-configuration-auto-snapshot-keep + (default '()))) + +(define %default-auto-snapshot-keep + '((frequent . 4) + (hourly . 24) + (daily . 31) + (weekly . 8) + (monthly . 12))) + +(define %auto-snapshot-mcron-schedule + '((frequent . "0,15,30,45 * * * *") + (hourly . "0 * * * *") + (daily . "0 0 * * *") + (weekly . "0 0 * * 7") + (monthly . "0 0 1 * *"))) + +;; A synthetic and unusable MAPPED-DEVICE intended for use when +;; the user has created a mountable filesystem inside a ZFS +;; zvol and wants it mounted inside the configuration.scm. +(define %zfs-zvol-dependency + (mapped-device + (source '()) + (targets '("zvol/*")) + (type #f))) + +(define (make-zfs-package conf) + (let ((kernel (zfs-configuration-kernel conf)) + (base-zfs (zfs-configuration-base-zfs conf))) + (package + (inherit base-zfs) + (arguments (cons* #:linux kernel + (package-arguments base-zfs)))))) + +(define (make-zfs-auto-snapshot-package conf) + (let ((zfs (make-zfs-package conf)) + (base-zfs-auto-snapshot (zfs-configuration-base-zfs-auto-snapshot = conf))) + (package + (inherit base-zfs-auto-snapshot) + (inputs `(("zfs" ,zfs)))))) + +(define (zfs-loadable-modules conf) + (list (list (make-zfs-package conf) "module"))) + +(define (zfs-shepherd-services conf) + (let* ((zfs-package (make-zfs-package conf)) + (zpool (file-append zfs-package "/sbin/zpool")) + (zfs (file-append zfs-package "/sbin/zfs")) + (zvol_wait (file-append zfs-package "/bin/zvol_wait")) + (scheme-modules `((srfi srfi-1) + (srfi srfi-34) + (srfi srfi-35) + (rnrs io ports) + ,@%default-modules))) + (define zfs-scan + (shepherd-service + (provision '(zfs-scan)) + (requirement `(root-file-system + kernel-module-loader + udev + ,@(map dependency->shepherd-service-name + (zfs-configuration-dependencies conf)))) + (documentation "Scans for and imports ZFS pools.") + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "zfs: error importing pools: ~s~%" + (condition-message c)) + #f)) + ; TODO: optionally use a cachefile. + (invoke #$zpool "import" "-a" "-N")))) + ;; Why not one-shot? Because we don't really want to rescan + ;; this each time a requiring process is restarted, as scanning + ;; can take a long time and a lot of I/O. + (stop #~(const #f)))) + + (define device-mapping-zvol/* + (shepherd-service + (provision '(device-mapping-zvol/*)) + (requirement '(zfs-scan)) + (documentation "Waits for all ZFS ZVOLs to be opened.") + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "zfs: error opening zvols: ~s~%" + (condition-message c)) + #f)) + (invoke #$zvol_wait)))) + (stop #~(const #f)))) + + (define zfs-auto-mount + (shepherd-service + (provision '(zfs-auto-mount)) + (requirement '(zfs-scan)) + (documentation "Mounts all non-legacy mounted ZFS filesystems.") + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "zfs: error mounting file systems: ~= s~%" + (condition-message c)) + #f)) + ;; 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/console ? + (with-output-to-port (current-error-port) + (lambda () + (invoke #$zfs "mount" "-a" "-l")))))) + (stop #~(lambda _ + ;; Make sure that Shepherd does not have a CWD that + ;; is a mounted ZFS filesystem, which would prevent + ;; unmounting. + (chdir "/") + (invoke #$zfs "unmount" "-a" "-f"))))) + + `(,zfs-scan + ,device-mapping-zvol/* + ,@(if (zfs-configuration-auto-mount? conf) + `(,zfs-auto-mount) + '())))) + +(define (zfs-user-processes conf) + (if (zfs-configuration-auto-mount? conf) + '(zfs-auto-mount) + '(zfs-scan))) + +(define (zfs-mcron-auto-snapshot-jobs conf) + (let* ((user-auto-snapshot-keep (zfs-configuration-auto-snapshot-ke= ep conf)) + ;; assoc-ref has earlier entries overriding later ones. + (auto-snapshot-keep (append user-auto-snapshot-keep + %default-auto-snapshot-keep= )) + (auto-snapshot? (zfs-configuration-auto-snapshot? c= onf)) + (zfs-auto-snapshot-package (make-zfs-auto-snapshot-package con= f)) + (zfs-auto-snapshot (file-append zfs-auto-snapshot-pack= age + "/sbin/zfs-auto-snapsh= ot"))) + (map + (lambda (label) + (let ((keep (assoc-ref auto-snapshot-keep label)) + (sched (assoc-ref %auto-snapshot-mcron-schedule label))) + #~(job '#$sched + (string-append #$zfs-auto-snapshot + " --quiet --syslog " + " --label=3D" #$(symbol->string label) + " --keep=3D" #$(number->string keep) + " //")))) + '(frequent hourly daily weekly monthly)))) + +(define (zfs-mcron-auto-scrub-jobs conf) + (let* ((zfs-package (make-zfs-package conf)) + (zpool (file-append zfs-package "/sbin/zpool")) + (auto-scrub (zfs-configuration-auto-scrub conf)) + (sched (cond + ((eq? auto-scrub 'weekly) "0 0 * * 7") + ((eq? auto-scrub 'monthly) "0 0 1 * *") + (else auto-scrub)))) + (list + #~(job '#$sched + ;; Suppress errors: if there are no ZFS pools, the + ;; scrub will not be given any arguments, which makes + ;; it error out. + (string-append "(" #$zpool " scrub `" #$zpool " list -o name = -H` " + "> /dev/null 2>&1) " + "|| exit 0"))))) + +(define (zfs-mcron-jobs conf) + (append (zfs-mcron-auto-snapshot-jobs conf) + (if (zfs-configuration-auto-scrub conf) + (zfs-mcron-auto-scrub-jobs conf) + '()))) + +(define zfs-service-type + (service-type + (name 'zfs) + (extensions + (list ;; Install OpenZFS kernel module into kernel profile. + (service-extension linux-loadable-module-service-type + zfs-loadable-modules) + ;; And load it. + (service-extension kernel-module-loader-service-type + (const '("zfs"))) + ;; Make sure ZFS pools and datasets are mounted at + ;; boot. + (service-extension shepherd-root-service-type + zfs-shepherd-services) + ;; Make sure user-processes don't start until + ;; after ZFS does. + (service-extension user-processes-service-type + zfs-user-processes) + ;; Install automated scrubbing and snapshotting. + (service-extension mcron-service-type + zfs-mcron-jobs) + + ;; Install ZFS management commands in the system + ;; profile. + (service-extension profile-service-type + (compose list make-zfs-package)) + ;; Install ZFS udev rules. + (service-extension udev-service-type + (compose list make-zfs-package)))) + (description "Installs ZFS, an advanced filesystem and volume manager.= "))) -- 2.31.1 From unknown Thu Aug 14 22:20:30 2025 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: Sun, 01 Aug 2021 09:42: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.162781089726336 (code B ref 45692); Sun, 01 Aug 2021 09:42:02 +0000 Received: (at 45692) by debbugs.gnu.org; 1 Aug 2021 09:41:37 +0000 Received: from localhost ([127.0.0.1]:35534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mA7yT-0006qi-2h for submit@debbugs.gnu.org; Sun, 01 Aug 2021 05:41:37 -0400 Received: from mail-40135.protonmail.ch ([185.70.40.135]:56162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mA7yQ-0006qQ-Jj for 45692@debbugs.gnu.org; Sun, 01 Aug 2021 05:41:35 -0400 Date: Sun, 01 Aug 2021 09:41:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1627810887; bh=pwYKT/nhnBO9sbCdsUibUhxqN3uKbyTwLMA+BDkBChk=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=NaQZiqQdFoyovWO6O5WIO85sdTDOrtKxsbDPmudOif836UOx2CdEUJWHhh8VEp3af BGtyifPO8TzZpWzRtb1ZoUyVUu8dWSefF+bgZQyrjt4BKdgBmmrKppl0+gMs1zN07p smjD2m0QWsDrRH4PRgIhozcVrIdvJw3jrYtUmfiU= From: raid5atemyhomework Message-ID: In-Reply-To: References: 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) BUMP From unknown Thu Aug 14 22:20:30 2025 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: Tue, 10 Aug 2021 11:44: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.162859583114928 (code B ref 45692); Tue, 10 Aug 2021 11:44:02 +0000 Received: (at 45692) by debbugs.gnu.org; 10 Aug 2021 11:43:51 +0000 Received: from localhost ([127.0.0.1]:58581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDQAh-0003si-AW for submit@debbugs.gnu.org; Tue, 10 Aug 2021 07:43:51 -0400 Received: from mail-4318.protonmail.ch ([185.70.43.18]:17761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDQAe-0003sD-Kp for 45692@debbugs.gnu.org; Tue, 10 Aug 2021 07:43:49 -0400 Date: Tue, 10 Aug 2021 11:43:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1628595821; bh=2CBSpvewlxHlOjEbCRLq1QqkmJsAwpZBoCY9EnDr+zs=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=QDjENGhu4ITOLlf7JHx2Tt2aJhXf6E/eBinZIRVMGeRJBc/Dgd0WzzIdp3cDeVal4 5scKDJajKkbSySacKT8A2pn60+8UQTo60QO+c8PoypA/7nkmT9JHizfp6dMG3gQhqg Ri9EFHFaWDJzFKBpFs8B4fa8oQljgtOqzcaqUrbk= From: raid5atemyhomework Message-ID: In-Reply-To: References: 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) BUMPITY BUMPITY BUMP BUMP BUMP From unknown Thu Aug 14 22:20:30 2025 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: Tue, 31 Aug 2021 00:49: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163037093628866 (code B ref 45692); Tue, 31 Aug 2021 00:49:01 +0000 Received: (at 45692) by debbugs.gnu.org; 31 Aug 2021 00:48:56 +0000 Received: from localhost ([127.0.0.1]:60648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKrxQ-0007VW-3z for submit@debbugs.gnu.org; Mon, 30 Aug 2021 20:48:56 -0400 Received: from mail-4324.protonmail.ch ([185.70.43.24]:61403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKrxJ-0007V3-Db for 45692@debbugs.gnu.org; Mon, 30 Aug 2021 20:48:54 -0400 Date: Tue, 31 Aug 2021 00:48:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1630370922; bh=5I92XzehBCdtMXpBHi+5vD6IwfTkSmTYycUkLYGqoGI=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=Tzm5/VItHqwocSMEAdlSaZTGGc/Qou0ywWZmW35LtHZhrDQEdZPeDdP3rJiqdpNas d0iiktAMrkoWuh6+MtBVCBqBKhSOM8msYn/HM6v+XVD/V93+9UXBmkj5do4azOIX4I /RFtND+PwVyHKjPWY6i3+zO60MdTT+0c/RReXG0c= From: raid5atemyhomework Message-ID: <9Vr2H4nOppX9ANzsGjyQEbM0mUl4LcJAsmEwScnDh084gLHotpSwNrX3-TOt1QaqrOQwAsww03POWafkdxUVI-7DLfKDheVvGTL6AHUijFM=@protonmail.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.1 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,TRACKER_ID 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.1 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) YOOOOOOOOOHOOOOOOOOOOOOOO From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 02 Sep 2021 20:58: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: raid5atemyhomework , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163061625421269 (code B ref 45692); Thu, 02 Sep 2021 20:58:01 +0000 Received: (at 45692) by debbugs.gnu.org; 2 Sep 2021 20:57:34 +0000 Received: from localhost ([127.0.0.1]:42207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLtm5-0005Wu-Bq for submit@debbugs.gnu.org; Thu, 02 Sep 2021 16:57:34 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:50538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLtlx-0005Wf-9v for 45692@debbugs.gnu.org; Thu, 02 Sep 2021 16:57:27 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id p8xK250040mfAB4068xKZb; Thu, 02 Sep 2021 22:57:19 +0200 Message-ID: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@telenet.be> From: Maxime Devos Date: Thu, 02 Sep 2021 22:57:09 +0200 In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-JuVAzqRhKAJpPFmNf5J/" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1630616239; bh=MQkamP+fxxwYhMxws7hGO9oO9KsHWSWd29/r//QL70M=; h=Subject:From:To:Date:In-Reply-To:References; b=f0baQuUquzZuWXWwu6ICVPO8Uww2HfDxuBs+eBw4ihK0y65gvTOZiovHKOdo0O1pR J4apr5kuidrRAaiQfm5qUCI0yJxkM+JxcpDslAypDVog8GpKCBhphRRMP8ykimiKHw 0PtZedE/i92Yi6k4hYzLGLcXfNjr05k8Cb5pL7k8LS52IH8jMGwCzfqcLX55xCaXgv VqoICnDuaFvWPqDmmeQQ0pYE6InwIpeBompbT7qyQEK+1vP2h1E01DjqkNnRhy44ZE ZabMYvdphbQzaZclZAsoTz9lv4BZVujBjxlGZjsECt410wuhqT3Y5WjZhy2xMo9ClI llncuNDlWhCNg== X-Spam-Score: 0.0 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-JuVAzqRhKAJpPFmNf5J/ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Some comments on the code. Spoiler: the code is presumably good, but there's a GPL violation. > From 5351aa7c1c14d4fea032adad895c436e02d1f261 Mon Sep 17 00:00:00 2001 > From: raid5atemyhomework > Date: Mon, 22 Mar 2021 16:26:28 +0800 > Subject: [PATCH] gnu: Add ZFS service type. >=20 > * gnu/services/file-systems.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > * gnu/services/base.scm: Export dependency->shepherd-service-name. > * doc/guix.texi (ZFS File System): New subsection. > --- > doc/guix.texi | 351 ++++++++++++++++++++++++++++++++++ > gnu/local.mk | 2 + > gnu/services/base.scm | 4 +- > gnu/services/file-systems.scm | 295 ++++++++++++++++++++++++++++ > 4 files changed, 651 insertions(+), 1 deletion(-) > create mode 100644 gnu/services/file-systems.scm >=20 > diff --git a/doc/guix.texi b/doc/guix.texi > index b3c16e6507..e21c47d7ca 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -94,6 +94,7 @@ Copyright @copyright{} 2021 Xinglu Chen@* > Copyright @copyright{} 2021 Raghav Gururajan@* > Copyright @copyright{} 2021 Domagoj Stolfa@* > Copyright @copyright{} 2021 Hui Lu@* > +Copyright @copyright{} 2021 raid5atemyhomework@* >=20 > Permission is granted to copy, distribute and/or modify this document > under the terms of the GNU Free Documentation License, Version 1.3 or > @@ -14265,6 +14266,356 @@ a file system declaration such as: > compress-force=3Dzstd,space_cache=3Dv2")) > @end lisp >=20 > + > +@node ZFS File System > +@subsection ZFS File System > + > +Support for ZFS file systems is provided on Guix by the OpenZFS project. This is worded a bit misleading: it doesn't seem like OpenZFS is providing Guix-specific support, except in the more general sense that OpenZFS provid= es a ZFS kernel module and utilities to _everyone_. Suggestion: =E2=80=98Support for ZFS file systems in Guix is based on the OpenZFS proje= ct.=E2=80=99 > +OpenZFS currently only supports Linux-Libre and is not available on the > +Hurd. > + > +OpenZFS is free software; unfortunately its license is incompatible with > +the GNU General Public License (GPL), the license of the Linux kernel, > +which means they cannot be distributed together. However, as a user, > +you can choose to build ZFS and use it together with Linux; you can > +even rely on Guix to automate this task. See > +@uref{https://www.fsf.org/licensing/zfs-and-linux, this analysis by > +the Free Software Foundation} for more information. That analysis says explicitely that the CDDL is incompatible with the GPL, and that they cannot be legally linked together. E.g., see the second quot= ed paragraph: =E2=80=98A copyleft license, including any version of the GNU GPL or GNU AG= PL, requires augmented versions to be free under the same license -- the same requiremen= t it applies to modification of the code.1 I wrote a copyleft license for GNU pr= ograms to ensure that all users of all versions of them would get the freedoms I i= ntended to give them. It is not enough to require that the combined program be free software some= how. It must be released, as a whole, **under the original copyleft license**, to e= nsure that: (1) subsequent users get the exact same freedoms and (2) subsequent interme= diaries do not get more opportunity than first-stage intermediaries to make the pro= gram nonfree.=E2=80=99 (emphasis mine) See also . The argument =E2=80=98it's the _user_ that's building & linking, not =E2=80= =98the guix project=E2=80=99=E2=80=99 doesn't seem convincing to me. We're still linking the kernel and OpenZFS kernel m= odule, we're just doing it lazily (in the SRFI-45 sense). Until Sun's copyright expires or Oracle relicenses their ZFS code, I don't think we can legally provide the ZFS kernel module in guix (the user space tools should be fine, but they are useless without the kern= el modules I assume, so maybe remove them too?). > +As a large and complex kernel module, OpenZFS has to be compiled for a > +specific version of Linux-Libre. At times, the latest OpenZFS package > +available in Guix is not compatible with the latest Linux-Libre version. > +Thus, directly installing the @code{zfs} package can fail. > + > +Instead, you are recommended to select a specific older long-term-suppor= t > +Linux-Libre kernel. Do not use @code{linux-libre-lts}, as even the > +latest long-term-support kernel may be too new for @code{zfs}. Instead, > +explicitly select a specific older version, such as @code{linux-libre-5.= 10}, > +and upgrade it manually later as new long-term-support kernels become > +available that you have confirmed is compatible with the latest availabl= e > +OpenZFS version on Guix. > + > +For example, you can modify your system configuration file to a specific > +Linux-Libre version and add the @code{zfs-service-type} service. > + > +@lisp > +(use-modules (gnu)) > +(use-package-modules > + #;@dots{} > + linux) > +(use-service-modules > + #;@dots{} > + file-systems) > + > +(define my-kernel linux-libre-5.10) > + > +(operating-system > + (kernel my-kernel) > + #;@dots{} > + (services > + (cons* (service zfs-service-type > + (zfs-configuration > + (kernel my-kernel))) > + #;@dots{} > + %desktop-services)) > + #;@dots{}) > +@end lisp > + > +@defvr {Scheme Variable} zfs-service-type > +This is the type for a service that adds ZFS support to your operating > +system. The service is configured using a @code{zfs-configuration} > +record. > + > +Here is an example use: > + > +@lisp > +(service zfs-service-type > + (zfs-configuration > + (kernel linux-libre-5.4))) > +@end lisp > +@end defvr > + > +@deftp {Data Type} zfs-configuration > +This data type represents the configuration of the ZFS support in Guix > +System. Its fields are: > + > +@table @asis > +@item @code{kernel} > +The package of the Linux-Libre kernel to compile OpenZFS for. This fiel= d > +is always required. It @emph{must} be the same kernel you use in your > +@code{operating-system} form. > + > +@item @code{base-zfs} (default: @code{zfs}) > +The OpenZFS package that will be compiled for the given Linux-Libre kern= el. > + > +@item @code{base-zfs-auto-snapshot} (default: @code{zfs-auto-snapshot}) > +The @code{zfs-auto-snapshot} package to use. It will be modified to > +specifically use the OpenZFS compiled for your kernel. > + > +@item @code{dependencies} (default: @code{'()}) > +A list of @code{} or @code{} records that mu= st > +be mounted or opened before OpenZFS scans for pools to import. For exam= ple, > +if you have set up LUKS containers as leaf VDEVs in a pool, you have to > +include their corresponding @code{} records so that Open= ZFS > +can import the pool correctly at bootup. > + > +@item @code{auto-mount?} (default: @code{#t}) > +Whether to mount datasets with the ZFS @code{mountpoint} property automa= tically > +at startup. This is the behavior that ZFS users usually expect. You mi= ght > +set this to @code{#f} for an operating system intended as a ``rescue'' s= ystem > +that is intended to help debug problems with the disks rather than actua= lly > +work in production. > + > +@item @code{auto-scrub} (default: @code{'weekly}) > +Specifies how often to scrub all pools. Can be the symbols @code{'weekl= y} or > +@code{'monthly}, or a schedule specification understood by > +@xref{mcron, mcron job specifications,, mcron, GNU@tie{}mcron}, such as > +@code{"0 3 * * 6"} for ``every 3AM on Saturday''. > +It can also be @code{#f} to disable auto-scrubbing (@strong{not recommen= ded}). > + > +The general guideline is to scrub weekly when using consumer-quality dri= ves, and > +to scrub monthly when using enterprise-quality drives. > + > +@code{'weekly} scrubs are done on Sunday midnight, while @code{monthly} = scrubs > +are done on midnight on the first day of each month. > + > +@item @code{auto-snapshot?} (default: @code{#t}) > +Specifies whether to auto-snapshot by default. If @code{#t}, then snaps= hots > +are automatically created except for ZFS datasets with the > +@code{com.sun:auto-snapshot} ZFS vendor property set to @code{false}. > + > +If @code{#f}, snapshots will not be automatically created, unless the ZF= S > +dataset has the @code{com.sun:auto-snapshot} ZFS vendor property set to > +@code{true}. > + > +@item @code{auto-snapshot-keep} (default: @code{'()}) > +Specifies an association list of symbol-number pairs, indicating the num= ber > +of automatically-created snapshots to retain for each frequency type. > + > +If not specified via this field, by default there are 4 @code{frequent},= 24 > +@code{hourly}, 31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly} s= napshots. > + > +For example: > + > +@lisp > +(zfs-configuration > + (kernel my-kernel) > + (auto-snapshot-keep > + '((frequent . 8) > + (hourly . 12)))) > +@end lisp > + > +The above will keep 8 @code{frequent} snapshots and 12 @code{hourly} sna= pshots. > +@code{daily}, @code{weekly}, and @code{monthly} snapshots will keep thei= r > +defaults (31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly}). > + > +@end table > +@end deftp > + > +@subsubsection ZFS Auto-Snapshot > + > +The ZFS service on Guix System supports auto-snapshots as implemented in= the > +Solaris operating system. > + > +@code{frequent} (every 15 minutes), @code{hourly}, @code{daily}, @code{w= eekly}, > +and @code{monthly} snapshots are created automatically for ZFS datasets = that > +have auto-snapshot enabled. They will be named, for example, > +@code{zfs-auto-snap_frequent-2021-03-22-1415}. You can continue to use > +manually-created snapshots as long as they do not conflict with the nami= ng > +convention used by auto-snapshot. You can also safely manually destroy > +automatically-created snapshots, for example to free up space. > + > +The @code{com.sun:auto-snapshot} ZFS property controls auto-snapshot on = a > +per-dataset level. Sub-datasets will inherit this property from their p= arent > +dataset, but can have their own property. > + > +You @emph{must} set this property to @code{true} or @code{false} exactly= , > +otherwise it will be treated as if the property is unset. > + > +For example: > + > +@example > +# zfs list -o name > +NAME > +tank > +tank/important-data > +tank/tmp > +# zfs set com.sun:auto-snapshot=3Dtrue tank > +# zfs set com.sun:auto-snapshot=3Dfalse tank/tmp > +@end example > + > +The above will set @code{tank} and @code{tank/important-data} to be > +auto-snapshot, while @code{tank/tmp} will not be auto-snapshot. > + > +If the @code{com.sun:auto-snapshot} property is not set for a dataset > +(the default when pools and datasets are created), then whether > +auto-snapshot is done or not will depend on the @code{auto-snapshot?} > +field of the @code{zfs-configuration} record. > + > +There are also @code{com.sun:auto-snapshot:frequent}, > +@code{com.sun:auto-snapshot:hourly}, @code{com.sun:auto-snapshot:daily}, > +@code{com.sun:auto-snapshot:weekly}, and @code{com.sun:auto-snapshot:mon= thly} > +properties that give finer-grained control of whether to auto-snapshot a > +dataset at a particular schedule. > + > +The number of snapshots kept for all datasets can be overridden via the > +@code{auto-snapshot-keep} field of the @code{zfs-configuration} record. > +There is currently no support to have different numbers of snapshots to > +keep for different datasets. > + > +@subsubsection ZVOLs > + > +ZFS supports ZVOLs, block devices that ZFS exposes to the operating > +system in the @code{/dev/zvol/} directory. The ZVOL will have the same > +resilience and self-healing properties as other datasets on your ZFS poo= l. > +ZVOLs can also be snapshotted (and will be included in auto-snapshotting > +if enabled), which snapshots the state of the block device, effectively > +snapshotting the hosted file system. > + > +You can put any file system inside the ZVOL. However, in order to mount= this > +file system at system start, you need to add @code{%zfs-zvol-dependency}= as a > +dependency of each file system inside a ZVOL. > + > +@defvr {Scheme Variable} %zfs-zvol-dependency > +An artificial @code{} which tells the file system mountin= g > +service to wait for ZFS to provide ZVOLs before mounting the > +@code{} dependent on it. > +@end defvr > + > +For example, suppose you create a ZVOL and put an ext4 filesystem > +inside it: > + > +@example > +# zfs create -V 100G tank/ext4-on-zfs > +# mkfs.ext4 /dev/zvol/tank/ext4-on-zfs > +# mkdir /ext4-on-zfs > +# mount /dev/zvol/tank/ext4-on-zfs /ext4-on-zfs > +@end example > + > +You can then set this up to be mounted at boot by adding this to the > +@code{file-systems} field of your @code{operating-system} record: > + > +@lisp > +(file-system > + (device "/dev/zvol/tank/ext4-on-zfs") > + (mount-point "/ext4-on-zfs") > + (type "ext4") > + (dependencies (list %zfs-zvol-dependency))) > +@end lisp > + > +You @emph{must not} add @code{%zfs-zvol-dependency} to your > +@code{operating-system}'s @code{mapped-devices} field, and you @emph{mus= t > +not} add it (or any @code{}s dependent on it) to the > +@code{dependencies} field of @code{zfs-configuration}. Finally, you > +@emph{must not} use @code{%zfs-zvol-dependency} unless you actually > +instantiate @code{zfs-service-type} on your system. > + > +@subsubsection Unsupported Features > + > +Some common features and uses of ZFS are currently not supported, or not > +fully supported, on Guix. > + > +@enumerate > +@item > +Shepherd-managed daemons that are configured to read from or write to ZF= S > +mountpoints need to include @code{user-processes} in their @code{require= ment} > +field. This is the earliest that ZFS file systems are assured of being > +mounted. > + > +Generally, most daemons will, directly or indirectly, require > +@code{networking}, or @code{user-processes}, or both. Most implementati= ons > +of @code{networking} will also require @code{user-processes} so daemons = that > +require only @code{networking} will also generally start up after > +@code{user-processes}. A notable exception, however, is > +@code{static-networking-service-type}. You will need to explicitly add > +@code{user-processes} as a @code{requirement} of your @code{static-netwo= rking} > +record. > + > +@item > +@code{mountpoint=3Dlegacy} ZFS file systems. The handlers for the Guix = mounting > +system have not yet been modified to support ZFS, and will expect @code{= /dev} > +paths in the @code{}'s @code{device} field, but ZFS file sy= stems > +are referred to via non-path @code{pool/file/system} names. Such file s= ystems > +also need to be mounted @emph{after} OpenZFS has scanned for pools. > + > +You can still manually mount these file systems after system boot; what = is > +only unsupported is mounting them automatically at system boot by specif= ying > +them in @code{} records of your @code{operating-system}. > + > +@item > +@code{/home} on ZFS. Guix will create home directories for users, but t= his > +process currently cannot be scheduled after ZFS file systems are mounted= . > +Thus, the ZFS file system might be mounted @emph{after} Guix has created > +home directories at boot, at which point OpenZFS will refuse to mount si= nce > +the mountpoint is not empty. However, you @emph{can} create an ext4, xf= s, > +btrfs, or other supported file system inside a ZVOL, have that depend on > +@code{%zfs-zvol-dependency}, and set it to mount on the @code{/home} > +directory; they will be scheduled to mount before the @code{user-homes} > +process. > + > +Similarly, other locations like @code{/var}, @code{/gnu/store} and so > +on cannot be reliably put in a ZFS file system, though they may be > +possible to create as other file systems inside ZVOL containers. > + > +@item > +@code{/} and @code{/boot} on ZFS. These require Guix to expose more of > +the @code{initrd} very early boot process to services. It also requires > +Guix to have the ability to explicitly load modules while still in > +@code{initrd} (currently kernel modules loaded by > +@code{kernel-module-loader-service-type} are loaded after @code{/} is > +mounted). Further, since one of ZFS's main advantages is that it can > +continue working despite the loss of one or more devices, it makes sense > +to also support installing the bootloader on all devices of the pool tha= t > +contains the @code{/} and @code{/boot}; after all, if ZFS can survive th= e > +loss of one device, the bootloader should also be able to survive the lo= ss > +of one device. > + > +@item > +ZVOL swap devices. Mapped swap devices need to be listed in > +@code{mapped-devices} to ensure they are opened before the system attemp= ts > +to use them, but you cannot currently add @code{%zfs-zvol-dependency} to > +@code{mapped-devices}. > + > +This will also require significant amounts of testing, as various kernel > +build options and patches may affect how swapping works, which are possi= bly > +different on Guix System compared to other distributions that this featu= re is > +known to work on. > + > +@item > +ZFS Event Daemon. Support for this has not been written yet, patches ar= e > +welcome. The main issue is how to design this in a Guix style while > +supporting legacy shell-script styles as well. In particular, OpenZFS i= tself > +comes with a number of shell scripts intended for ZFS Event Daemon, and = we > +need to figure out how the user can choose to use or not use the provide= d > +scripts (and configure any settings they have) or override with their ow= n > +custom code (which could be shell scripts they have written and trusted = from > +previous ZFS installations). > + > +As-is, you can create your own service that activates the ZFS Event Daem= on > +by creating the @file{/etc/zfs/zed} directory and filling it appropriate= ly, > +then launching @code{zed}. > + > +@item > +@file{/etc/zfs/zpool.cache}. Currently the ZFS support on Guix always f= orces > +scanning of all devices at bootup to look for ZFS pools. For systems wi= th > +dozens or hundreds of storage devices, this can lead to slow bootup. On= e issue > +is that tools should really not write to @code{/etc} which is supposed t= o be for > +configuration; possibly it could be moved to @code{/var} instead. Anoth= er issue > +is that if Guix ever supports @code{/} on ZFS, we would need to somehow = keep the > +@code{zpool.cache} file inside the @code{initrd} up-to-date with what is= in the > +@code{/} mount point. > + > +@item > +@code{zfs share}. This will require some (unknown amount of) work to in= tegrate > +into the Samba and NFS services of Guix. You @emph{can} manually set up= Samba > +and NFS to share any mounted ZFS datasets by setting up their configurat= ions > +properly; it just can't be done for you by @code{zfs share} and the > +@code{sharesmb} and @code{sharenfs} properties. > +@end enumerate > + > +Hopefully, support for the above only requires code to be written, o use= rs o users -> and users > +are encouraged to hack on Guix to implement the above features. > + > @node Mapped Devices > @section Mapped Devices I'm not familiar enough with ZFS to understand all that text above; I'll as= sume it's fine. > diff --git a/gnu/local.mk b/gnu/local.mk > index b944c671af..a2ff871277 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -43,6 +43,7 @@ > # Copyright =C2=A9 2021 Philip McGrath > # Copyright =C2=A9 2021 Arun Isaac > # Copyright =C2=A9 2021 Sharlatan Hellseher > +# Copyright =C2=A9 2021 raid5atemyhomework > # > # This file is part of GNU Guix. > # > @@ -618,6 +619,7 @@ GNU_SYSTEM_MODULES =3D \ > %D%/services/docker.scm \ > %D%/services/authentication.scm \ > %D%/services/file-sharing.scm \ > + %D%/services/file-systems.scm \ > %D%/services/games.scm \ > %D%/services/ganeti.scm \ > %D%/services/getmail.scm \ > diff --git a/gnu/services/base.scm b/gnu/services/base.scm > index ab3e441a7b..bcca24f93a 100644 > --- a/gnu/services/base.scm > +++ b/gnu/services/base.scm > @@ -185,7 +185,9 @@ >=20 > references-file >=20 > - %base-services)) > + %base-services > + > + dependency->shepherd-service-name)) >=20 > ;;; Commentary: > ;;; > diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.sc= m > new file mode 100644 > index 0000000000..0b1aae38ac > --- /dev/null > +++ b/gnu/services/file-systems.scm > @@ -0,0 +1,295 @@ > +;;; GNU Guix --- Functional package management for GNU > +;;; Copyright =C2=A9 2021 raid5atemyhomework > +;;; > +;;; This file is part of GNU Guix. > +;;; > +;;; GNU Guix is free software; you can redistribute it and/or modify it > +;;; under the terms of the GNU General Public License as published by > +;;; the Free Software Foundation; either version 3 of the License, or (a= t > +;;; your option) any later version. > +;;; > +;;; GNU Guix is distributed in the hope that it will be useful, but > +;;; WITHOUT ANY WARRANTY; without even the implied warranty of > +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +;;; GNU General Public License for more details. > +;;; > +;;; You should have received a copy of the GNU General Public License > +;;; along with GNU Guix. If not, see ;. > + > +(define-module (gnu services file-systems) > + #:use-module (gnu packages file-systems) > + #:use-module (gnu services) > + #:use-module (gnu services base) > + #:use-module (gnu services linux) > + #:use-module (gnu services mcron) > + #:use-module (gnu services shepherd) > + #:use-module (gnu system mapped-devices) > + #:use-module (guix gexp) > + #:use-module (guix packages) > + #:use-module (guix records) > + #:export (zfs-service-type > + > + zfs-configuration > + zfs-configuration? > + zfs-configuration-kernel > + zfs-configuration-base-zfs > + zfs-configuration-base-zfs-auto-snapshot > + zfs-configuration-dependencies > + zfs-configuration-auto-mount? > + zfs-configuration-auto-scrub > + zfs-configuration-auto-snapshot? > + zfs-configuration-auto-snapshot-keep > + > + %zfs-zvol-dependency)) > + > +(define-record-type* > + zfs-configuration > + make-zfs-configuration > + zfs-configuration? > + > + ; linux-libre kernel you want to compile the base-zfs module for. If a comment is on a line of its own, it's normally ";;". ";" is usually only for comments on the same line as some expression. > + (kernel zfs-configuration-kernel) > + ; the OpenZFS package that will be modified to compile for the > + ; given kernel. > + (base-zfs zfs-configuration-base-zfs > + (default zfs)) > + > + ; the zfs-auto-snapshot package that will be modified to compile > + ; for the given kernel. > + (base-zfs-auto-snapshot zfs-configuration-base-zfs-auto-snapshot > + (default zfs-auto-snapshot)) > + > + ; list of or objects that must be > + ; opened/mounted before we import any ZFS pools. > + (dependencies zfs-configuration-dependencies > + (default '())) > + > + ; #t if mountable datasets are to be mounted automatically. Gramatically simpler: #t to mount all mountable datasets by default. > + ; #f if not mounting. > + ; #t is the expected behavior on other operating systems, the > + ; #f is only supported for "rescue" operating systems where > + ; the user wants lower-level control of when to mount. > + (auto-mount? zfs-configuration-auto-mount? > + (default #t)) > + > + ; 'weekly for weekly scrubbing, 'monthly for monthly scrubbing, an > + ; mcron time specification that can be given to `job`, or #f to > + ; disable. > + (auto-scrub zfs-configuration-auto-scrub > + (default 'weekly)) > + > + ; #t if auto-snapshot is default (and `com.sun:auto-snapshot=3Dfalse` --> #t if auto-snapshot is the default or --> #t to auto-snapshot by default > + ; disables auto-snapshot per dataset), #f if no auto-snapshotting > + ; is default (and `com.sun:auto-snapshot=3Dtrue` enables auto-snapshot > + ; per dataset). > + (auto-snapshot? zfs-configuration-auto-snapshot? > + (default #t)) > + > + ; association list of symbol-number pairs to indicate the number > + ; of automatic snapshots to keep for each of 'frequent, 'hourly, > + ; 'daily, 'weekly, and 'monthly. > + ; e.g. '((frequent . 8) (hourly . 12)) > + (auto-snapshot-keep zfs-configuration-auto-snapshot-keep > + (default '()))) Seems a reasonable structure, though I'm not familiar with ZFS. =20 > +(define %default-auto-snapshot-keep > + '((frequent . 4) > + (hourly . 24) > + (daily . 31) > + (weekly . 8) > + (monthly . 12))) > + > +(define %auto-snapshot-mcron-schedule > + '((frequent . "0,15,30,45 * * * *") > + (hourly . "0 * * * *") > + (daily . "0 0 * * *") > + (weekly . "0 0 * * 7") > + (monthly . "0 0 1 * *"))) > + > +;; A synthetic and unusable MAPPED-DEVICE intended for use when > +;; the user has created a mountable filesystem inside a ZFS > +;; zvol and wants it mounted inside the configuration.scm. > +(define %zfs-zvol-dependency > + (mapped-device > + (source '()) > + (targets '("zvol/*")) > + (type #f))) > + > +(define (make-zfs-package conf) > + (let ((kernel (zfs-configuration-kernel conf)) > + (base-zfs (zfs-configuration-base-zfs conf))) > + (package > + (inherit base-zfs) > + (arguments (cons* #:linux kernel > + (package-arguments base-zfs)))))) > + > +(define (make-zfs-auto-snapshot-package conf) > + (let ((zfs (make-zfs-package conf)) > + (base-zfs-auto-snapshot (zfs-configuration-base-zfs-auto-snapsho= t conf))) > + (package > + (inherit base-zfs-auto-snapshot) > + (inputs `(("zfs" ,zfs)))))) > + > +(define (zfs-loadable-modules conf) > + (list (list (make-zfs-package conf) "module"))) > + > +(define (zfs-shepherd-services conf) > + (let* ((zfs-package (make-zfs-package conf)) > + (zpool (file-append zfs-package "/sbin/zpool")) > + (zfs (file-append zfs-package "/sbin/zfs")) > + (zvol_wait (file-append zfs-package "/bin/zvol_wait")) > + (scheme-modules `((srfi srfi-1) > + (srfi srfi-34) > + (srfi srfi-35) > + (rnrs io ports) > + ,@%default-modules))) > + (define zfs-scan > + (shepherd-service > + (provision '(zfs-scan)) > + (requirement `(root-file-system > + kernel-module-loader > + udev > + ,@(map dependency->shepherd-service-name > + (zfs-configuration-dependencies conf)))) > + (documentation "Scans for and imports ZFS pools.") > + (modules scheme-modules) > + (start #~(lambda _ > + (guard (c ((message-condition? c) > + (format (current-error-port) > + "zfs: error importing pools: ~s~%" > + (condition-message c)) > + #f)) > + ; TODO: optionally use a cachefile. > + (invoke #$zpool "import" "-a" "-N")))) > + ;; Why not one-shot? Because we don't really want to rescan > + ;; this each time a requiring process is restarted, as scanning > + ;; can take a long time and a lot of I/O. > + (stop #~(const #f)))) > + > + (define device-mapping-zvol/* > + (shepherd-service > + (provision '(device-mapping-zvol/*)) > + (requirement '(zfs-scan)) > + (documentation "Waits for all ZFS ZVOLs to be opened.") > + (modules scheme-modules) > + (start #~(lambda _ > + (guard (c ((message-condition? c) > + (format (current-error-port) > + "zfs: error opening zvols: ~s~%" > + (condition-message c)) > + #f)) > + (invoke #$zvol_wait)))) > + (stop #~(const #f)))) > + > + (define zfs-auto-mount > + (shepherd-service > + (provision '(zfs-auto-mount)) > + (requirement '(zfs-scan)) > + (documentation "Mounts all non-legacy mounted ZFS filesystems.") > + (modules scheme-modules) > + (start #~(lambda _ > + (guard (c ((message-condition? c) > + (format (current-error-port) > + "zfs: error mounting file systems:= ~s~%" > + (condition-message c)) > + #f)) > + ;; 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/console= ? > + (with-output-to-port (current-error-port) > + (lambda () > + (invoke #$zfs "mount" "-a" "-l")))))) > + (stop #~(lambda _ > + ;; Make sure that Shepherd does not have a CWD that > + ;; is a mounted ZFS filesystem, which would prevent > + ;; unmounting. > + (chdir "/") > + (invoke #$zfs "unmount" "-a" "-f"))))) > + > + `(,zfs-scan > + ,device-mapping-zvol/* > + ,@(if (zfs-configuration-auto-mount? conf) > + `(,zfs-auto-mount) > + '())))) Service definition seems reasonable, but agan, I'm no ZFS expert. > +(define (zfs-user-processes conf) > + (if (zfs-configuration-auto-mount? conf) > + '(zfs-auto-mount) > + '(zfs-scan))) > + > +(define (zfs-mcron-auto-snapshot-jobs conf) > + (let* ((user-auto-snapshot-keep (zfs-configuration-auto-snapshot-= keep conf)) > + ;; assoc-ref has earlier entries overriding later ones. > + (auto-snapshot-keep (append user-auto-snapshot-keep > + %default-auto-snapshot-ke= ep)) > + (auto-snapshot? (zfs-configuration-auto-snapshot?= conf)) > + (zfs-auto-snapshot-package (make-zfs-auto-snapshot-package c= onf)) > + (zfs-auto-snapshot (file-append zfs-auto-snapshot-pa= ckage > + "/sbin/zfs-auto-snap= shot"))) > + (map > + (lambda (label) > + (let ((keep (assoc-ref auto-snapshot-keep label)) > + (sched (assoc-ref %auto-snapshot-mcron-schedule label))) > + #~(job '#$sched > + (string-append #$zfs-auto-snapshot > + " --quiet --syslog " > + " --label=3D" #$(symbol->string label) > + " --keep=3D" #$(number->string keep) > + " //")))) > + '(frequent hourly daily weekly monthly)))) > + > +(define (zfs-mcron-auto-scrub-jobs conf) > + (let* ((zfs-package (make-zfs-package conf)) > + (zpool (file-append zfs-package "/sbin/zpool")) > + (auto-scrub (zfs-configuration-auto-scrub conf)) > + (sched (cond > + ((eq? auto-scrub 'weekly) "0 0 * * 7") > + ((eq? auto-scrub 'monthly) "0 0 1 * *") > + (else auto-scrub)))) > + (list > + #~(job '#$sched > + > + ;; Suppress errors: if there are no ZFS pools, the > + ;; scrub will not be given any arguments, which makes > + ;; it error out. > + (string-append "(" #$zpool " scrub `" #$zpool " list -o nam= e -H` " > + "> /dev/null 2>&1) " > + "|| exit 0"))))) I think people here would prefer something in Guile, e.g. using 'invoke'. For redirecting to "/dev/null", maybe with-output-to-port, with-error-to-po= rt and (%make-void-port "w0") can be used. Doing this in Guile would avoid an= y potential issues with whitespace and the escape rules for bash. > +(define (zfs-mcron-jobs conf) > + (append (zfs-mcron-auto-snapshot-jobs conf) > + (if (zfs-configuration-auto-scrub conf) > + (zfs-mcron-auto-scrub-jobs conf) > + '()))) > + > +(define zfs-service-type > + (service-type > + (name 'zfs) > + (extensions > + (list ;; Install OpenZFS kernel module into kernel profile. > + (service-extension linux-loadable-module-service-type > + zfs-loadable-modules) > + ;; And load it. > + (service-extension kernel-module-loader-service-type > + (const '("zfs"))) > + ;; Make sure ZFS pools and datasets are mounted at > + ;; boot. > + (service-extension shepherd-root-service-type > + zfs-shepherd-services) > + ;; Make sure user-processes don't start until > + ;; after ZFS does. > + (service-extension user-processes-service-type > + zfs-user-processes) > + ;; Install automated scrubbing and snapshotting. > + (service-extension mcron-service-type > + zfs-mcron-jobs) > + > + ;; Install ZFS management commands in the system > + ;; profile. > + (service-extension profile-service-type > + (compose list make-zfs-package)) FWIW, I (YMMV) expect that the only packages guix installs in the system profile are those listed in the 'packages' field whenever feasible. Though adding zfs to the system profile when ZFS file systems seems reasonable. Apparently the consensus seems to be that putting the file system utilities into the system profile automatically is useful and not problematic: , , so putting it there is probably ok? > + ;; Install ZFS udev rules. > + (service-extension udev-service-type > + (compose list make-zfs-package)))) > + (description "Installs ZFS, an advanced filesystem and volume manage= r."))) Also, a more general comment: ideally most top-level procedures have a docs= tring or comment explaining what they are for and how they are used. Overall, the code seems to be quite reasonable (I haven't tested it though) with a minor issues. If it weren't for the GPL violation, I was going to recommend that the patc= h would be merged (after resolving the minor issues) --- there is the issue t= hat there are very few people familiar enough with ZFS to review this, so I tho= ught it might be reasonable to consider you =E2=80=98the guix expert on ZFS=E2= =80=99, with the idea that if someone has ZFS problems, they would be directed to you, and if som= eone has ZFS-related patches, you would try to review them, and that over time, = guix will attract some reviewers understanding ZFS well-enough to review ZFS thi= ngs, so after some time, you wouldn't have do all that on your own. The GPL violation is very unfortunate. It would have been nice to have som= e ZFS support in Guix. Greetings, Maxime --=-JuVAzqRhKAJpPFmNf5J/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYTE6pRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7m4EAQC3+kJXHerw2bosfiGR8KvicdZp P7Gc/H63OE4cJpAE4wD/StWqivX/tD02Iq4KlMI+m2b6ut3aMvkiBuc+FhRIOwo= =Pcik -----END PGP SIGNATURE----- --=-JuVAzqRhKAJpPFmNf5J/-- From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] Gaslighting References: In-Reply-To: Resent-From: Mason Loring Bliss Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 02 Sep 2021 21:52: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: 45692@debbugs.gnu.org Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163061949926107 (code B ref 45692); Thu, 02 Sep 2021 21:52:01 +0000 Received: (at 45692) by debbugs.gnu.org; 2 Sep 2021 21:51:39 +0000 Received: from localhost ([127.0.0.1]:42240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLucR-0006mx-P8 for submit@debbugs.gnu.org; Thu, 02 Sep 2021 17:51:39 -0400 Received: from yangtze.blisses.org ([144.202.50.44]:53068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLuBr-00069l-HH for 45692@debbugs.gnu.org; Thu, 02 Sep 2021 17:24:08 -0400 Received: from cocytus.blisses.org (cocytus.blisses.org [64.223.129.151]) by yangtze.blisses.org (Postfix) with ESMTP id E3D8317BD70 for <45692@debbugs.gnu.org>; Thu, 2 Sep 2021 17:24:01 -0400 (EDT) Date: Thu, 2 Sep 2021 17:24:00 -0400 From: Mason Loring Bliss Message-ID: <20210902212359.GU6420@blisses.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zu8lIfFVzXMVnfzp" Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Thu, 02 Sep 2021 17:51:35 -0400 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --zu8lIfFVzXMVnfzp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Maxime writes, =20 > The GPL violation is very unfortunate. It would have been nice to > have some ZFS support in Guix. There is no GPL violation. Gaslighting in an attempt to sabotage the adoption of high-quality free software is somewhat poor form and not at all useful. To be clear, the one singular thing that would be a GPL violation would be Guix building Linux with ZFS built in and then distributing that binary. Users can build ZFS into their kernels and use them and that's fine as long as they don't distribute them. Guix can script this to make it easy for users to build ZFS into their kernels and that would not be a violation. The only possible violation is distribution of a binary Linux kernel with ZFS compiled into it. Hope that helps. --=20 Mason Loring Bliss mason@blisses.org Ewige Blumenkra= ft! (if awake 'sleep (aref #(sleep dream) (random 2))) -- Hamlet, Act III, Scen= e I --zu8lIfFVzXMVnfzp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEEXtBZz1axB5rEDCEnrJXcHbvJVUFAmExQO0ACgkQnrJXcHbv JVVz6A//ZGgw66e0hV0UbUOpIPoaj4gjaWPOReW44xgRyi8dP5qtwrpmzBIaCvBh 5ONEnP8cOVQWJlF2bXk05pMiAp7c+n66ZY6IupEfMDbxqeCsHrUfJ9jAKWxEgJCK 26EnK0qbA+RCPloHnkFiKYbgDsvIqB5Rv9c76XT8zL3QCw4Eo0gcJX5Gcm4CKPC4 uQCd7rEDoowFJDZVfC/z+BtV6fzmomLpuceUlA3jvIIK/c2/umsdauwoB33Q8zaV hCt6CffpZEX7XmVv4wWJGKcCcojUDiqaBXN+8K7Z5aPNJFqLYMj6Vupvld2R4oyo rq9mlqPu5jEmwF9I6N0QIO7F/4ndLGxB685Lzm3aXmzd4KD1HBQEtzUvuAustunn CENyh8mtdftM4sWhsFLKd4OSNYzHNDGG/2mm9JFDLqiHGP0CBZpr5JVQC9iBgRYq Bn+IlUl9YmfRkMUUJOBIYrKfrQQCga3NPgvskCh6etiduXd48WVtnfIXot8BCeGT eJ49Q5r+D0V/Sx1wyVhgva+k1xkO3LkiQKSUob4kPumdlSUL4I+XYuLV3WtdA536 crQlXeJIEAiYRXUZYNdK0xsRNj4HUE5E5FQhWmFQAuPR6f26CWbD2qjqh+/+Tm5/ lVHDIFnqZAPsdXKDNye3fCeZNfZiZ7TUtXMw78/7KKoX3P4JgGw= =Td5w -----END PGP SIGNATURE----- --zu8lIfFVzXMVnfzp-- From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 02 Sep 2021 22:23: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: raid5atemyhomework , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163062136529092 (code B ref 45692); Thu, 02 Sep 2021 22:23:01 +0000 Received: (at 45692) by debbugs.gnu.org; 2 Sep 2021 22:22:45 +0000 Received: from localhost ([127.0.0.1]:42276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLv6b-0007ZA-6e for submit@debbugs.gnu.org; Thu, 02 Sep 2021 18:22:45 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:54306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mLv6X-0007Z0-RN for 45692@debbugs.gnu.org; Thu, 02 Sep 2021 18:22:43 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id pANg250060mfAB406ANg8U; Fri, 03 Sep 2021 00:22:40 +0200 Message-ID: From: Maxime Devos Date: Fri, 03 Sep 2021 00:22:39 +0200 In-Reply-To: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@telenet.be> References: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@telenet.be> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-4lkkw7Fcfoep7xveFJvR" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1630621360; bh=bEfq9+hZP8QJgyjbXQIZsOMqV4t7dWkg/K44Fw7OV90=; h=Subject:From:To:Date:In-Reply-To:References; b=Vv/ijOGnnOcqHLZtTlowUSc11WZwCWM0dOe3IHtv9kxhk55FmagWj0UdEEmcTlFEe nzwDDT9K9d6oWwXM81ZOX+R2fSaobSji6zf1MSP27aYAULF86GqJcC7YsuaHIqCErz ljHDXBtxbp5k+4DQ9MIZr0/UJA32ltUwUsE5ofbnrrIp2xoZCMIYYPbnkVeZzJWTKK OtZI3JtSXOVBQlK3VSagsdy4hfuNZJRrPacizrKOgsdoZi/AULAAKBPOmRDBzMh0yj 9Fju/SxG6tX1SFsLqhu3mf53qyPOqy2GJMfLdO3g9cH53zEydE/aVZsGwe9sLssQWB ySz/qfqGJvgCg== X-Spam-Score: -0.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-4lkkw7Fcfoep7xveFJvR Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Maxime Devos schreef op do 02-09-2021 om 22:57 [+0200]: > Hi, >=20 > Some comments on the code. Spoiler: the code is presumably good, > but there's a GPL violation. Nevermind, it's apparently less of an issue than I expected? See the links to IRC at . Greetings, Maxime. --=-4lkkw7Fcfoep7xveFJvR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYTFOrxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hI3AQD9KtkmuVjtu3HdqJTsigvecanY 0v6UU0A1ogwfdSD3YQEA/0kXZFSV+NbwfSXgEO3k0/I9AqQMcCpGSEm33Zx/AwQ= =HNvs -----END PGP SIGNATURE----- --=-4lkkw7Fcfoep7xveFJvR-- From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] Gaslighting Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 03 Sep 2021 12:24: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: Mason Loring Bliss , 45692@debbugs.gnu.org Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163067180624320 (code B ref 45692); Fri, 03 Sep 2021 12:24:02 +0000 Received: (at 45692) by debbugs.gnu.org; 3 Sep 2021 12:23:26 +0000 Received: from localhost ([127.0.0.1]:43242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mM8EA-0006KB-BC for submit@debbugs.gnu.org; Fri, 03 Sep 2021 08:23:26 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:54450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mM8E7-0006Jz-P3 for 45692@debbugs.gnu.org; Fri, 03 Sep 2021 08:23:24 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id pQPM2500E0mfAB406QPM3f; Fri, 03 Sep 2021 14:23:22 +0200 Message-ID: <1061ab2fff72300fee6d29760b3c5e92c80969cb.camel@telenet.be> From: Maxime Devos Date: Fri, 03 Sep 2021 14:22:12 +0200 In-Reply-To: <20210902212359.GU6420@blisses.org> References: <20210902212359.GU6420@blisses.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-haUH6l6e3qre/WuSWVL9" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1630671802; bh=hnEXTblwE4mnxzgK1iHoBkEAY57rOIj2gn2W0blvXnM=; h=Subject:From:To:Date:In-Reply-To:References; b=KxreDYo/ym6+1cQ6izIDvGHWWvVXW6UyKWgFPSPhh/RaY+clGa6D5kZyv9++O/X7v N9RfNp53yvHOE/zk3rbdOvNFqJfaWfpvVm5Yv0vzR1OPiIPQj21Q5hBkczuLVMfSpS 9qFig1mCT8CKA4EzMa7RqmBEKOewqzHQ4Gz2yzWMncrc5yOw51LXlaVlSq+FCrddXx j3yXGeNtWtNqNJgGBJtpKCUGDSZPVxtBfmrSKKXde/rvTlD3mT/RtYB2lirmYYuPzy 5j9bf+mKFkVAdTDCyog6jvtjn2G8c2SrS7QOa7nV6Kby7T6u2OK/ChPM5xaeMtCKhz hVV2HCOC31wUA== X-Spam-Score: -0.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-haUH6l6e3qre/WuSWVL9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mason Loring Bliss schreef op do 02-09-2021 om 17:24 [-0400]: > Maxime writes, > =20 > > The GPL violation is very unfortunate. It would have been nice to > > have some ZFS support in Guix. >=20 > There is no GPL violation. Gaslighting in an attempt to sabotage the > adoption of high-quality free software is somewhat poor form and not at a= ll > useful. Indeed, gaslighing is poor form and not at all useful. But why are you sug= gesting I'm gaslightling here? Did you just read these last two sentences of the e= -mail? If you read all of it, you'd have seen my explanation of why I believe ther= e's a GPL violation, and two relevant links to articles by SFLC and FSF.=20 Also see IRC logs: https://logs.guix.gnu.org/guix/2021-09-02.log https://logs.guix.gnu.org/guix/2021-09-03.log While ultimately it's a matter for the courts to decide on, I believe I've reasonable grounds to believe it's a GPL violation and explained why, so I don't see any gaslightling here. And I'm not =E2=80=98sabotaging=E2=80=99 anything. In fact, I'm _helping_ = adoption of ZFS, by reviewing the patch and giving some suggestions. There is just the prac= tical problem of the in-my-eyes probable GPL violation (your opinion on whether i= t's a GPL violation might vary). > To be clear, the one singular thing that would be a GPL violation would b= e > Guix building Linux with ZFS built in and then distributing that binary. > Users can build ZFS into their kernels and use them and that's fine as lo= ng > as they don't distribute them. Guix can script this to make it easy for > users to build ZFS into their kernels and that would not be a violation. > The only possible violation is distribution of a binary Linux kernel with > ZFS compiled into it. See the previous mail and the IRC logs for why I find this reasoning rather flimsy. > Hope that helps. No, your libel about =E2=80=98Maxime is gaslighting=E2=80=99 doesn't help. = And your paragraph about why you think there's no GPL violation here is nothing I haven't read= before. I probably won't be reading and replying to your mails anymore. Bye, Maxime --=-haUH6l6e3qre/WuSWVL9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYTITdRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7rHFAP40RtS29HE3qLvCXcNA+nJvJN0e 50xYoGAaCo2P6HtwMwD/bQpz/sEfYZbo5NC8GEydG6suvedO+esfi69siO998wM= =dfiW -----END PGP SIGNATURE----- --=-haUH6l6e3qre/WuSWVL9-- From unknown Thu Aug 14 22:20:30 2025 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: Fri, 03 Sep 2021 12:43: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: Maxime Devos , Efraim Flashner Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16306729321840 (code B ref 45692); Fri, 03 Sep 2021 12:43:02 +0000 Received: (at 45692) by debbugs.gnu.org; 3 Sep 2021 12:42:12 +0000 Received: from localhost ([127.0.0.1]:43268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mM8WK-0000Tb-0U for submit@debbugs.gnu.org; Fri, 03 Sep 2021 08:42:12 -0400 Received: from mail-4318.protonmail.ch ([185.70.43.18]:34747) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mM8WH-0000TO-9g for 45692@debbugs.gnu.org; Fri, 03 Sep 2021 08:42:10 -0400 Date: Fri, 03 Sep 2021 12:41:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1630672921; bh=CfmColcHtExzctjfoPwVCCLr1NstiiH+evlsrqtWeW0=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=AyyR0kbbyXUrHWOHzCeP4mXMrFoAlS7HeM/5t0R0HyybWjlEPeAYtUy2QM4nqJIq6 phM4t6TFFSq/qwKfioGRZyEFFeOB6Aja0cT5ut5g+Tp4iFvWvIFXlqgDP8w8XJF552 8dZUQWzp/o+UVcWnKdHlnouudkhqvsXjEw0IzAYA= From: raid5atemyhomework Message-ID: In-Reply-To: References: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@telenet.be> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Greetings Maxime, > Maxime Devos schreef op do 02-09-2021 om 22:57 [+0200]: > > > Hi, > > Some comments on the code. Spoiler: the code is presumably good, > > but there's a GPL violation. > > Nevermind, it's apparently less of an issue than I expected? > See the links to IRC at https://issues.guix.gnu.org/50347. Note that this patch does ***not*** add ZFS to the Guix project. Instead, this patch creates a convenient service that uses the existing `zf= s` package and builds the user system so that the user downloads the ZFS so= urce code, compiles it, and links it to the kernel on the system. In #50347, you refer to this analysis: https://sfconservancy.org/blog/2016/= feb/25/zfs-and-linux/ I quote this part: > ## Is The Analysis Different With Source-Only Distribution? > > ... > > Pure distribution of source with no binaries is undeniably different. Whe= n > distributing source code and no binaries, requirements in those sections = of > GPLv2 and CDDLv1 that cover modification and/or binary (or =E2=80=9CExecu= table=E2=80=9D, as > CDDLv1 calls it) distribution do not activate. Therefore, the analysis is > simpler, and we find no specific clause in either license that prohibits > source-only redistribution of Linux and ZFS, even on the same distributio= n > media. This is in line with the analysis already quoted in the documentation added= : https://www.fsf.org/licensing/zfs-and-linux Guix does ***not*** distribute any binaries; see the file `gnu/packages/fil= e-systems.scm` in the **current** `master` branch of Guix: > `(;; The ZFS kernel module should not be downloaded since the license > ;; terms don't allow for distributing it, only building it locally. > #:substitutable? #f Note that the above code ***predates*** this patch: fe338d7f009 (Efraim Fla= shner 2019-12-19 11:47:49 +0200 1188) Also CCing Efraim here --- presumably he had some choice arguments about ho= w `zfs` got into `gnu/packages/file-systems.scm` in the first place. If the CDDL-GPL incompatibility is problematic, then why is it only being b= rought up now, why did it not get brought up in 2019, when Efraim was submi= tting the patch that put the ZFS package into Guix in the first place? The code in this patch does not do anything that the user cannot do with th= eir own scripts (indeed, I prototyped much of the code in my own `configura= tion.scm`). The code in this patch also does not link, directly or indirectly, into the= ZFS kernel module. At worst, the code in this patch executes the binaries that are the output = of compilation, but since it is invoked as a separate binary running in a s= eparate process, there is no legal basis for considering this as "linking",= as opposed to merely invoking a separate program (if merely invoking a sep= arate program was enough to "link", then Windows cannot run any free softwa= re). Your referred document then makes some speculation that even source distrib= ution might be problematic. However, Guix does *not* even distribute sources, by my understanding --- t= he Guix build downloads from https://github.com/openzfs/zfs/releases/ witho= ut going through any Guix servers, so this should be even less of a problem= . If anyone is at legal risk, it is github, not Guix, for distributing the so= urces --- and it would be very strange for Oracle to not go after github fo= r distributing source code that is intended to be linked to GPL code, but g= o after Guix; Guix is a much more niche project than the openzfs/zfs projec= t on github. (my understanding is that Oracle implicitly allows the existence of openzfs= /zfs, even has some maintainers of the project on their payroll, so it woul= d be very strange to go after software that just downloads the source code = from that project, compiles it, links it, and does ***not*** distribute it = (`#:substitutable? #f`)) My understanding (and my argument) is that the already-existing code introd= uced in fe338d7f009 does not represent a distribution of any ZFS code, not = even source: * The existing fe338d7f009 code tells Guix to download from a github server= , not from Guix. * The existing fe338d7f009 code specifically tells Cuirass to not provide a= binary substitute, so Guix end-users must download from github, not from a= ny Guix servers. * Thus, even if source distribution is legally problematic, Guix does not= even distribute the source; the existing fe338d7f009 code just downloads i= t from an existing distributor. * That Oracle tolerates the continued existence of https://github.com/ope= nzfs/zfs undermines any legal argument Oracle might make if somebody else b= uilds a script that downloads ZFS from https://github.com/openzfs/zfd and c= ompiles it and links it to GPL code locally without redistributing; that pr= oject already contains human-readable instructions on how to download, buil= d, and link ZFS to a Linux kernel, the existing fe338d7f009 code merely tra= nslated that text to a machine-readable program. If Oracle thinks this is legally problematic, they should have demanded= shutdown of the https://github.com/openzfs/zfs project first, a much more = popular project than Guix. * The actual code in this patch does not directly invoke the ZFS kernel mod= ule. * The actual code in this patch does link the ZFS kernel module to the ke= rnel of the *local* system, but does not make this linked version available= to others; it is only available locally on the system of the user that inv= okes this actual code. Again, this is merely a translation (to machine-readable text instructi= ons) of human-readable text instructions on how to link the ZFS kernel modu= le to the Linux kernel, text available publicly on https://github.com/openz= fs/zfs. * The actual code in this patch invokes the ZFS tools as separate program= s, thus does not link with them. Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 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: Sat, 04 Sep 2021 19:00: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: Maxime Devos Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163078195218416 (code B ref 45692); Sat, 04 Sep 2021 19:00:02 +0000 Received: (at 45692) by debbugs.gnu.org; 4 Sep 2021 18:59:12 +0000 Received: from localhost ([127.0.0.1]:48594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMash-0004my-NP for submit@debbugs.gnu.org; Sat, 04 Sep 2021 14:59:12 -0400 Received: from mail-4319.protonmail.ch ([185.70.43.19]:37299) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMase-0004mi-SL for 45692@debbugs.gnu.org; Sat, 04 Sep 2021 14:59:09 -0400 Date: Sat, 04 Sep 2021 18:58:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1630781941; bh=PiQfI+fQQ0L6ZcQpluowyB0lM+YSbtZo/u9o6KgdLf4=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=ti9RzpJ2j6D6Mdz2Plo8dMDlU304PnYSwSXEyduDQAyHV3yRwOOGfDHJrMIPNBbp/ Q0BwNDC2EsaTcTO48cP3+EJsSiGT16IPwKlYThNIpLafVIKpmpSITzoBXnt1ZbuvbV Z9v9d8Ke8UPDRy+dpVmMVd+UGITRVgN+8QgnXlAY= From: raid5atemyhomework Message-ID: In-Reply-To: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@telenet.be> References: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@telenet.be> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello again Maxime, > > +OpenZFS currently only supports Linux-Libre and is not available on th= e > > +Hurd. > > + > > +OpenZFS is free software; unfortunately its license is incompatible wi= th > > +the GNU General Public License (GPL), the license of the Linux kernel, > > +which means they cannot be distributed together. However, as a user, > > +you can choose to build ZFS and use it together with Linux; you can > > +even rely on Guix to automate this task. See > > +@uref{https://www.fsf.org/licensing/zfs-and-linux, this analysis by > > +the Free Software Foundation} for more information. > > That analysis says explicitely that the CDDL is incompatible with the GPL= , > and that they cannot be legally linked together. E.g., see the second quo= ted > paragraph: > > =E2=80=98A copyleft license, including any version of the GNU GPL or GNU = AGPL, requires > augmented versions to be free under the same license -- the same requirem= ent it > applies to modification of the code.1 I wrote a copyleft license for GNU = programs > to ensure that all users of all versions of them would get the freedoms I= intended > to give them. > > It is not enough to require that the combined program be free software so= mehow. It > must be released, as a whole, under the original copyleft license, to ens= ure that: > (1) subsequent users get the exact same freedoms and (2) subsequent inter= mediaries > do not get more opportunity than first-stage intermediaries to make the p= rogram nonfree.=E2=80=99 I think the key word you miss here is "released", i.e. "It must be released= , as a whole, under the original copyleft license." Looking at the GPLv2, the word "release" is never used, however I believe t= he "release" word in the FSF analysis would be considered as a synonym of "= distribute" in this context. The GPLv2 mentions "distribute" many times, but provides no definition of t= he word. My understanding is that "distribute" used in GPL means "to provide or make= available to at least one person that asks for a copy from you, via some m= edium". The GPLv2 imposes many restrictions on the ability to "distribute", so it s= eems reasonable to consider it an important point. Now, as I have pointed out, the existing package definition in `gnu/package= s/file-systems.scm` specifically disables making a binary copy ("substitute= " in Guix parlance) available. In addition, my understanding is that when compiling from source, the `sour= ce` field is what is used, and the `source` field in the `gnu/packages/file= -systems.scm` refers to github.com, not any Guix server. There is no text in GPLv2 which restricts compilation. However, it can be argued that compilation is a form of translation from so= urce code to machine-executable binary, and the text does mention "translat= ion is included without limitation in the term 'modification'". GPLv2 restricts modification with three terms: a. You should have prominent notices on modified files. b. Extra restriction on copies you ***distribute*** or ***publish***. c. Extra restriction if the program is interactive and prints copyright no= tices normally. (a) does not apply since the linking process used (a form of dynamic linkin= g) does not actually modify any files; presumably only in-memory tables or = some such are modified. (b) does not apply if "distribute" is not what is being done by Guix here. (c) does not apply since the Linux kernel is not interactive (and even so, = does not print copyright notices, not even in debug logs). On the CDDL side, neither "compile" nor "translate" is ever used, but for c= ompleteness let us consider compile =3D=3D translate =3D=3D modify. Modifications are specifically allowed under conditions in section 3. However, again, section 3 is titled "distribution obligations", meaning the= y only apply on *distribution*. So I think the issue here really is: Does Guix "distribute" the ZFS linked = with Linux? My understanding is that the mere existence of code to perform that linking= does not in fact *distribute* the code (linking is not the same as distrib= uting); I believe the key point of "distribute" is that a third party gets = a copy. And at least, the code I added in this patch does not provide any = copy of the compiled code to anyone else; it just stores it on the local ma= chine's disk, in a cpio archive that is used in the system's bootup. The c= opy, in the execution of the code I added, is never provided to anyone else= , so I think my patch is unproblematic Quick question: does `guix publish` respect `#:substitutable? #f`? If `gui= x publish` respects `#:substitutable? #f` then it seems to me that even the= point "Guix should make at least an attempt to warn users of possibly lega= l gray areas when distributing" does not apply, too: Guix by itself would n= ot (should not, really; that should be the point of `#:substituable? #f`) p= ublish the compiled code anyway, users who specifically want to publish ZFS= and Linux linked together would need to modify the `guix publish` code, an= d such a user would be running a fork of Guix, not Guix itself, thus should= be made aware of this. Indeed, if `guix publish` does *not* respect `#:substitutable? #f`, I think= it would be more effective to protect users against potential legal gray a= reas for `guix publish` to respect that flag, and for us to then audit exis= ting non-GPLv2-compatible kernel modules and ensure they are `#:substitutab= le? #f`, then to put up a warning; a warning might be overlooked, but an ou= tright refusal to publish cannot. Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 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: Sat, 04 Sep 2021 21:20: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: raid5atemyhomework , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163079036116189 (code B ref 45692); Sat, 04 Sep 2021 21:20:01 +0000 Received: (at 45692) by debbugs.gnu.org; 4 Sep 2021 21:19:21 +0000 Received: from localhost ([127.0.0.1]:48804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMd4F-0004Cw-6K for submit@debbugs.gnu.org; Sat, 04 Sep 2021 17:19:21 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:46232 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mMd4C-0004Ch-B0 for 45692@debbugs.gnu.org; Sat, 04 Sep 2021 17:19:14 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1630790343; bh=uOq2ubofzi8diZUbFXFlWTQ5F6sQlUX2EYspmM+QmbA=; h=From:To:Subject:In-Reply-To:References:Date; b=Q+XwyVGkOnXmxAZkC4tDVzHIWm0S9Kg04QMpt5U9C6W2kA3rU4LunybU346aRjSR8 d2AsmriWIqY2AbHOeiPbl0un8YPT+uYdeB19uYwqO+E9JPQGSeGnq6sz6689XO6NWC G6wIHuRTgQQM8XwBiO6AbfgiK3MNniz35KnNgIZE= In-Reply-To: References: Date: Sat, 04 Sep 2021 23:19:01 +0200 Message-ID: <87k0jw3upm.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Sun, Jul 25 2021, raid5atemyhomework via Guix-patches via wrote: > Hello nonexistent reviewer, > > I updated this patch to latest `origin/master` because the previous > version has bitrotted and will not `git am` cleanly anymore. > > There are no changes relative t [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Sun, Jul 25 2021, raid5atemyhomework via Guix-patches via wrote: > Hello nonexistent reviewer, > > I updated this patch to latest `origin/master` because the previous > version has bitrotted and will not `git am` cleanly anymore. > > There are no changes relative t [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sun, Jul 25 2021, raid5atemyhomework via Guix-patches via wrote: > Hello nonexistent reviewer, > > I updated this patch to latest `origin/master` because the previous > version has bitrotted and will not `git am` cleanly anymore. > > There are no changes relative to v3, just rebased it so that the patch ap= plies cleanly. > > Testing has been very minimal: I created a VM with the added service, > then ran it in a VM session that included additional devices (qcow2 > files) from a previous VM run that formatted those as devices of a ZFS > pool, and confirmed that the new VM could read it and manage that > pool. > > > Is there any chance this will get reviewed or should I just not bother > and move on with my life and forget about Guix? > > > At this point as well, I would like to point out what I think is a > failing of how the Guix distribution is managed. > > Guix does not assign any particular committers to any particular tasks or= areas. > The intent is that any committer can review and commit any particular pat= ch. > > However, this fails as the Guix project has grown. > > No single committer wants to review ***all*** the available patches, > and this is understandable, as the Guix project has grown > significantly and includes a wide variety of people with diverging > interests and as an open-source project you cannot really require that > particular people look at particular things. Unfortunately, I do not > know *who* committers are, and more importantly, *which* committer > might be interested in this ZFS service type. Because "any committer > can review and commit any patch!!" there is no particular list or > table I can refer to, to figure out who might be useful to ping for > this patchset. > > At the same time, because no committer is interested in *all* patches > I cannot just ping some particular person and expect to somehow get on > some list somewhere that tells me "you will be the 48486th patch that > will be reviewed by who is interested in all patches". > > > It is very discouraging to work on this code for a few weeks, release > it, not get any reviews, and end up in a situation where I have to > make annoying small changes just to keep the patch from bitrotting. > > I understand that there are few possible reviewers, but if potential > new contributors get discouraged from contributing because they do not > see their code actually getting in, then you really cannot expect the > number of reviewers to increase, either. > > I think it would be nice if I could at least be told some number of > people who *might* be interested in this patch, or just throw the > towel and not bother. You might want to bring up the topic of subsystem maintainers on the guix-devel mailing list to get some more attention. I am just some random ZFS user, so maybe take my comments with a pinch of salt. I haven=E2=80=99t followed the thread that closely, so apologies if some of= my questions have already been answered. > > Thanks > raid5atemyhomework > > > From 5351aa7c1c14d4fea032adad895c436e02d1f261 Mon Sep 17 00:00:00 2001 > From: raid5atemyhomework > Date: Mon, 22 Mar 2021 16:26:28 +0800 > Subject: [PATCH] gnu: Add ZFS service type. > > * gnu/services/file-systems.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > * gnu/services/base.scm: Export dependency->shepherd-service-name. > * doc/guix.texi (ZFS File System): New subsection. > --- > doc/guix.texi | 351 ++++++++++++++++++++++++++++++++++ > gnu/local.mk | 2 + > gnu/services/base.scm | 4 +- > gnu/services/file-systems.scm | 295 ++++++++++++++++++++++++++++ > 4 files changed, 651 insertions(+), 1 deletion(-) > create mode 100644 gnu/services/file-systems.scm > > diff --git a/doc/guix.texi b/doc/guix.texi > index b3c16e6507..e21c47d7ca 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -94,6 +94,7 @@ Copyright @copyright{} 2021 Xinglu Chen@* > Copyright @copyright{} 2021 Raghav Gururajan@* > Copyright @copyright{} 2021 Domagoj Stolfa@* > Copyright @copyright{} 2021 Hui Lu@* > +Copyright @copyright{} 2021 raid5atemyhomework@* > > Permission is granted to copy, distribute and/or modify this document > under the terms of the GNU Free Documentation License, Version 1.3 or > @@ -14265,6 +14266,356 @@ a file system declaration such as: > compress-force=3Dzstd,space_cache=3Dv2")) > @end lisp > > + > +@node ZFS File System > +@subsection ZFS File System > + > +Support for ZFS file systems is provided on Guix by the OpenZFS project. > +OpenZFS currently only supports Linux-Libre and is not available on the > +Hurd. > + > +OpenZFS is free software; unfortunately its license is incompatible with > +the GNU General Public License (GPL), the license of the Linux kernel, > +which means they cannot be distributed together. However, as a user, > +you can choose to build ZFS and use it together with Linux; you can > +even rely on Guix to automate this task. See > +@uref{https://www.fsf.org/licensing/zfs-and-linux, this analysis by > +the Free Software Foundation} for more information. > + > +As a large and complex kernel module, OpenZFS has to be compiled for a > +specific version of Linux-Libre. At times, the latest OpenZFS package > +available in Guix is not compatible with the latest Linux-Libre version. > +Thus, directly installing the @code{zfs} package can fail. > + > +Instead, you are recommended to select a specific older long-term-support > +Linux-Libre kernel. Do not use @code{linux-libre-lts}, as even the > +latest long-term-support kernel may be too new for @code{zfs}. Instead, > +explicitly select a specific older version, such as @code{linux-libre-5.= 10}, > +and upgrade it manually later as new long-term-support kernels become > +available that you have confirmed is compatible with the latest available > +OpenZFS version on Guix. > + > +For example, you can modify your system configuration file to a specific > +Linux-Libre version and add the @code{zfs-service-type} service. > + > +@lisp > +(use-modules (gnu)) > +(use-package-modules > + #;@dots{} > + linux) > +(use-service-modules > + #;@dots{} > + file-systems) > + > +(define my-kernel linux-libre-5.10) > + > +(operating-system > + (kernel my-kernel) > + #;@dots{} > + (services > + (cons* (service zfs-service-type > + (zfs-configuration > + (kernel my-kernel))) > + #;@dots{} > + %desktop-services)) > + #;@dots{}) > +@end lisp > + > +@defvr {Scheme Variable} zfs-service-type > +This is the type for a service that adds ZFS support to your operating > +system. The service is configured using a @code{zfs-configuration} > +record. > + > +Here is an example use: > + > +@lisp > +(service zfs-service-type > + (zfs-configuration > + (kernel linux-libre-5.4))) > +@end lisp > +@end defvr > + > +@deftp {Data Type} zfs-configuration > +This data type represents the configuration of the ZFS support in Guix > +System. Its fields are: > + > +@table @asis > +@item @code{kernel} > +The package of the Linux-Libre kernel to compile OpenZFS for. This field > +is always required. It @emph{must} be the same kernel you use in your > +@code{operating-system} form. > + > +@item @code{base-zfs} (default: @code{zfs}) > +The OpenZFS package that will be compiled for the given Linux-Libre kern= el. > + > +@item @code{base-zfs-auto-snapshot} (default: @code{zfs-auto-snapshot}) > +The @code{zfs-auto-snapshot} package to use. It will be modified to > +specifically use the OpenZFS compiled for your kernel. > + > +@item @code{dependencies} (default: @code{'()}) > +A list of @code{} or @code{} records that mu= st > +be mounted or opened before OpenZFS scans for pools to import. For exam= ple, > +if you have set up LUKS containers as leaf VDEVs in a pool, you have to > +include their corresponding @code{} records so that Open= ZFS > +can import the pool correctly at bootup. > + > +@item @code{auto-mount?} (default: @code{#t}) > +Whether to mount datasets with the ZFS @code{mountpoint} property automa= tically > +at startup. This is the behavior that ZFS users usually expect. You mi= ght > +set this to @code{#f} for an operating system intended as a ``rescue'' s= ystem > +that is intended to help debug problems with the disks rather than actua= lly > +work in production. > + > +@item @code{auto-scrub} (default: @code{'weekly}) > +Specifies how often to scrub all pools. Can be the symbols @code{'weekl= y} or > +@code{'monthly}, or a schedule specification understood by > +@xref{mcron, mcron job specifications,, mcron, GNU@tie{}mcron}, such as > +@code{"0 3 * * 6"} for ``every 3AM on Saturday''. > +It can also be @code{#f} to disable auto-scrubbing (@strong{not recommen= ded}). > + > +The general guideline is to scrub weekly when using consumer-quality dri= ves, and > +to scrub monthly when using enterprise-quality drives. > + > +@code{'weekly} scrubs are done on Sunday midnight, while @code{monthly} = scrubs > +are done on midnight on the first day of each month. > + > +@item @code{auto-snapshot?} (default: @code{#t}) > +Specifies whether to auto-snapshot by default. If @code{#t}, then snaps= hots > +are automatically created except for ZFS datasets with the > +@code{com.sun:auto-snapshot} ZFS vendor property set to @code{false}. > + > +If @code{#f}, snapshots will not be automatically created, unless the ZFS > +dataset has the @code{com.sun:auto-snapshot} ZFS vendor property set to > +@code{true}. > + > +@item @code{auto-snapshot-keep} (default: @code{'()}) > +Specifies an association list of symbol-number pairs, indicating the num= ber > +of automatically-created snapshots to retain for each frequency type. > + > +If not specified via this field, by default there are 4 @code{frequent},= 24 > +@code{hourly}, 31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly} s= napshots. > + > +For example: > + > +@lisp > +(zfs-configuration > + (kernel my-kernel) > + (auto-snapshot-keep > + '((frequent . 8) > + (hourly . 12)))) > +@end lisp > + > +The above will keep 8 @code{frequent} snapshots and 12 @code{hourly} sna= pshots. > +@code{daily}, @code{weekly}, and @code{monthly} snapshots will keep their > +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? > + > +@subsubsection ZFS Auto-Snapshot > + > +The ZFS service on Guix System supports auto-snapshots as implemented in= the > +Solaris operating system. > + > +@code{frequent} (every 15 minutes), @code{hourly}, @code{daily}, @code{w= eekly}, > +and @code{monthly} snapshots are created automatically for ZFS datasets = that > +have auto-snapshot enabled. They will be named, for example, > +@code{zfs-auto-snap_frequent-2021-03-22-1415}. You can continue to use > +manually-created snapshots as long as they do not conflict with the nami= ng > +convention used by auto-snapshot. You can also safely manually destroy > +automatically-created snapshots, for example to free up space. > + > +The @code{com.sun:auto-snapshot} ZFS property controls auto-snapshot on a > +per-dataset level. Sub-datasets will inherit this property from their p= arent > +dataset, but can have their own property. > + > +You @emph{must} set this property to @code{true} or @code{false} exactly, > +otherwise it will be treated as if the property is unset. > + > +For example: > + > +@example > +# zfs list -o name > +NAME > +tank > +tank/important-data > +tank/tmp > +# zfs set com.sun:auto-snapshot=3Dtrue tank > +# zfs set com.sun:auto-snapshot=3Dfalse tank/tmp > +@end example > + > +The above will set @code{tank} and @code{tank/important-data} to be > +auto-snapshot, while @code{tank/tmp} will not be auto-snapshot. > + > +If the @code{com.sun:auto-snapshot} property is not set for a dataset > +(the default when pools and datasets are created), then whether > +auto-snapshot is done or not will depend on the @code{auto-snapshot?} > +field of the @code{zfs-configuration} record. > + > +There are also @code{com.sun:auto-snapshot:frequent}, > +@code{com.sun:auto-snapshot:hourly}, @code{com.sun:auto-snapshot:daily}, > +@code{com.sun:auto-snapshot:weekly}, and @code{com.sun:auto-snapshot:mon= thly} > +properties that give finer-grained control of whether to auto-snapshot a > +dataset at a particular schedule. > + > +The number of snapshots kept for all datasets can be overridden via the > +@code{auto-snapshot-keep} field of the @code{zfs-configuration} record. > +There is currently no support to have different numbers of snapshots to > +keep for different datasets. > + > +@subsubsection ZVOLs > + > +ZFS supports ZVOLs, block devices that ZFS exposes to the operating > +system in the @code{/dev/zvol/} directory. The ZVOL will have the same > +resilience and self-healing properties as other datasets on your ZFS poo= l. > +ZVOLs can also be snapshotted (and will be included in auto-snapshotting > +if enabled), which snapshots the state of the block device, effectively > +snapshotting the hosted file system. > + > +You can put any file system inside the ZVOL. However, in order to mount= this > +file system at system start, you need to add @code{%zfs-zvol-dependency}= as a > +dependency of each file system inside a ZVOL. > + > +@defvr {Scheme Variable} %zfs-zvol-dependency > +An artificial @code{} which tells the file system mounting > +service to wait for ZFS to provide ZVOLs before mounting the > +@code{} dependent on it. > +@end defvr > + > +For example, suppose you create a ZVOL and put an ext4 filesystem > +inside it: > + > +@example > +# zfs create -V 100G tank/ext4-on-zfs > +# mkfs.ext4 /dev/zvol/tank/ext4-on-zfs > +# mkdir /ext4-on-zfs > +# mount /dev/zvol/tank/ext4-on-zfs /ext4-on-zfs > +@end example > + > +You can then set this up to be mounted at boot by adding this to the > +@code{file-systems} field of your @code{operating-system} record: > + > +@lisp > +(file-system > + (device "/dev/zvol/tank/ext4-on-zfs") > + (mount-point "/ext4-on-zfs") > + (type "ext4") > + (dependencies (list %zfs-zvol-dependency))) > +@end lisp > + > +You @emph{must not} add @code{%zfs-zvol-dependency} to your > +@code{operating-system}'s @code{mapped-devices} field, and you @emph{must > +not} add it (or any @code{}s dependent on it) to the > +@code{dependencies} field of @code{zfs-configuration}. Finally, you > +@emph{must not} use @code{%zfs-zvol-dependency} unless you actually > +instantiate @code{zfs-service-type} on your system. I am not familiar with ZVOLs, so I can=E2=80=99t really comment on that. > +@subsubsection Unsupported Features > + > +Some common features and uses of ZFS are currently not supported, or not > +fully supported, on Guix. > + > +@enumerate > +@item > +Shepherd-managed daemons that are configured to read from or write to ZFS > +mountpoints need to include @code{user-processes} in their @code{require= ment} > +field. This is the earliest that ZFS file systems are assured of being > +mounted. > + > +Generally, most daemons will, directly or indirectly, require > +@code{networking}, or @code{user-processes}, or both. Most implementati= ons > +of @code{networking} will also require @code{user-processes} so daemons = that > +require only @code{networking} will also generally start up after > +@code{user-processes}. A notable exception, however, is > +@code{static-networking-service-type}. You will need to explicitly add > +@code{user-processes} as a @code{requirement} of your @code{static-netwo= rking} > +record. > + > +@item > +@code{mountpoint=3Dlegacy} ZFS file systems. The handlers for the Guix = mounting > +system have not yet been modified to support ZFS, and will expect @code{= /dev} > +paths in the @code{}'s @code{device} field, but ZFS file sy= stems > +are referred to via non-path @code{pool/file/system} names. Such file s= ystems > +also need to be mounted @emph{after} OpenZFS has scanned for pools. > + > +You can still manually mount these file systems after system boot; what = is > +only unsupported is mounting them automatically at system boot by specif= ying > +them in @code{} records of your @code{operating-system}. > + > +@item > +@code{/home} on ZFS. Guix will create home directories for users, but t= his > +process currently cannot be scheduled after ZFS file systems are mounted. > +Thus, the ZFS file system might be mounted @emph{after} Guix has created > +home directories at boot, at which point OpenZFS will refuse to mount si= nce > +the mountpoint is not empty. However, you @emph{can} create an ext4, xf= s, > +btrfs, or other supported file system inside a ZVOL, have that depend on > +@code{%zfs-zvol-dependency}, and set it to mount on the @code{/home} > +directory; they will be scheduled to mount before the @code{user-homes} > +process. > + > +Similarly, other locations like @code{/var}, @code{/gnu/store} and so > +on cannot be reliably put in a ZFS file system, though they may be > +possible to create as other file systems inside ZVOL containers. > + > +@item > +@code{/} and @code{/boot} on ZFS. These require Guix to expose more of > +the @code{initrd} very early boot process to services. It also requires > +Guix to have the ability to explicitly load modules while still in > +@code{initrd} (currently kernel modules loaded by > +@code{kernel-module-loader-service-type} are loaded after @code{/} is > +mounted). Further, since one of ZFS's main advantages is that it can > +continue working despite the loss of one or more devices, it makes sense > +to also support installing the bootloader on all devices of the pool that > +contains the @code{/} and @code{/boot}; after all, if ZFS can survive the > +loss of one device, the bootloader should also be able to survive the lo= ss > +of one device. Ah, OK, this answered my previous question. > +@item > +ZVOL swap devices. Mapped swap devices need to be listed in > +@code{mapped-devices} to ensure they are opened before the system attemp= ts > +to use them, but you cannot currently add @code{%zfs-zvol-dependency} to > +@code{mapped-devices}. > + > +This will also require significant amounts of testing, as various kernel > +build options and patches may affect how swapping works, which are possi= bly > +different on Guix System compared to other distributions that this featu= re is > +known to work on. > + > +@item > +ZFS Event Daemon. Support for this has not been written yet, patches are > +welcome. The main issue is how to design this in a Guix style while > +supporting legacy shell-script styles as well. In particular, OpenZFS i= tself > +comes with a number of shell scripts intended for ZFS Event Daemon, and = we > +need to figure out how the user can choose to use or not use the provided > +scripts (and configure any settings they have) or override with their own > +custom code (which could be shell scripts they have written and trusted = from > +previous ZFS installations). > + > +As-is, you can create your own service that activates the ZFS Event Daem= on > +by creating the @file{/etc/zfs/zed} directory and filling it appropriate= ly, > +then launching @code{zed}. > + > +@item > +@file{/etc/zfs/zpool.cache}. Currently the ZFS support on Guix always f= orces > +scanning of all devices at bootup to look for ZFS pools. For systems wi= th > +dozens or hundreds of storage devices, this can lead to slow bootup. On= e issue > +is that tools should really not write to @code{/etc} which is supposed t= o be for > +configuration; possibly it could be moved to @code{/var} instead. Anoth= er issue > +is that if Guix ever supports @code{/} on ZFS, we would need to somehow = keep the > +@code{zpool.cache} file inside the @code{initrd} up-to-date with what is= in the > +@code{/} mount point. > + > +@item > +@code{zfs share}. This will require some (unknown amount of) work to in= tegrate > +into the Samba and NFS services of Guix. You @emph{can} manually set up= Samba > +and NFS to share any mounted ZFS datasets by setting up their configurat= ions > +properly; it just can't be done for you by @code{zfs share} and the > +@code{sharesmb} and @code{sharenfs} properties. > +@end enumerate > + > +Hopefully, support for the above only requires code to be written, o use= rs > +are encouraged to hack on Guix to implement the above features. > + > @node Mapped Devices > @section Mapped Devices > > diff --git a/gnu/local.mk b/gnu/local.mk > index b944c671af..a2ff871277 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -43,6 +43,7 @@ > # Copyright =C2=A9 2021 Philip McGrath > # Copyright =C2=A9 2021 Arun Isaac > # Copyright =C2=A9 2021 Sharlatan Hellseher > +# Copyright =C2=A9 2021 raid5atemyhomework > # > # This file is part of GNU Guix. > # > @@ -618,6 +619,7 @@ GNU_SYSTEM_MODULES =3D \ > %D%/services/docker.scm \ > %D%/services/authentication.scm \ > %D%/services/file-sharing.scm \ > + %D%/services/file-systems.scm \ > %D%/services/games.scm \ > %D%/services/ganeti.scm \ > %D%/services/getmail.scm \ > diff --git a/gnu/services/base.scm b/gnu/services/base.scm > index ab3e441a7b..bcca24f93a 100644 > --- a/gnu/services/base.scm > +++ b/gnu/services/base.scm > @@ -185,7 +185,9 @@ > > references-file > > - %base-services)) > + %base-services > + > + dependency->shepherd-service-name)) > > ;;; Commentary: > ;;; > diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.scm > new file mode 100644 > index 0000000000..0b1aae38ac > --- /dev/null > +++ b/gnu/services/file-systems.scm > @@ -0,0 +1,295 @@ > +;;; GNU Guix --- Functional package management for GNU > +;;; Copyright =C2=A9 2021 raid5atemyhomework > +;;; > +;;; This file is part of GNU Guix. > +;;; > +;;; GNU Guix is free software; you can redistribute it and/or modify it > +;;; under the terms of the GNU General Public License as published by > +;;; the Free Software Foundation; either version 3 of the License, or (at > +;;; your option) any later version. > +;;; > +;;; GNU Guix is distributed in the hope that it will be useful, but > +;;; WITHOUT ANY WARRANTY; without even the implied warranty of > +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +;;; GNU General Public License for more details. > +;;; > +;;; You should have received a copy of the GNU General Public License > +;;; along with GNU Guix. If not, see . > + > +(define-module (gnu services file-systems) > + #:use-module (gnu packages file-systems) > + #:use-module (gnu services) > + #:use-module (gnu services base) > + #:use-module (gnu services linux) > + #:use-module (gnu services mcron) > + #:use-module (gnu services shepherd) > + #:use-module (gnu system mapped-devices) > + #:use-module (guix gexp) > + #:use-module (guix packages) > + #:use-module (guix records) > + #:export (zfs-service-type > + > + zfs-configuration > + zfs-configuration? > + zfs-configuration-kernel > + zfs-configuration-base-zfs > + zfs-configuration-base-zfs-auto-snapshot > + zfs-configuration-dependencies > + zfs-configuration-auto-mount? > + zfs-configuration-auto-scrub > + zfs-configuration-auto-snapshot? > + zfs-configuration-auto-snapshot-keep > + > + %zfs-zvol-dependency)) > + > +(define-record-type* > + zfs-configuration > + make-zfs-configuration > + zfs-configuration? > + > + ; linux-libre kernel you want to compile the base-zfs module for. > + (kernel zfs-configuration-kernel) > + > + ; the OpenZFS package that will be modified to compile for the > + ; given kernel. > + (base-zfs zfs-configuration-base-zfs > + (default zfs)) 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 a= nd =E2=80=98base-zfs-auto-snapshot=E2=80=99. > + ; the zfs-auto-snapshot package that will be modified to compile > + ; for the given kernel. > + (base-zfs-auto-snapshot zfs-configuration-base-zfs-auto-snapshot > + (default zfs-auto-snapshot)) > + > + ; list of or objects that must be > + ; opened/mounted before we import any ZFS pools. > + (dependencies zfs-configuration-dependencies > + (default '())) > + > + ; #t if mountable datasets are to be mounted automatically. > + ; #f if not mounting. > + ; #t is the expected behavior on other operating systems, the > + ; #f is only supported for "rescue" operating systems where > + ; the user wants lower-level control of when to mount. > + (auto-mount? zfs-configuration-auto-mount? > + (default #t)) > + > + ; 'weekly for weekly scrubbing, 'monthly for monthly scrubbing, an > + ; mcron time specification that can be given to `job`, or #f to > + ; disable. > + (auto-scrub zfs-configuration-auto-scrub > + (default 'weekly)) > + > + ; #t if auto-snapshot is default (and `com.sun:auto-snapshot=3Dfalse` > + ; disables auto-snapshot per dataset), #f if no auto-snapshotting > + ; is default (and `com.sun:auto-snapshot=3Dtrue` enables auto-snapshot > + ; per dataset). > + (auto-snapshot? zfs-configuration-auto-snapshot? > + (default #t)) > + > + ; association list of symbol-number pairs to indicate the number > + ; of automatic snapshots to keep for each of 'frequent, 'hourly, > + ; 'daily, 'weekly, and 'monthly. > + ; e.g. '((frequent . 8) (hourly . 12)) > + (auto-snapshot-keep zfs-configuration-auto-snapshot-keep > + (default '()))) > + > +(define %default-auto-snapshot-keep > + '((frequent . 4) > + (hourly . 24) > + (daily . 31) > + (weekly . 8) > + (monthly . 12))) > + > +(define %auto-snapshot-mcron-schedule > + '((frequent . "0,15,30,45 * * * *") > + (hourly . "0 * * * *") > + (daily . "0 0 * * *") > + (weekly . "0 0 * * 7") > + (monthly . "0 0 1 * *"))) > + > +;; A synthetic and unusable MAPPED-DEVICE intended for use when > +;; the user has created a mountable filesystem inside a ZFS > +;; zvol and wants it mounted inside the configuration.scm. > +(define %zfs-zvol-dependency > + (mapped-device > + (source '()) > + (targets '("zvol/*")) > + (type #f))) > + > +(define (make-zfs-package conf) > + (let ((kernel (zfs-configuration-kernel conf)) > + (base-zfs (zfs-configuration-base-zfs conf))) > + (package > + (inherit base-zfs) > + (arguments (cons* #:linux kernel > + (package-arguments base-zfs)))))) > + > +(define (make-zfs-auto-snapshot-package conf) > + (let ((zfs (make-zfs-package conf)) > + (base-zfs-auto-snapshot (zfs-configuration-base-zfs-auto-snapsho= t conf))) > + (package > + (inherit base-zfs-auto-snapshot) > + (inputs `(("zfs" ,zfs)))))) > + > +(define (zfs-loadable-modules conf) > + (list (list (make-zfs-package conf) "module"))) > + > +(define (zfs-shepherd-services conf) > + (let* ((zfs-package (make-zfs-package conf)) > + (zpool (file-append zfs-package "/sbin/zpool")) > + (zfs (file-append zfs-package "/sbin/zfs")) > + (zvol_wait (file-append zfs-package "/bin/zvol_wait")) > + (scheme-modules `((srfi srfi-1) > + (srfi srfi-34) > + (srfi srfi-35) > + (rnrs io ports) > + ,@%default-modules))) > + (define zfs-scan > + (shepherd-service > + (provision '(zfs-scan)) > + (requirement `(root-file-system > + kernel-module-loader > + udev > + ,@(map dependency->shepherd-service-name > + (zfs-configuration-dependencies conf)))) > + (documentation "Scans for and imports ZFS pools.") > + (modules scheme-modules) > + (start #~(lambda _ > + (guard (c ((message-condition? c) > + (format (current-error-port) > + "zfs: error importing pools: ~s~%" > + (condition-message c)) > + #f)) > + ; TODO: optionally use a cachefile. > + (invoke #$zpool "import" "-a" "-N")))) > + ;; Why not one-shot? Because we don't really want to rescan > + ;; this each time a requiring process is restarted, as scanning > + ;; can take a long time and a lot of I/O. > + (stop #~(const #f)))) > + > + (define device-mapping-zvol/* > + (shepherd-service > + (provision '(device-mapping-zvol/*)) > + (requirement '(zfs-scan)) > + (documentation "Waits for all ZFS ZVOLs to be opened.") > + (modules scheme-modules) > + (start #~(lambda _ > + (guard (c ((message-condition? c) > + (format (current-error-port) > + "zfs: error opening zvols: ~s~%" > + (condition-message c)) > + #f)) > + (invoke #$zvol_wait)))) > + (stop #~(const #f)))) > + > + (define zfs-auto-mount > + (shepherd-service > + (provision '(zfs-auto-mount)) > + (requirement '(zfs-scan)) > + (documentation "Mounts all non-legacy mounted ZFS filesystems.") > + (modules scheme-modules) > + (start #~(lambda _ > + (guard (c ((message-condition? c) > + (format (current-error-port) > + "zfs: error mounting file systems:= ~s~%" > + (condition-message c)) > + #f)) > + ;; 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/console= ? Seeing this comment, I assume that encrypted pools are supported, right? > + (with-output-to-port (current-error-port) > + (lambda () > + (invoke #$zfs "mount" "-a" "-l")))))) > + (stop #~(lambda _ > + ;; Make sure that Shepherd does not have a CWD that > + ;; is a mounted ZFS filesystem, which would prevent > + ;; unmounting. > + (chdir "/") > + (invoke #$zfs "unmount" "-a" "-f"))))) > + > + `(,zfs-scan > + ,device-mapping-zvol/* > + ,@(if (zfs-configuration-auto-mount? conf) > + `(,zfs-auto-mount) > + '())))) > + > +(define (zfs-user-processes conf) > + (if (zfs-configuration-auto-mount? conf) > + '(zfs-auto-mount) > + '(zfs-scan))) > + > +(define (zfs-mcron-auto-snapshot-jobs conf) > + (let* ((user-auto-snapshot-keep (zfs-configuration-auto-snapshot-= keep conf)) > + ;; assoc-ref has earlier entries overriding later ones. > + (auto-snapshot-keep (append user-auto-snapshot-keep > + %default-auto-snapshot-ke= ep)) > + (auto-snapshot? (zfs-configuration-auto-snapshot?= conf)) > + (zfs-auto-snapshot-package (make-zfs-auto-snapshot-package c= onf)) > + (zfs-auto-snapshot (file-append zfs-auto-snapshot-pa= ckage > + "/sbin/zfs-auto-snap= shot"))) > + (map > + (lambda (label) > + (let ((keep (assoc-ref auto-snapshot-keep label)) > + (sched (assoc-ref %auto-snapshot-mcron-schedule label))) > + #~(job '#$sched > + (string-append #$zfs-auto-snapshot > + " --quiet --syslog " > + " --label=3D" #$(symbol->string label) > + " --keep=3D" #$(number->string keep) > + " //")))) > + '(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. > +(define (zfs-mcron-auto-scrub-jobs conf) > + (let* ((zfs-package (make-zfs-package conf)) > + (zpool (file-append zfs-package "/sbin/zpool")) > + (auto-scrub (zfs-configuration-auto-scrub conf)) > + (sched (cond > + ((eq? auto-scrub 'weekly) "0 0 * * 7") > + ((eq? auto-scrub 'monthly) "0 0 1 * *") > + (else auto-scrub)))) > + (list > + #~(job '#$sched > + ;; Suppress errors: if there are no ZFS pools, the > + ;; scrub will not be given any arguments, which makes > + ;; it error out. > + (string-append "(" #$zpool " scrub `" #$zpool " list -o nam= e -H` " > + "> /dev/null 2>&1) " > + "|| exit 0"))))) > + > +(define (zfs-mcron-jobs conf) > + (append (zfs-mcron-auto-snapshot-jobs conf) > + (if (zfs-configuration-auto-scrub conf) > + (zfs-mcron-auto-scrub-jobs conf) > + '()))) > + > +(define zfs-service-type > + (service-type > + (name 'zfs) > + (extensions > + (list ;; Install OpenZFS kernel module into kernel profile. > + (service-extension linux-loadable-module-service-type > + zfs-loadable-modules) > + ;; And load it. > + (service-extension kernel-module-loader-service-type > + (const '("zfs"))) > + ;; Make sure ZFS pools and datasets are mounted at > + ;; boot. > + (service-extension shepherd-root-service-type > + zfs-shepherd-services) > + ;; Make sure user-processes don't start until > + ;; after ZFS does. > + (service-extension user-processes-service-type > + zfs-user-processes) > + ;; Install automated scrubbing and snapshotting. > + (service-extension mcron-service-type > + zfs-mcron-jobs) > + > + ;; Install ZFS management commands in the system > + ;; profile. > + (service-extension profile-service-type > + (compose list make-zfs-package)) > + ;; Install ZFS udev rules. > + (service-extension udev-service-type > + (compose list make-zfs-package)))) > + (description "Installs ZFS, an advanced filesystem and volume manage= r."))) > -- > 2.31.1 I haven=E2=80=99t tested anything, but the rest looks good! :-) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmEz4sUVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x57YcQAKLhO/BZbp3/pfkF/9xrol6wZO3b nUY6rw3m1oi5mjEx7wLdSonltbkxoXQnZuAqnlIe1NXLldd7AQ5f4Lx3Uw9myB+l f0FjC1ks5Cp6yWhqgWp04o94mAxTEQ/yHB1jEMIhkM2PTaYyAIcil1dEOjJITD9b Imx0tl93imfo+LAy1mBQvqb9ONimK1ixr6Xvu8IM6Cu85qTHVE18Pt3ugS25wvit Fi+te5NAWMYHQ+2sbPQjGdlVCnTNYNEI7fL4Bse9+Y82WPdCeKPqay01MR4U0WbS P28KNmNqNtefL2dYoImARVckKdOP83NQzEtNaQY8VD32xNAcW/dfAKlcxLuLkfI+ s1QUnYTnY9//AYhCao6b5MKn2iLAWJ68Ij7t2D8iEXLTFzi1l7zyGiKvJKlvmucN mWoKGCfmLOp0xxki4CC0mVkBGDRwA+QrPGqXDljbCWoAaOpEywnqX88cUxPq5+Jw niConf+Bc/GYdmdqWbWp+NUqpXGPax96jsys9lBKoiEV/8DOGnyKsB3XLFtLv2oH wa4SoeeKexF9E7BIDABLts/kTPZG7VcWN4Vl0IVymIHF6aQBxpCk4GbHUH4voVNg /7oP2OZCQn9HOiClWN7awllCVISX7b/nmxijx/81UnsDzDWThtkacjtfyFqZalxX 0d2CLc4s27HWzU6C =Ql/1 -----END PGP SIGNATURE----- --=-=-=-- From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Sep 2021 08:01: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: Mason Loring Bliss Cc: Maxime Devos , guix-maintainers@gnu.org, 45692@debbugs.gnu.org Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16309152327148 (code B ref 45692); Mon, 06 Sep 2021 08:01:01 +0000 Received: (at 45692) by debbugs.gnu.org; 6 Sep 2021 08:00:32 +0000 Received: from localhost ([127.0.0.1]:51605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mN9YO-0001rD-1p for submit@debbugs.gnu.org; Mon, 06 Sep 2021 04:00:32 -0400 Received: from mail-wr1-f49.google.com ([209.85.221.49]:41753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mN9YN-0001qz-8j for 45692@debbugs.gnu.org; Mon, 06 Sep 2021 04:00:31 -0400 Received: by mail-wr1-f49.google.com with SMTP id u9so8433941wrg.8 for <45692@debbugs.gnu.org>; Mon, 06 Sep 2021 01:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=11QvE/qB8tJwDaHionQqe/xTdUG5yVAkP03kqVbMy24=; b=SdQ/JTmzMfx4MphV6NeGWL+XiWuo/T6z9XZ5Q1ywtEYiPJmKYWSvD8AesltUTGBtw5 ZiUtEDJ93Fu4NK0jzdocVJAtzHSMzjEyV3RkcQx9nZI43Eu73X/wW3Vb89c95dIizWLF PH7taS+K+RUYvgl9M9IBk2IHc2wzD57trzj5IYyfYLI4pb5qMm5l68L5lCAvrEUz6GCR FWl2dmNK5CEFL9JQ0onduihM1RPC5E4bGRio7tNSXEVAUUIVxBTuKNQmbmbZpxUMAuiE WnfzDq95xhM63hPQCddZvsOSUxZejZrSa9WvQ4YCVr6Js3b4QMR2SnvsyR/Skk2qKDDE gTeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=11QvE/qB8tJwDaHionQqe/xTdUG5yVAkP03kqVbMy24=; b=Nbb+0laZV6lNWs0XKfDMGvzODuu1gUg0mV7Zo1X1GoI9MtqSSjMV4hBPqYcrzrfZCK 0C1nro+292PCpB2/6pkBXLyJGXRWY0U6jIfxULhn3Il+5uWhEQJflXAcIHtEpGRKnM37 cVOBevXVQUDKLUmmLJCyCek7Y5IVVSABz1Z7dwCDtn6W720Po7NCWCENiz5SWpYTbPix Ksulr/L08BzaJhwxXZEgamwD9g7pQ9BhEwE2U9+rwJ+VLKYvHIy1FEw7NMLGlqMp8pDM mSNoBOptzoPtbAt4gb1/3iCBWA7unFQITjUB2lJkWDRO/iH23OYbcW/f0UbciE3nvv3q vcIA== X-Gm-Message-State: AOAM5339kY73SoYiCV1y4zhIELuyH1woGFlW7RrVuZR3/vDUG6yWPdgk QT+NKotQxUCJQvdLPILll+M= X-Google-Smtp-Source: ABdhPJyE3WnBoRPJCW3KX/lCQFWGNH2V5VzYLO284VNM19ktHgDURLv/pEgP00ACddhL3kLdhlEWgQ== X-Received: by 2002:adf:e68e:: with SMTP id r14mr11863355wrm.395.1630915225181; Mon, 06 Sep 2021 01:00:25 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id s205sm6532676wme.4.2021.09.06.01.00.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 01:00:24 -0700 (PDT) From: zimoun References: <20210902212359.GU6420@blisses.org> Date: Mon, 06 Sep 2021 09:59:16 +0200 In-Reply-To: <20210902212359.GU6420@blisses.org> (Mason Loring Bliss's message of "Thu, 2 Sep 2021 17:24:00 -0400") Message-ID: <86lf4ajfsb.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Mason, On Thu, 02 Sep 2021 at 17:24, Mason Loring Bliss wrote: > Gaslighting in an attempt to sabotage the > adoption of high-quality free software is somewhat poor form and not at all > useful. Using such language (emphasized by the subject), you are not creating a positive environment. Please be respectful when differing viewpoints and experiences. And please assume good faith avoiding to jump in negative opinionated conclusions. Thanks, simon From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Sep 2021 08:31: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: Maxime Devos Cc: raid5atemyhomework , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163091703310668 (code B ref 45692); Mon, 06 Sep 2021 08:31:02 +0000 Received: (at 45692) by debbugs.gnu.org; 6 Sep 2021 08:30:33 +0000 Received: from localhost ([127.0.0.1]:51680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNA1R-0002lu-0J for submit@debbugs.gnu.org; Mon, 06 Sep 2021 04:30:33 -0400 Received: from mail-wm1-f54.google.com ([209.85.128.54]:51919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNA1N-0002lc-Pm for 45692@debbugs.gnu.org; Mon, 06 Sep 2021 04:30:30 -0400 Received: by mail-wm1-f54.google.com with SMTP id n39so2248858wms.1 for <45692@debbugs.gnu.org>; Mon, 06 Sep 2021 01:30:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ycCfhRwSuLN7DCwsYgwe5yvJRnQfbGHr6RAXCDUp2uM=; b=hEkdemQk8THToqaOI2m2zLYRRRUFUUSDlsnxZtch43PmXVCRkUhzQZE6QSc/k1Rnlu AAyDPT7PDZvQsVWCw+fhJ7KVYS74Ied6+k91qGgczE8OBxy6fjkAE2e1LUVUrOcJ0lnU EFCDJs4+7u0jrNiAsXAmQKZSKkVMEQ9BFuuDtT0lCbIk0GpNa2OeuK1+4ggBiEpA2we4 LmSnfAqybN8+Hel05VwTYhxDYCFjvwNSBu7SSE21fbXO0sl7ijUlAnVKIxyIMB0IQTSr ogstyHq/zawj5a2O74Eb/f1lTvwgGn9qFdU+s/b4etYn6XztM2YKkWOr5PXInSAHFCH4 l5CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=ycCfhRwSuLN7DCwsYgwe5yvJRnQfbGHr6RAXCDUp2uM=; b=PRHQEEHcTU21tbzDYzOayNqtVj8o5eE6KkkWJxiHr2qPNozuhMCS0NlbmIl9Qay2gS SqkICI38toeCZxs4123fx6CiRwX8P8brGUsyTkYY5o5EbytCM4InktCz/cG5CBdkHnQe SN8RyLG7xY9hoB6/vQSiC2ULiy8fu+mrKELV0+SOsNpvNpILHHeWihp7PohmW6ssUpzv r3jr3DNcX9KZ5Lclid9M0FhgL/xWQ9S0i6T3pnu96wMYLr2Nz78qFME5RFK8VXNc+HbI +734k49KrKMhL/tt8kjqSihzjj+yADXLRDeJCqZzf8ZvBQv+JMRxkdPVkhfGlZF11bwJ ou9Q== X-Gm-Message-State: AOAM5337NAV6uwyY1QBWovzOGBqN3eaypg9EwWDPhmSRZZZzYJ6IfE5r ojM32rt8QhRiUUxZzL+ZAnfqgmX0Ukw= X-Google-Smtp-Source: ABdhPJwLfJ0hI0wRSsmBHmLt6xzSvdW9LRvBY0AgXWHQNc9qilHGZolIx5Rs4iFqN7F46djicpQt3w== X-Received: by 2002:a7b:cc07:: with SMTP id f7mr10283623wmh.145.1630917023914; Mon, 06 Sep 2021 01:30:23 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id q13sm7174684wrv.79.2021.09.06.01.30.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 01:30:23 -0700 (PDT) From: zimoun References: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@telenet.be> Date: Mon, 06 Sep 2021 10:08:04 +0200 In-Reply-To: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@telenet.be> (Maxime Devos's message of "Thu, 02 Sep 2021 22:57:09 +0200") Message-ID: <86bl56jfdn.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Maxime. On Thu, 02 Sep 2021 at 22:57, Maxime Devos wrote: > See also . Reading the Software Freedom Conservancy analysis, from my understanding, the issue is about distributing the resulting *binary* Linux+ZFS. Other said, the distribution of the zfs.ko is an issue, not provide a way to build it locally. Well, it does not appear to be a GPL violation, IIUC the SFC analysis. Thanks for taking the time to carefully review all the aspects. Cheers, simon From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Sep 2021 10:42: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: zimoun Cc: raid5atemyhomework , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163092486810932 (code B ref 45692); Mon, 06 Sep 2021 10:42:02 +0000 Received: (at 45692) by debbugs.gnu.org; 6 Sep 2021 10:41:08 +0000 Received: from localhost ([127.0.0.1]:52070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNC3n-0002qG-M8 for submit@debbugs.gnu.org; Mon, 06 Sep 2021 06:41:07 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:59134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNC3k-0002q5-Gv for 45692@debbugs.gnu.org; Mon, 06 Sep 2021 06:41:07 -0400 Received: from butterfly.local ([213.132.129.254]) by michel.telenet-ops.be with bizsmtp id qah02500T5VU3ct06ah2He; Mon, 06 Sep 2021 12:41:03 +0200 Message-ID: From: Maxime Devos Date: Mon, 06 Sep 2021 12:40:53 +0200 In-Reply-To: <86bl56jfdn.fsf@gmail.com> References: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@telenet.be> <86bl56jfdn.fsf@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-00URjjkmLg5XFM0gsQkX" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1630924863; bh=wKKwJ/tAXr/wc6ILzYdP3Rr5ZqC1iJ0Yt9eqyjY3BKg=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=IIHAjE7J30DfLr2UlDJIK2OOtMhqT7S8pmD3f8vrrA2G91yKTzr9MRccBk3E/VGR1 3eXfHPhSKDej07Uo+PYSG00lAuzHDx0hxmHcH/7LsAu5JBsTy3b9GLGHt/GY0KOo2u f8Sggn+/fmCbzNyciz/S0bdUY3wbIrd9nP2YzCP8pQqIFesrSc+Xdg4kNze2Fr4Vbb y0phaDCnscrjtZ4h4dj0j08LDVU7LuWEkoszviu1Fh1xO+y0i9NehB8Ae1/boG+Rhq 0/HVCywllQHNrBbRTgVmDtYLPrkQASIZsQUjytLAPNF+denyenhoSDjj0e1aktFC/p QGxh0papFybTQ== X-Spam-Score: -0.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-00URjjkmLg5XFM0gsQkX Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable zimoun schreef op ma 06-09-2021 om 10:08 [+0200]: > Hi Maxime. Hi zimoun, >=20 > On Thu, 02 Sep 2021 at 22:57, Maxime Devos wrote= : >=20 > > See also ;. >=20 > Reading the Software Freedom Conservancy analysis, from my > understanding, the issue is about distributing the resulting *binary* > Linux+ZFS. Previously I thought that =E2=80=98Is The Analysis Different With Source-On= ly Distribution?=E2=80=99 somehow did not apply here, though I cannot remember the reasoning well (ma= ybe my reasoning was bogus?). However, SFC did note in that section: =E2=80=98Nevertheless, there may be arguments for contributory and/or indir= ect copyright infringement in many jurisdictions. We present no specific analysis ourselv= es on the efficacy of a contributory infringement claim regarding source-only dis= tributions of ZFS and Linux. However, in our GPL litigation experience, we have notice= d that judges are savvy at sniffing out attempts to circumvent legal requirements,= and they are skeptical about attempts to exploit loopholes. Furthermore, we cannot p= redict Oracle's view =E2=80=94 given its past willingness to enforce copyleft lice= nses, and Oracle's recent attempts to adjudicate the limits of copyright in Court. Downstream = users should consider carefully before engaging in even source-only distribution.=E2=80= =99 I'm completely unfamiliar with the notion of =E2=80=98contributory copyring= infringement=E2=80=99 or =E2=80=98indirect copyright infringement=E2=80=99. =E2=80=98Savvy judge= s skeptical at attempts to exploit loopholes=E2=80=99 seems plausible to me in my inexpert opinion. > Other said, the distribution of the zfs.ko is an issue, not > provide a way to build it locally. Well, it does not appear to be a GPL > violation, IIUC the SFC analysis. I neglected that the terms of the GPL that come into play depend on whether one is only distributing source code (*) or also binaries, and whether one = is distributing _modified_ source code. I don't quite see a GPL violation anymore if we only distribute unmodified source code. However, what about freedom (1) and (3) (freedom to [...] and change the program in source form and (3) distribute modified versions)? I was going to write something here about why that would not be (legally) possible because of the CDDL and GPL, but I forgot why it wouldn't be possible. Maybe it is actually possible? (*) raid5atemyhomework noted that guix does _not_ distribute source code, it only points to source code locations. I don't quite agree. From my point of view, on whose server the source code is hosted is merely a technicality, guix is just =E2=80=98out-sourcing=E2=80=99 the source code d= istribution. Besides, ci.guix.gnu.org keeps a copy of the source code, and (guix download) will try to download from ci.guix.gnu.org. > Thanks for taking the time to carefully review all the aspects. Greetings, Maxime --=-00URjjkmLg5XFM0gsQkX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYTXwNRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kMuAP4643cECusxy+LaPDPqCdgvBOnO aJuyd5rIiDoRRariMQEA17L6e8O1pfR/eGQicTL/PYkK/USvvl34oo+nEvtAEAw= =3dxq -----END PGP SIGNATURE----- --=-00URjjkmLg5XFM0gsQkX-- From unknown Thu Aug 14 22:20:30 2025 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> Reply-To: raid5atemyhomework 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= From: raid5atemyhomework 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-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: , 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 From unknown Thu Aug 14 22:20:30 2025 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 11:09: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: Maxime Devos Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org>, zimoun Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163092651830383 (code B ref 45692); Mon, 06 Sep 2021 11:09:02 +0000 Received: (at 45692) by debbugs.gnu.org; 6 Sep 2021 11:08:38 +0000 Received: from localhost ([127.0.0.1]:52144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNCUQ-0007tz-5a for submit@debbugs.gnu.org; Mon, 06 Sep 2021 07:08:38 -0400 Received: from mail-40132.protonmail.ch ([185.70.40.132]:34593) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNCUM-0007tj-Ev for 45692@debbugs.gnu.org; Mon, 06 Sep 2021 07:08:36 -0400 Date: Mon, 06 Sep 2021 11:08:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1630926507; bh=PEY7r3S6ortpSMdtQkpSbcbQ6f6kF4aoHsRX8WduhFc=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=pvo+aa2DEJQs4jgu1SunK6qrA9RiOhUGX2dfrhLJ5nbioLHl8Xva6HCcG10C48jzX IfZPq6Yu5pH56UtN58XLOd3ogdJ0RwfpZtCrmRUdNHeyTIKo4fU0A3ND/mb/Gas9EY MHS58YH+cp5MzxIR8PUc/xL93qYu2o+kPOBARiOA= From: raid5atemyhomework Message-ID: <84VZkrMdtpnHj3fTyW5llNzMcTOVnkpIKR7xkrJqC_6hjYVSSQCYchxbgIuLF6cP5L_4v5nDGjdFyP5_qeSt1e26Tv7Ga1r59ey0j-dvgt0=@protonmail.com> In-Reply-To: References: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@telenet.be> <86bl56jfdn.fsf@gmail.com> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Maxime, > > Other said, the distribution of the zfs.ko is an issue, not > > provide a way to build it locally. Well, it does not appear to be a GPL > > violation, IIUC the SFC analysis. > > I neglected that the terms of the GPL that come into play depend on wheth= er > one is only distributing source code () or also binaries, and whether one= is > distributing modified source code. > I don't quite see a GPL violation anymore if we only distribute unmodifie= d > source code. However, what about freedom (1) and (3) (freedom to [...] an= d > change the program in source form and (3) distribute modified versions)? > I was going to write something here about why that would not be (legally) > possible because of the CDDL and GPL, but I forgot why it wouldn't be > possible. Maybe it is actually possible? > () raid5atemyhomework noted that guix does not distribute source code,it = only points to source code locations. I don't quite agree. From my > point of view, on whose server the source code is hosted is merely a > technicality, guix is just =E2=80=98out-sourcing=E2=80=99 the source code= distribution. > Besides, ci.guix.gnu.org keeps a copy of the source code, and > (guix download) will try to download from ci.guix.gnu.org. *shrug* if so, take note that the `zfs` package modifies the build system a= nd even some of the source code in order to adapt it to the slightly differ= ent Guix environment (in particular, Guix does not give an FHS to packages = being built, so we need to point some paths directly to absolute paths). I am not really interested in modifying the patch unless the license issue = is resolved, so I will wait until Guix maintainers can actually agree on wh= ether there is a license violation or not. Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 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-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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! Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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! Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps --=-=-= 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----- --=-=-=-- From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Sep 2021 17:19: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: Maxime Devos Cc: raid5atemyhomework , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16309486965116 (code B ref 45692); Mon, 06 Sep 2021 17:19:01 +0000 Received: (at 45692) by debbugs.gnu.org; 6 Sep 2021 17:18:16 +0000 Received: from localhost ([127.0.0.1]:54366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNIG8-0001KS-0i for submit@debbugs.gnu.org; Mon, 06 Sep 2021 13:18:16 -0400 Received: from mail-qt1-f171.google.com ([209.85.160.171]:36595) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNIG6-0001KF-7C for 45692@debbugs.gnu.org; Mon, 06 Sep 2021 13:18:14 -0400 Received: by mail-qt1-f171.google.com with SMTP id d11so5913097qtw.3 for <45692@debbugs.gnu.org>; Mon, 06 Sep 2021 10:18:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=nQ9Us+S2tBHAO0c+NBZuszC/Vud47KfG5vYqXxMe6N4=; b=TO5qqCngCWZ/z5maEA77V8MBMXilBrwF+Psn4bDw+yoTrzpKuSoCNdBhokC58Dm6Jz V9KHaWEUZFF+3iPQC5QMezLFvfz6FGhPsc+G5s5vAjoBsGrKZs0WfTr/ZgndLdyOI/sG OsgQCyIB/Xay1ZaXoyraFBkXnn+ufprEYWIhVi/PLJMbMLPJnAqDzq1t8/VU3SKXRCR2 jMT+bbo8NB1GmZfCdCqCV4byAm8v2MDg/yAWwl+OcOkV+zoxh4ZEMB3arU1yUWR9Dv2p ddnELFLLqfiUq95J/JDeM2Y2YFw+BEn78oLmD1JVWpG+UVFiYH3rFuy+r6WWCHeDS0KR 2RtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=nQ9Us+S2tBHAO0c+NBZuszC/Vud47KfG5vYqXxMe6N4=; b=VC3g8UOCnXkDlUCvnx4TYYQi6Cv76puuX2sLlwh3QaV1QinNCZYQstX9UP6w1KaI/e 8u0FuZBwJzihbXme9jqS1SwkkffzoDELUGvkw6L0usYw/x5EZcePoBv/rROL12LP2Lyw 3sZeIYLOl/MaPosYNFrO4kWKcSGq114szuQAqVGWEEPkW65MJ1QhUUkZ0wKmyGkFvEQW 07VFiOqjdAesgygnflCPRPBy6te4nnKt39Q0sK7ydoXsRrIed59bm+74G/hA1LbqjszR THcYsrbfkvozf7tXNEg9gF4dbXibFp3WwimyOFs1yIht748p3QDjmsAOpVxr1eHEseI4 5Prg== X-Gm-Message-State: AOAM530n7Dhv1nMVYyZfDuD8qqVAMZkxg97hjKULuTD5kwapZJkbryAW ayWh1ZevJWjoFACD0dQDoHHO8OeVlnNSFUnthbeoJvPIrmg= X-Google-Smtp-Source: ABdhPJzaQ6L+P2HrDFW4bcIyE5/vORv7VFIRQ/FwnG86peaxmC6zP3sWz7YsQTh9uyGscaz86CjZOGYMc63UUfs6nVA= X-Received: by 2002:a05:622a:164d:: with SMTP id y13mr11959865qtj.409.1630948688500; Mon, 06 Sep 2021 10:18:08 -0700 (PDT) MIME-Version: 1.0 References: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@telenet.be> <86bl56jfdn.fsf@gmail.com> In-Reply-To: From: zimoun Date: Mon, 6 Sep 2021 19:17:57 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Maxime, On Mon, 6 Sept 2021 at 12:41, Maxime Devos wrote: > =E2=80=98Nevertheless, there may be arguments for contributory and/or ind= irect copyright > infringement in many jurisdictions. We present no specific analysis ourse= lves on > the efficacy of a contributory infringement claim regarding source-only d= istributions > of ZFS and Linux. However, in our GPL litigation experience, we have noti= ced that > judges are savvy at sniffing out attempts to circumvent legal requirement= s, and they > are skeptical about attempts to exploit loopholes. Furthermore, we cannot= predict > Oracle's view =E2=80=94 given its past willingness to enforce copyleft li= censes, and Oracle's > recent attempts to adjudicate the limits of copyright in Court. Downstrea= m users should > consider carefully before engaging in even source-only distribution.=E2= =80=99 The =C2=AB Nevertheless =C2=BB is because the previous sentence is: --8<---------------cut here---------------start------------->8--- [=E2=80=A6] Therefore, the analysis is simpler, and we find no specific cla= use in either license that prohibits source-only redistribution of Linux and ZFS, even on the same distribution media. Nevertheless, [=E2=80=A6] --8<---------------cut here---------------end--------------->8--- My understanding is: - binary distribution violates licenses - source-only distribution appears to be fine - SFC cannot guarantee because all the arguments about source-only distribution have never been tested in Court. Moreover, they write an explicit paragraph why =C2=AB You cannot and should not rely on this document as legal advice. =C2=BB ;-) > I don't quite see a GPL violation anymore if we only distribute unmodifie= d Good. :-) > source code. However, what about freedom (1) and (3) (freedom to [...] a= nd > change the program in source form and (3) distribute modified versions)? Each license is free [1]. Therefore, they respect all the freedoms. The issue is about linking the result and distribute the binary. 1: > (*) raid5atemyhomework noted that guix does _not_ distribute source code, > it only points to source code locations. I don't quite agree. From my > point of view, on whose server the source code is hosted is merely a > technicality, guix is just =E2=80=98out-sourcing=E2=80=99 the source code= distribution. > Besides, ci.guix.gnu.org keeps a copy of the source code, and > (guix download) will try to download from ci.guix.gnu.org. Indeed, ci.guix.gnu.org keeps a copy of (as much as possible) source code. But ci.guix.gnu.org does not distribute all the corresponding binaries: see 'arguments' '#:substitutable? #f'. It is already the case for the package 'zfs': --8<---------------cut here---------------start------------->8--- (arguments `(;; The ZFS kernel module should not be downloaded since the license ;; terms don't allow for distributing it, only building it locally. #:substitutable? #f --8<---------------cut here---------------end--------------->8--- As explained in the initial submission [2], this patch set is just a "glue" usable by the user locally. No binaries on the Guix side is involved. All the source-code is under free license. 2: Cheers, simon From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 07 Sep 2021 09:55: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: zimoun Cc: raid5atemyhomework , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163100848215158 (code B ref 45692); Tue, 07 Sep 2021 09:55:01 +0000 Received: (at 45692) by debbugs.gnu.org; 7 Sep 2021 09:54:42 +0000 Received: from localhost ([127.0.0.1]:55444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNXoQ-0003wP-BQ for submit@debbugs.gnu.org; Tue, 07 Sep 2021 05:54:42 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:58760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNXoO-0003wF-H3 for 45692@debbugs.gnu.org; Tue, 07 Sep 2021 05:54:41 -0400 Received: from butterfly.local ([188.188.3.227]) by albert.telenet-ops.be with bizsmtp id qxue250054tskic06xuedh; Tue, 07 Sep 2021 11:54:39 +0200 Message-ID: <2d8f9c19f4faa5709cc1b6fb69d33cb8403c8c06.camel@telenet.be> From: Maxime Devos Date: Tue, 07 Sep 2021 11:54:37 +0200 In-Reply-To: References: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@telenet.be> <86bl56jfdn.fsf@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-1qF204nGQGxFxBKrU/dF" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1631008479; bh=dWSZ0jl6eQYcLwAgvoC0fZ8SUNAmHgaOC8Kr2dwkIdM=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=G5npzbgsjgcORtggGpkB10/iL/orcd2KFfYD0sxi9GS4pyUNfk1gBn+sumNzZqRCU iios4stdcWiDroJK4poOikDvKuJyLowbz8w+ASgnsde2v1mcD+RzsfIL3u5faWxs5H N1Q1vhEgBWs5V+If/Ms+t9W9MExL6c1rrEyisPJq/bmaEeVPgYalcsCAtePMEsRxlQ SfKsPkzJAgVK3ctxUS9BWj9tvUGvrFEKVCSYKMszl49l7Da+UuxAz1dsPTdqpbkBpi YfTTEySptzZQCNyDaBdW3jnKf5gcgYE2ZVOZ+eA1eLmgtq9SUXmY8FCCiSD/m6CD4H bk9SmRzxO7svA== X-Spam-Score: -0.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-1qF204nGQGxFxBKrU/dF Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, To be clear, I don't oppose the inclusion of the ZFS service on basis of the licensing anymore. Greetings, Maxime. --=-1qF204nGQGxFxBKrU/dF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYTc23RccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qbmAP4yvk4xrMoXmrJXtKz6oiodwmQC JmzTBft+Bab9yikspQD8DAjVFCC1VZP8eopu+NvS1DZV5d0DC1bb+8hTOQZ9HgI= =etW1 -----END PGP SIGNATURE----- --=-1qF204nGQGxFxBKrU/dF-- From unknown Thu Aug 14 22:20:30 2025 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: Wed, 08 Sep 2021 01:24: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: Maxime Devos Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org>, zimoun Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16310642107687 (code B ref 45692); Wed, 08 Sep 2021 01:24:02 +0000 Received: (at 45692) by debbugs.gnu.org; 8 Sep 2021 01:23:30 +0000 Received: from localhost ([127.0.0.1]:58082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNmJG-0001zv-G5 for submit@debbugs.gnu.org; Tue, 07 Sep 2021 21:23:30 -0400 Received: from mail-40141.protonmail.ch ([185.70.40.141]:48596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNmJE-0001zi-Ag for 45692@debbugs.gnu.org; Tue, 07 Sep 2021 21:23:29 -0400 Date: Wed, 08 Sep 2021 01:23:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1631064202; bh=pZnsy+Jaqce/oQwm9mZCJmbJoXakH7tRswnhpuyvrAI=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=IgR11+hAnh1mP+6n0SGTovdQkVdD8mhZCWQA5/7j6mwdAIVCz+x57679rV+EvrWWr 5p0ajp7CmEv90WEZjM/u7ycNOHCBH04FmTo4yNL0nvmcPeiZPqxXxZZeFIr2kpuR6V Bpu7S0wDYQAem3RaiIdXCNn3RQ3/gKRLMVBgg9ww= From: raid5atemyhomework Message-ID: <4p6Z87-x-50VeiVbwVx1Rl6rBr5o_63kmCJomCUoeKxi6gMnKseYriTIrByXbQ5McOWp0mrt6U5Bd0QqvI0pcC17_3m5sRNNIZvNa6ow5jc=@protonmail.com> In-Reply-To: <2d8f9c19f4faa5709cc1b6fb69d33cb8403c8c06.camel@telenet.be> References: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@telenet.be> <86bl56jfdn.fsf@gmail.com> <2d8f9c19f4faa5709cc1b6fb69d33cb8403c8c06.camel@telenet.be> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Good morning Maxime, > Hi, > > To be clear, I don't oppose the inclusion of the ZFS service > on basis of the licensing anymore. Okay. I'm busy right now, so will get around to updating the patch next we= ek. Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 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: Wed, 15 Sep 2021 14:05: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: Maxime Devos Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org>, zimoun Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163171469521294 (code B ref 45692); Wed, 15 Sep 2021 14:05:01 +0000 Received: (at 45692) by debbugs.gnu.org; 15 Sep 2021 14:04:55 +0000 Received: from localhost ([127.0.0.1]:52794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQVWw-0005XN-M7 for submit@debbugs.gnu.org; Wed, 15 Sep 2021 10:04:54 -0400 Received: from mail-40132.protonmail.ch ([185.70.40.132]:25708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQVWt-0005X3-Nr for 45692@debbugs.gnu.org; Wed, 15 Sep 2021 10:04:52 -0400 Date: Wed, 15 Sep 2021 14:04:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1631714685; bh=QMD0voH1/LSk5bWev8c/2QyZaDiyvWChIpAh4rRMFqU=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=VvgBOdD+FI4d5LVIYizDL7xZ5QahOB0Ha3IeqwP6mG4efXhAbJWbz5NEKbHYNl5iy 5+bnB0jkPIaXvU25g51e/8Huj54K1D8Lprz3MZkv0+A/RL9O/dNn1974IWtGFEA3Tv Sa5wJlL0HNqT2KAKF/5y6tUEt+tFRNXD4UQhcjTw= From: raid5atemyhomework Message-ID: In-Reply-To: <4p6Z87-x-50VeiVbwVx1Rl6rBr5o_63kmCJomCUoeKxi6gMnKseYriTIrByXbQ5McOWp0mrt6U5Bd0QqvI0pcC17_3m5sRNNIZvNa6ow5jc=@protonmail.com> References: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@telenet.be> <86bl56jfdn.fsf@gmail.com> <2d8f9c19f4faa5709cc1b6fb69d33cb8403c8c06.camel@telenet.be> <4p6Z87-x-50VeiVbwVx1Rl6rBr5o_63kmCJomCUoeKxi6gMnKseYriTIrByXbQ5McOWp0mrt6U5Bd0QqvI0pcC17_3m5sRNNIZvNa6ow5jc=@protonmail.com> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) hello, > > > Hi, > > To be clear, I don't oppose the inclusion of the ZFS service > > on basis of the licensing anymore. > > Okay. I'm busy right now, so will get around to updating the patch next w= eek. Scratch that, I'm busy this week as well, maybe next next week. Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v4 3/3] gnu: Add ZFS service type. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Sep 2021 09:49: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: raid5atemyhomework Cc: Maxime Devos , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163221769911322 (code B ref 45692); Tue, 21 Sep 2021 09:49:01 +0000 Received: (at 45692) by debbugs.gnu.org; 21 Sep 2021 09:48:19 +0000 Received: from localhost ([127.0.0.1]:44973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mScNu-0002wY-Vf for submit@debbugs.gnu.org; Tue, 21 Sep 2021 05:48:19 -0400 Received: from mail-wr1-f41.google.com ([209.85.221.41]:41706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mScNt-0002wI-KK for 45692@debbugs.gnu.org; Tue, 21 Sep 2021 05:48:17 -0400 Received: by mail-wr1-f41.google.com with SMTP id w29so37295125wra.8 for <45692@debbugs.gnu.org>; Tue, 21 Sep 2021 02:48:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=gHfAP+oINr4nAdM/796LieILRgBrNWRY39snHO10bI8=; b=kl+zFegZHlL5Xsk3NRCeipIvomrmpMpaaL+FEiMIMIVRV1HebSSbZ0etteMq3hoTrP 5IH9I+n8d0jCoD9KU2ACiBdEIo43H73tyK+Q+YCQn0xarJn4lgDgtc4+ybaxGp2QLRS6 DN0AsSxeUXwRDoJ73U9QmGSWJ1gOh4rgMYJn0UNbkRPiyQENuKTnJJwQ0TsUtQ/ZUpjO ISPaPqNOyGcoEV7ENQdRxqOegiJ+VTDPyLFAHymJO11AtOqrmwh9BtczCjxirqPJlHpn jOJwkVjd5IgZmhMgfvoaciwatOP5WX6knofSaIfT730nefJuSI5nNQxfK3YnkXSvPtW5 y/SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=gHfAP+oINr4nAdM/796LieILRgBrNWRY39snHO10bI8=; b=b8NXmivti3g+5yVvcaOYenW3btEvHjIUHAa+x6OD/AiwbLJV/q1G+ViECHZFwrIr2u SFr6qf9+G4BrgQS3tP5bCg4Va6ENZlZKxeJswr6dn+SdYJMbGg8fFljyqxE5vr9oi+5v 9o13NdHks86QdXQbFSjs3VDdh2LqIkDGVC80vQCpzZHqTr+k4FnRarZ3dNF4ZRnZVt3W X/1Dm0UAsDj4tXxyKVWePe5YFQecol95WRXipycjZ72aAa+gfx+fquFKP390nIE2QE8X Gya4VIp3fatsUorgbQME67ppUdRBxJG70XlBlJ1n2KK4L4YdihqOM5qBQFrVHDP5+PN7 2N0w== X-Gm-Message-State: AOAM531ST+dB6z09723Rufrasr9DyQjqH1tYNoEAc8qqIaqI6Evsnmgf KPZZtf3EyF1jeOK3EzGPVij45VC4FriS1A== X-Google-Smtp-Source: ABdhPJyeu405Ty3qxggewB+X/vpY68U8Q7fVw4SVn9NecNjxr3BOYYWNvQpzqBPv25MqkV2TGAuvtg== X-Received: by 2002:adf:eec3:: with SMTP id a3mr33832815wrp.276.1632217691570; Tue, 21 Sep 2021 02:48:11 -0700 (PDT) Received: from lili ([88.126.110.68]) by smtp.gmail.com with ESMTPSA id h15sm18210795wrc.19.2021.09.21.02.48.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Sep 2021 02:48:11 -0700 (PDT) From: zimoun References: <2020c2223378c7eb3635defb27e6b4545e048b9f.camel@telenet.be> <86bl56jfdn.fsf@gmail.com> <2d8f9c19f4faa5709cc1b6fb69d33cb8403c8c06.camel@telenet.be> <4p6Z87-x-50VeiVbwVx1Rl6rBr5o_63kmCJomCUoeKxi6gMnKseYriTIrByXbQ5McOWp0mrt6U5Bd0QqvI0pcC17_3m5sRNNIZvNa6ow5jc=@protonmail.com> Date: Tue, 21 Sep 2021 11:42:09 +0200 In-Reply-To: (raid5atemyhomework@protonmail.com's message of "Wed, 15 Sep 2021 14:04:33 +0000") Message-ID: <865yuub6z2.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Wed, 15 Sep 2021 at 14:04, raid5atemyhomework wrote: >> Okay. I'm busy right now, so will get around to updating the patch next week. > > Scratch that, I'm busy this week as well, maybe next next week. Hope that you will find the time next next week. :-) Just a comment to ease the application of patch. Once rebased on origin/master, you should create the patch set using: git format-patch --base=origin/master because then it ends with this, for instance, --8<---------------cut here---------------start------------->8--- base-commit: d14221bf65cfbe7f8f5b7cac44132087cab70bf5 -- 2.28.0 --8<---------------cut here---------------end--------------->8--- which provide the commit where the patch applies and thus ease work at review time, IMHO. See details [1]. Cheers, simon 1: From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v5 3/3] gnu: Add ZFS service type. References: In-Reply-To: Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 30 Sep 2021 14:58: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: zimoun Cc: Maxime Devos , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16330138329369 (code B ref 45692); Thu, 30 Sep 2021 14:58:02 +0000 Received: (at 45692) by debbugs.gnu.org; 30 Sep 2021 14:57:12 +0000 Received: from localhost ([127.0.0.1]:53665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVxUh-0002Qw-KE for submit@debbugs.gnu.org; Thu, 30 Sep 2021 10:57:12 -0400 Received: from mail-4324.protonmail.ch ([185.70.43.24]:64009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVxUd-0002QM-GX for 45692@debbugs.gnu.org; Thu, 30 Sep 2021 10:57:06 -0400 Date: Thu, 30 Sep 2021 14:56:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1633013813; bh=VPUf4/hWYNxBip7DHkMTg2aJAe6+KTQt09mUKGCKE5k=; h=Date:To:From:Cc:Reply-To:Subject:From; b=Vk5IadbjG20a662T+XEj5HRt0VbNSveinbCYux05COhmLYQbxIkWpmGMteXcHt4Mo cLMBoMh/capv7r3if6CrSlIhWSLvNpT6WQ2qLpPXsjhectvsGWIYCpKUbV3aGZPone Xb2kIGkTDHQDA01AyXTLkBJh1wwX+u0ehXlYn2go= From: raid5atemyhomework Message-ID: 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: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Sorry for the lateness everyone. Hope this one gets reviewed and merged. -- Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [185.70.43.24 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raid5atemyhomework[at]protonmail.com) 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: liltechdude.xyz (xyz)] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Sorry for the lateness everyone. Hope this one gets reviewed and merged. -- >From 3803e046566278fe12d64f6e39564e9602bf434d Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Thu, 30 Sep 2021 16:58:46 +0800 Subject: [PATCH] gnu: Add ZFS service type. * gnu/services/file-systems.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/services/base.scm: Export dependency->shepherd-service-name. * doc/guix.texi (ZFS File System): New subsection. --- doc/guix.texi | 351 ++++++++++++++++++++++++++++++++ gnu/local.mk | 2 + gnu/services/base.scm | 4 +- gnu/services/file-systems.scm | 363 ++++++++++++++++++++++++++++++++++ 4 files changed, 719 insertions(+), 1 deletion(-) create mode 100644 gnu/services/file-systems.scm diff --git a/doc/guix.texi b/doc/guix.texi index a72a726b54..dd38103953 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -97,6 +97,7 @@ Copyright @copyright{} 2021 Hui Lu@* Copyright @copyright{} 2021 pukkamustard@* Copyright @copyright{} 2021 Alice Brenon@* Copyright @copyright{} 2021 Andrew Tropin@* +Copyright @copyright{} 2021 raid5atemyhomework@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -14435,6 +14436,356 @@ a file system declaration such as: compress-force=3Dzstd,space_cache=3Dv2")) @end lisp + +@node ZFS File System +@subsection ZFS File System + +Support for ZFS file systems in Guix is based on the OpenZFS project. +OpenZFS currently only supports Linux-Libre and is not available on the +Hurd. + +OpenZFS is free software; unfortunately its license is incompatible with +the GNU General Public License (GPL), the license of the Linux kernel, +which means they cannot be distributed together. However, as a user, +you can choose to build ZFS and use it together with Linux; you can +even rely on Guix to automate this task. See +@uref{https://www.fsf.org/licensing/zfs-and-linux, this analysis by +the Free Software Foundation} for more information. + +As a large and complex kernel module, OpenZFS has to be compiled for a +specific version of Linux-Libre. At times, the latest OpenZFS package +available in Guix is not compatible with the latest Linux-Libre version. +Thus, directly installing the @code{zfs} package can fail. + +Instead, you are recommended to select a specific older long-term-support +Linux-Libre kernel. Do not use @code{linux-libre-lts}, as even the +latest long-term-support kernel may be too new for @code{zfs}. Instead, +explicitly select a specific older version, such as @code{linux-libre-5.10= }, +and upgrade it manually later as new long-term-support kernels become +available that you have confirmed is compatible with the latest available +OpenZFS version on Guix. + +For example, you can modify your system configuration file to a specific +Linux-Libre version and add the @code{zfs-service-type} service. + +@lisp +(use-modules (gnu)) +(use-package-modules + #;@dots{} + linux) +(use-service-modules + #;@dots{} + file-systems) + +(define my-kernel linux-libre-5.10) + +(operating-system + (kernel my-kernel) + #;@dots{} + (services + (cons* (service zfs-service-type + (zfs-configuration + (kernel my-kernel))) + #;@dots{} + %desktop-services)) + #;@dots{}) +@end lisp + +@defvr {Scheme Variable} zfs-service-type +This is the type for a service that adds ZFS support to your operating +system. The service is configured using a @code{zfs-configuration} +record. + +Here is an example use: + +@lisp +(service zfs-service-type + (zfs-configuration + (kernel linux-libre-5.4))) +@end lisp +@end defvr + +@deftp {Data Type} zfs-configuration +This data type represents the configuration of the ZFS support in Guix +System. Its fields are: + +@table @asis +@item @code{kernel} +The package of the Linux-Libre kernel to compile OpenZFS for. This field +is always required. It @emph{must} be the same kernel you use in your +@code{operating-system} form. + +@item @code{base-zfs} (default: @code{zfs}) +The OpenZFS package that will be compiled for the given Linux-Libre kernel= . + +@item @code{base-zfs-auto-snapshot} (default: @code{zfs-auto-snapshot}) +The @code{zfs-auto-snapshot} package to use. It will be modified to +specifically use the OpenZFS compiled for your kernel. + +@item @code{dependencies} (default: @code{'()}) +A list of @code{} or @code{} records that must +be mounted or opened before OpenZFS scans for pools to import. For exampl= e, +if you have set up LUKS containers as leaf VDEVs in a pool, you have to +include their corresponding @code{} records so that OpenZF= S +can import the pool correctly at bootup. + +@item @code{auto-mount?} (default: @code{#t}) +Whether to mount datasets with the ZFS @code{mountpoint} property automati= cally +at startup. This is the behavior that ZFS users usually expect. You migh= t +set this to @code{#f} for an operating system intended as a ``rescue'' sys= tem +that is intended to help debug problems with the disks rather than actuall= y +work in production. + +@item @code{auto-scrub} (default: @code{'weekly}) +Specifies how often to scrub all pools. Can be the symbols @code{'weekly}= or +@code{'monthly}, or a schedule specification understood by +@xref{mcron, mcron job specifications,, mcron, GNU@tie{}mcron}, such as +@code{"0 3 * * 6"} for ``every 3AM on Saturday''. +It can also be @code{#f} to disable auto-scrubbing (@strong{not recommende= d}). + +The general guideline is to scrub weekly when using consumer-quality drive= s, and +to scrub monthly when using enterprise-quality drives. + +@code{'weekly} scrubs are done on Sunday midnight, while @code{monthly} sc= rubs +are done on midnight on the first day of each month. + +@item @code{auto-snapshot?} (default: @code{#t}) +Specifies whether to auto-snapshot by default. If @code{#t}, then snapsho= ts +are automatically created except for ZFS datasets with the +@code{com.sun:auto-snapshot} ZFS vendor property set to @code{false}. + +If @code{#f}, snapshots will not be automatically created, unless the ZFS +dataset has the @code{com.sun:auto-snapshot} ZFS vendor property set to +@code{true}. + +@item @code{auto-snapshot-keep} (default: @code{'()}) +Specifies an association list of symbol-number pairs, indicating the numbe= r +of automatically-created snapshots to retain for each frequency type. + +If not specified via this field, by default there are 4 @code{frequent}, 2= 4 +@code{hourly}, 31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly} sna= pshots. + +For example: + +@lisp +(zfs-configuration + (kernel my-kernel) + (auto-snapshot-keep + '((frequent . 8) + (hourly . 12)))) +@end lisp + +The above will keep 8 @code{frequent} snapshots and 12 @code{hourly} snaps= hots. +@code{daily}, @code{weekly}, and @code{monthly} snapshots will keep their +defaults (31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly}). + +@end table +@end deftp + +@subsubsection ZFS Auto-Snapshot + +The ZFS service on Guix System supports auto-snapshots as implemented in t= he +Solaris operating system. + +@code{frequent} (every 15 minutes), @code{hourly}, @code{daily}, @code{wee= kly}, +and @code{monthly} snapshots are created automatically for ZFS datasets th= at +have auto-snapshot enabled. They will be named, for example, +@code{zfs-auto-snap_frequent-2021-03-22-1415}. You can continue to use +manually-created snapshots as long as they do not conflict with the naming +convention used by auto-snapshot. You can also safely manually destroy +automatically-created snapshots, for example to free up space. + +The @code{com.sun:auto-snapshot} ZFS property controls auto-snapshot on a +per-dataset level. Sub-datasets will inherit this property from their par= ent +dataset, but can have their own property. + +You @emph{must} set this property to @code{true} or @code{false} exactly, +otherwise it will be treated as if the property is unset. + +For example: + +@example +# zfs list -o name +NAME +tank +tank/important-data +tank/tmp +# zfs set com.sun:auto-snapshot=3Dtrue tank +# zfs set com.sun:auto-snapshot=3Dfalse tank/tmp +@end example + +The above will set @code{tank} and @code{tank/important-data} to be +auto-snapshot, while @code{tank/tmp} will not be auto-snapshot. + +If the @code{com.sun:auto-snapshot} property is not set for a dataset +(the default when pools and datasets are created), then whether +auto-snapshot is done or not will depend on the @code{auto-snapshot?} +field of the @code{zfs-configuration} record. + +There are also @code{com.sun:auto-snapshot:frequent}, +@code{com.sun:auto-snapshot:hourly}, @code{com.sun:auto-snapshot:daily}, +@code{com.sun:auto-snapshot:weekly}, and @code{com.sun:auto-snapshot:month= ly} +properties that give finer-grained control of whether to auto-snapshot a +dataset at a particular schedule. + +The number of snapshots kept for all datasets can be overridden via the +@code{auto-snapshot-keep} field of the @code{zfs-configuration} record. +There is currently no support to have different numbers of snapshots to +keep for different datasets. + +@subsubsection ZVOLs + +ZFS supports ZVOLs, block devices that ZFS exposes to the operating +system in the @code{/dev/zvol/} directory. The ZVOL will have the same +resilience and self-healing properties as other datasets on your ZFS pool. +ZVOLs can also be snapshotted (and will be included in auto-snapshotting +if enabled), which snapshots the state of the block device, effectively +snapshotting the hosted file system. + +You can put any file system inside the ZVOL. However, in order to mount t= his +file system at system start, you need to add @code{%zfs-zvol-dependency} a= s a +dependency of each file system inside a ZVOL. + +@defvr {Scheme Variable} %zfs-zvol-dependency +An artificial @code{} which tells the file system mounting +service to wait for ZFS to provide ZVOLs before mounting the +@code{} dependent on it. +@end defvr + +For example, suppose you create a ZVOL and put an ext4 filesystem +inside it: + +@example +# zfs create -V 100G tank/ext4-on-zfs +# mkfs.ext4 /dev/zvol/tank/ext4-on-zfs +# mkdir /ext4-on-zfs +# mount /dev/zvol/tank/ext4-on-zfs /ext4-on-zfs +@end example + +You can then set this up to be mounted at boot by adding this to the +@code{file-systems} field of your @code{operating-system} record: + +@lisp +(file-system + (device "/dev/zvol/tank/ext4-on-zfs") + (mount-point "/ext4-on-zfs") + (type "ext4") + (dependencies (list %zfs-zvol-dependency))) +@end lisp + +You @emph{must not} add @code{%zfs-zvol-dependency} to your +@code{operating-system}'s @code{mapped-devices} field, and you @emph{must +not} add it (or any @code{}s dependent on it) to the +@code{dependencies} field of @code{zfs-configuration}. Finally, you +@emph{must not} use @code{%zfs-zvol-dependency} unless you actually +instantiate @code{zfs-service-type} on your system. + +@subsubsection Unsupported Features + +Some common features and uses of ZFS are currently not supported, or not +fully supported, on Guix. + +@enumerate +@item +Shepherd-managed daemons that are configured to read from or write to ZFS +mountpoints need to include @code{user-processes} in their @code{requireme= nt} +field. This is the earliest that ZFS file systems are assured of being +mounted. + +Generally, most daemons will, directly or indirectly, require +@code{networking}, or @code{user-processes}, or both. Most implementation= s +of @code{networking} will also require @code{user-processes} so daemons th= at +require only @code{networking} will also generally start up after +@code{user-processes}. A notable exception, however, is +@code{static-networking-service-type}. You will need to explicitly add +@code{user-processes} as a @code{requirement} of your @code{static-network= ing} +record. + +@item +@code{mountpoint=3Dlegacy} ZFS file systems. The handlers for the Guix mo= unting +system have not yet been modified to support ZFS, and will expect @code{/d= ev} +paths in the @code{}'s @code{device} field, but ZFS file syst= ems +are referred to via non-path @code{pool/file/system} names. Such file sys= tems +also need to be mounted @emph{after} OpenZFS has scanned for pools. + +You can still manually mount these file systems after system boot; what is +only unsupported is mounting them automatically at system boot by specifyi= ng +them in @code{} records of your @code{operating-system}. + +@item +@code{/home} on ZFS. Guix will create home directories for users, but thi= s +process currently cannot be scheduled after ZFS file systems are mounted. +Thus, the ZFS file system might be mounted @emph{after} Guix has created +home directories at boot, at which point OpenZFS will refuse to mount sinc= e +the mountpoint is not empty. However, you @emph{can} create an ext4, xfs, +btrfs, or other supported file system inside a ZVOL, have that depend on +@code{%zfs-zvol-dependency}, and set it to mount on the @code{/home} +directory; they will be scheduled to mount before the @code{user-homes} +process. + +Similarly, other locations like @code{/var}, @code{/gnu/store} and so +on cannot be reliably put in a ZFS file system, though they may be +possible to create as other file systems inside ZVOL containers. + +@item +@code{/} and @code{/boot} on ZFS. These require Guix to expose more of +the @code{initrd} very early boot process to services. It also requires +Guix to have the ability to explicitly load modules while still in +@code{initrd} (currently kernel modules loaded by +@code{kernel-module-loader-service-type} are loaded after @code{/} is +mounted). Further, since one of ZFS's main advantages is that it can +continue working despite the loss of one or more devices, it makes sense +to also support installing the bootloader on all devices of the pool that +contains the @code{/} and @code{/boot}; after all, if ZFS can survive the +loss of one device, the bootloader should also be able to survive the loss +of one device. + +@item +ZVOL swap devices. Mapped swap devices need to be listed in +@code{mapped-devices} to ensure they are opened before the system attempts +to use them, but you cannot currently add @code{%zfs-zvol-dependency} to +@code{mapped-devices}. + +This will also require significant amounts of testing, as various kernel +build options and patches may affect how swapping works, which are possibl= y +different on Guix System compared to other distributions that this feature= is +known to work on. + +@item +ZFS Event Daemon. Support for this has not been written yet, patches are +welcome. The main issue is how to design this in a Guix style while +supporting legacy shell-script styles as well. In particular, OpenZFS its= elf +comes with a number of shell scripts intended for ZFS Event Daemon, and we +need to figure out how the user can choose to use or not use the provided +scripts (and configure any settings they have) or override with their own +custom code (which could be shell scripts they have written and trusted fr= om +previous ZFS installations). + +As-is, you can create your own service that activates the ZFS Event Daemon +by creating the @file{/etc/zfs/zed} directory and filling it appropriately= , +then launching @code{zed}. + +@item +@file{/etc/zfs/zpool.cache}. Currently the ZFS support on Guix always for= ces +scanning of all devices at bootup to look for ZFS pools. For systems with +dozens or hundreds of storage devices, this can lead to slow bootup. One = issue +is that tools should really not write to @code{/etc} which is supposed to = be for +configuration; possibly it could be moved to @code{/var} instead. Another= issue +is that if Guix ever supports @code{/} on ZFS, we would need to somehow ke= ep the +@code{zpool.cache} file inside the @code{initrd} up-to-date with what is i= n the +@code{/} mount point. + +@item +@code{zfs share}. This will require some (unknown amount of) work to inte= grate +into the Samba and NFS services of Guix. You @emph{can} manually set up S= amba +and NFS to share any mounted ZFS datasets by setting up their configuratio= ns +properly; it just can't be done for you by @code{zfs share} and the +@code{sharesmb} and @code{sharenfs} properties. +@end enumerate + +Hopefully, support for the above only requires code to be written, and use= rs +are encouraged to hack on Guix to implement the above features. + @node Mapped Devices @section Mapped Devices diff --git a/gnu/local.mk b/gnu/local.mk index d415b892e9..4147badd49 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -45,6 +45,7 @@ # Copyright =C2=A9 2021 Sharlatan Hellseher # Copyright =C2=A9 2021 Dmitry Polyakov # Copyright =C2=A9 2021 Andrew Tropin +# Copyright =C2=A9 2021 raid5atemyhomework # # This file is part of GNU Guix. # @@ -633,6 +634,7 @@ GNU_SYSTEM_MODULES =3D=09=09=09=09\ %D%/services/docker.scm=09=09=09\ %D%/services/authentication.scm=09=09\ %D%/services/file-sharing.scm=09=09=09\ + %D%/services/file-systems.scm=09=09=09\ %D%/services/games.scm=09=09=09\ %D%/services/ganeti.scm=09=09=09\ %D%/services/getmail.scm=09=09=09=09\ diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 50865055fe..d5d33aeada 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -186,7 +186,9 @@ references-file - %base-services)) + %base-services + + dependency->shepherd-service-name)) ;;; Commentary: ;;; diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.scm new file mode 100644 index 0000000000..867349c3a5 --- /dev/null +++ b/gnu/services/file-systems.scm @@ -0,0 +1,363 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2021 raid5atemyhomework +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services file-systems) + #:use-module (gnu packages file-systems) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu services linux) + #:use-module (gnu services mcron) + #:use-module (gnu services shepherd) + #:use-module (gnu system mapped-devices) + #:use-module (guix gexp) + #:use-module (guix modules) + #:use-module (guix packages) + #:use-module (guix records) + #:use-module (srfi srfi-1) + #:export (zfs-service-type + + zfs-configuration + zfs-configuration? + zfs-configuration-kernel + zfs-configuration-base-zfs + zfs-configuration-base-zfs-auto-snapshot + zfs-configuration-dependencies + zfs-configuration-auto-mount? + zfs-configuration-auto-scrub + zfs-configuration-auto-snapshot? + zfs-configuration-auto-snapshot-keep + + %zfs-zvol-dependency)) + +(define-record-type* + zfs-configuration + make-zfs-configuration + zfs-configuration? + + ;; linux-libre kernel you want to compile the base-zfs module for. + (kernel zfs-configuration-kernel) + + ;; the OpenZFS package that will be modified to compile for the + ;; given kernel. + ;; Because it is modified and not the actual package that is used, + ;; we prepend the name 'base-'. + (base-zfs zfs-configuration-base-zfs + (default zfs)) + + ;; the zfs-auto-snapshot package that will be modified to compile + ;; for the given kernel. + ;; Because it is modified and not the actual package that is used, + ;; we prepend the name 'base-'. + (base-zfs-auto-snapshot zfs-configuration-base-zfs-auto-snapshot + (default zfs-auto-snapshot)) + + ;; list of or objects that must be + ;; opened/mounted before we import any ZFS pools. + (dependencies zfs-configuration-dependencies + (default '())) + + ;; #t to mount all mountable datasets by default. + ;; #f if not mounting. + ;; #t is the expected behavior on other operating systems, the + ;; #f is only supported for "rescue" operating systems where + ;; the user wants lower-level control of when to mount. + (auto-mount? zfs-configuration-auto-mount? + (default #t)) + + ;; 'weekly for weekly scrubbing, 'monthly for monthly scrubbing, an + ;; mcron time specification that can be given to `job`, or #f to + ;; disable. + (auto-scrub zfs-configuration-auto-scrub + (default 'weekly)) + + ;; #t to auto-snapshot by default (and `com.sun:auto-snapshot=3Dfalse` + ;; disables auto-snapshot per dataset), #f to not auto-snapshot + ;; by default (and `com.sun:auto-snapshot=3Dtrue` enables auto-snapshot + ;; per dataset). + (auto-snapshot? zfs-configuration-auto-snapshot? + (default #t)) + + ;; association list of symbol-number pairs to indicate the number + ;; of automatic snapshots to keep for each of 'frequent, 'hourly, + ;; 'daily, 'weekly, and 'monthly. + ;; e.g. '((frequent . 8) (hourly . 12)) + (auto-snapshot-keep zfs-configuration-auto-snapshot-keep + (default '()))) + +(define %default-auto-snapshot-keep + '((frequent . 4) + (hourly . 24) + (daily . 31) + (weekly . 8) + (monthly . 12))) + +(define %auto-snapshot-mcron-schedule + '((frequent . "0,15,30,45 * * * *") + (hourly . "0 * * * *") + (daily . "0 0 * * *") + (weekly . "0 0 * * 7") + (monthly . "0 0 1 * *"))) + +;; A synthetic and unusable MAPPED-DEVICE intended for use when +;; the user has created a mountable filesystem inside a ZFS +;; zvol and wants it mounted inside the configuration.scm. +(define %zfs-zvol-dependency + (mapped-device + (source '()) + (targets '("zvol/*")) + (type #f))) + +(define (make-zfs-package conf) + "Creates a zfs package based on the given zfs-configuration. + + OpenZFS is a kernel package and to ensure best compatibility + it should be compiled with the specific Linux-Libre kernel + used on the system. This simply overrides the kernel used + in compilation with that given in the configuration, which + the user has to ensure is the same as in the operating-system." + (let ((kernel (zfs-configuration-kernel conf)) + (base-zfs (zfs-configuration-base-zfs conf))) + (package + (inherit base-zfs) + (arguments (cons* #:linux kernel + (package-arguments base-zfs)))))) + +(define (make-zfs-auto-snapshot-package conf) + "Creates a zfs-auto-snapshot package based on the given + zfs-configuration. + + Since the OpenZFS tools above are compiled to a specific + kernel version, zfs-auto-snapshot --- which calls into the + OpenZFS tools --- has to be compiled with the specific + modified OpenZFS package created in the make-zfs-package + procedure." + (let ((zfs (make-zfs-package conf)) + (base-zfs-auto-snapshot (zfs-configuration-base-zfs-auto-snapshot = conf))) + (package + (inherit base-zfs-auto-snapshot) + (inputs `(("zfs" ,zfs)))))) + +(define (zfs-loadable-modules conf) + "Specifies that the specific 'module' output of the OpenZFS + package is to be used; for use in indicating it as a + loadable kernel module." + (list (list (make-zfs-package conf) "module"))) + +(define (zfs-shepherd-services conf) + "Constructs a list of Shepherd services that is installed + by the ZFS Guix service. + + 'zfs-scan' scans all devices for ZFS pools, and makes them + available to 'zpool' commands. + 'device-mapping-zvol/*' waits for /dev/zvol/* to be + populated by 'udev', and runs after 'zfs-scan'. + 'zfs-auto-mount' mounts all ZFS datasets with a 'mount' + property, which defaults to '/' followed by the name of + the dataset. + + All the above behavior is expected by ZFS users from + typical ZFS installations. A mild difference is that + scanning is usually based on '/etc/zfs/zpool.cache' + instead of the 'scan all devices' used below, but that + file is questionable in Guix since ideally '/etc/' + files are modified by the sysad directly; + '/etc/zfs/zpool.cache' is modified by ZFS tools." + (let* ((zfs-package (make-zfs-package conf)) + (zpool (file-append zfs-package "/sbin/zpool")) + (zfs (file-append zfs-package "/sbin/zfs")) + (zvol_wait (file-append zfs-package "/bin/zvol_wait")) + (scheme-modules `((srfi srfi-1) + (srfi srfi-34) + (srfi srfi-35) + (rnrs io ports) + ,@%default-modules))) + (define zfs-scan + (shepherd-service + (provision '(zfs-scan)) + (requirement `(root-file-system + kernel-module-loader + udev + ,@(map dependency->shepherd-service-name + (zfs-configuration-dependencies conf)))) + (documentation "Scans for and imports ZFS pools.") + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "zfs: error importing pools: ~s~%" + (condition-message c)) + #f)) + ;; TODO: optionally use a cachefile. + (invoke #$zpool "import" "-a" "-N")))) + ;; Why not one-shot? Because we don't really want to rescan + ;; this each time a requiring process is restarted, as scanning + ;; can take a long time and a lot of I/O. + (stop #~(const #f)))) + + (define device-mapping-zvol/* + (shepherd-service + (provision '(device-mapping-zvol/*)) + (requirement '(zfs-scan)) + (documentation "Waits for all ZFS ZVOLs to be opened.") + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "zfs: error opening zvols: ~s~%" + (condition-message c)) + #f)) + (invoke #$zvol_wait)))) + (stop #~(const #f)))) + + (define zfs-auto-mount + (shepherd-service + (provision '(zfs-auto-mount)) + (requirement '(zfs-scan)) + (documentation "Mounts all non-legacy mounted ZFS filesystems.") + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "zfs: error mounting file systems: ~= s~%" + (condition-message c)) + #f)) + ;; 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/console ? + (with-output-to-port (current-error-port) + (lambda () + (invoke #$zfs "mount" "-a" "-l")))))) + (stop #~(lambda _ + ;; Make sure that Shepherd does not have a CWD that + ;; is a mounted ZFS filesystem, which would prevent + ;; unmounting. + (chdir "/") + (invoke #$zfs "unmount" "-a" "-f"))))) + + `(,zfs-scan + ,device-mapping-zvol/* + ,@(if (zfs-configuration-auto-mount? conf) + `(,zfs-auto-mount) + '())))) + +(define (zfs-user-processes conf) + "Provides the last Shepherd service that 'user-processes' has to + wait for. + + If not auto-mounting, then user-processes should only wait for + the device scan." + (if (zfs-configuration-auto-mount? conf) + '(zfs-auto-mount) + '(zfs-scan))) + +(define (zfs-mcron-auto-snapshot-jobs conf) + "Creates a list of mcron jobs for auto-snapshotting, one for each + of the standard durations." + (let* ((user-auto-snapshot-keep (zfs-configuration-auto-snapshot-ke= ep conf)) + ;; assoc-ref has earlier entries overriding later ones. + (auto-snapshot-keep (append user-auto-snapshot-keep + %default-auto-snapshot-keep= )) + (auto-snapshot? (zfs-configuration-auto-snapshot? c= onf)) + (zfs-auto-snapshot-package (make-zfs-auto-snapshot-package con= f)) + (zfs-auto-snapshot (file-append zfs-auto-snapshot-pack= age + "/sbin/zfs-auto-snapsh= ot"))) + (map + (lambda (label) + (let ((keep (assoc-ref auto-snapshot-keep label)) + (sched (assoc-ref %auto-snapshot-mcron-schedule label))) + #~(job '#$sched + (lambda () + (system* #$zfs-auto-snapshot + "--quiet" + "--syslog" + #$(string-append "--label=3D" + (symbol->string label)) + #$(string-append "--keep=3D" + (number->string keep)) + "//"))))) + (map first %auto-snapshot-mcron-schedule)))) + +(define (zfs-mcron-auto-scrub-jobs conf) + "Creates a list of mcron jobs for auto-scrubbing." + (let* ((zfs-package (make-zfs-package conf)) + (zpool (file-append zfs-package "/sbin/zpool")) + (auto-scrub (zfs-configuration-auto-scrub conf)) + (sched (cond + ((eq? auto-scrub 'weekly) "0 0 * * 7") + ((eq? auto-scrub 'monthly) "0 0 1 * *") + (else auto-scrub)))) + (define code + ;; We need to get access to (guix build utils) for the + ;; invoke procedures. + (with-imported-modules (source-module-closure '((guix build utils))) + #~(begin + (use-modules (guix build utils) + (ice-9 ports)) + ;; The ZFS pools in the system. + (define pools + (invoke/quiet #$zpool "list" "-o" "name" "-H")) + ;; Only scrub if there are actual ZFS pools, as the + ;; zpool scrub command errors out if given an empty + ;; argument list. + (unless (null? pools) + ;; zpool scrub only initiates the scrub and otherwise + ;; prints nothing. Results are always seen on the + ;; zpool status command. + (apply invoke #$zpool "scrub" pools))))) + (list + #~(job '#$sched + #$(program-file "mcron-zfs-scrub.scm" code))))) + +(define (zfs-mcron-jobs conf) + "Creates a list of mcron jobs for ZFS management." + (append (zfs-mcron-auto-snapshot-jobs conf) + (if (zfs-configuration-auto-scrub conf) + (zfs-mcron-auto-scrub-jobs conf) + '()))) + +(define zfs-service-type + (service-type + (name 'zfs) + (extensions + (list ;; Install OpenZFS kernel module into kernel profile. + (service-extension linux-loadable-module-service-type + zfs-loadable-modules) + ;; And load it. + (service-extension kernel-module-loader-service-type + (const '("zfs"))) + ;; Make sure ZFS pools and datasets are mounted at + ;; boot. + (service-extension shepherd-root-service-type + zfs-shepherd-services) + ;; Make sure user-processes don't start until + ;; after ZFS does. + (service-extension user-processes-service-type + zfs-user-processes) + ;; Install automated scrubbing and snapshotting. + (service-extension mcron-service-type + zfs-mcron-jobs) + + ;; Install ZFS management commands in the system + ;; profile. + (service-extension profile-service-type + (compose list make-zfs-package)) + ;; Install ZFS udev rules. + (service-extension udev-service-type + (compose list make-zfs-package)))) + (description "Installs ZFS, an advanced filesystem and volume manager.= "))) base-commit: a939011b58c65f4192a10cde9e925e85702bacf4 -- 2.33.0 From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v5 3/3] gnu: Add ZFS service type. Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Oct 2021 13:19: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: zimoun Cc: Maxime Devos , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163464953226162 (code B ref 45692); Tue, 19 Oct 2021 13:19:01 +0000 Received: (at 45692) by debbugs.gnu.org; 19 Oct 2021 13:18:52 +0000 Received: from localhost ([127.0.0.1]:49853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcp0w-0006no-Ul for submit@debbugs.gnu.org; Tue, 19 Oct 2021 09:18:51 -0400 Received: from mail-40137.protonmail.ch ([185.70.40.137]:10307) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mcp0s-0006nX-Eb for 45692@debbugs.gnu.org; Tue, 19 Oct 2021 09:18:46 -0400 Date: Tue, 19 Oct 2021 13:18:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1634649513; bh=6wVwQ3KEXeE9N2sRzODZ8AuAmD5DiUS83+OrZ/16Py0=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=p4tL68UWmDclkIMicwXvy9IztHgvtn8l8Xr2u/eUg7DJvD234K3HznXocaUsM/ulo wHej2kfZeJKnAlhqIJggFdwZFrkiC5jA5BkAWXF6U7NC++J+jC/0XSTrYZnOsXmL63 /B0Oa77A+LESf/0Eq97/Y6fQ3OONiRaalDOWMFio= From: raid5atemyhomework Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FREEMAIL_REPLYTO 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: 3.0 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: ***BUMP*** > Sorry for the lateness everyone. > > Hope this one gets reviewed and merged. > > > > From 3803e046566278fe12d64f6e39564e960 [...] Content analysis details: (3.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [185.70.40.137 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raid5atemyhomework[at]protonmail.com) 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: liltechdude.xyz (xyz)] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 1.0 FREEMAIL_REPLYTO Reply-To/From or Reply-To/body contain different freemails 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) ***BUMP*** > Sorry for the lateness everyone. > > Hope this one gets reviewed and merged. > > -------------------------------------------------------------------------= - > > From 3803e046566278fe12d64f6e39564e9602bf434d Mon Sep 17 00:00:00 2001 > From: raid5atemyhomework raid5atemyhomework@protonmail.com > Date: Thu, 30 Sep 2021 16:58:46 +0800 > Subject: [PATCH] gnu: Add ZFS service type. > > - gnu/services/file-systems.scm: New file. > > - gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > > - gnu/services/base.scm: Export dependency->shepherd-service-name. > > - doc/guix.texi (ZFS File System): New subsection. > > > doc/guix.texi | 351 ++++++++++++++++++++++++++++++++ > gnu/local.mk | 2 + > gnu/services/base.scm | 4 +- > gnu/services/file-systems.scm | 363 ++++++++++++++++++++++++++++++++++ > 4 files changed, 719 insertions(+), 1 deletion(-) > create mode 100644 gnu/services/file-systems.scm > > diff --git a/doc/guix.texi b/doc/guix.texi > index a72a726b54..dd38103953 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -97,6 +97,7 @@ Copyright @copyright{} 2021 Hui Lu@* > Copyright @copyright{} 2021 pukkamustard@* > Copyright @copyright{} 2021 Alice Brenon@* > Copyright @copyright{} 2021 Andrew Tropin@* > +Copyright @copyright{} 2021 raid5atemyhomework@* > > Permission is granted to copy, distribute and/or modify this document > under the terms of the GNU Free Documentation License, Version 1.3 or > @@ -14435,6 +14436,356 @@ a file system declaration such as: > compress-force=3Dzstd,space_cache=3Dv2")) > @end lisp > > + > +@node ZFS File System > +@subsection ZFS File System > + > +Support for ZFS file systems in Guix is based on the OpenZFS project. > +OpenZFS currently only supports Linux-Libre and is not available on the > +Hurd. > + > +OpenZFS is free software; unfortunately its license is incompatible with > +the GNU General Public License (GPL), the license of the Linux kernel, > +which means they cannot be distributed together. However, as a user, > +you can choose to build ZFS and use it together with Linux; you can > +even rely on Guix to automate this task. See > +@uref{https://www.fsf.org/licensing/zfs-and-linux, this analysis by > +the Free Software Foundation} for more information. > + > +As a large and complex kernel module, OpenZFS has to be compiled for a > +specific version of Linux-Libre. At times, the latest OpenZFS package > +available in Guix is not compatible with the latest Linux-Libre version. > +Thus, directly installing the @code{zfs} package can fail. > + > +Instead, you are recommended to select a specific older long-term-suppor= t > +Linux-Libre kernel. Do not use @code{linux-libre-lts}, as even the > +latest long-term-support kernel may be too new for @code{zfs}. Instead, > +explicitly select a specific older version, such as @code{linux-libre-5.= 10}, > +and upgrade it manually later as new long-term-support kernels become > +available that you have confirmed is compatible with the latest availabl= e > +OpenZFS version on Guix. > + > +For example, you can modify your system configuration file to a specific > +Linux-Libre version and add the @code{zfs-service-type} service. > + > +@lisp > +(use-modules (gnu)) > +(use-package-modules > > - #;@dots{} > - linux) > +(use-service-modules > > - #;@dots{} > - file-systems) > - > > +(define my-kernel linux-libre-5.10) > + > +(operating-system > > - (kernel my-kernel) > - #;@dots{} > - (services > - (cons* (service zfs-service-type > - (zfs-configuration > > > - (kernel my-kernel))) > > > - #;@dots{} > > > - %desktop-services)) > > > - #;@dots{}) > +@end lisp > > - > > +@defvr {Scheme Variable} zfs-service-type > +This is the type for a service that adds ZFS support to your operating > +system. The service is configured using a @code{zfs-configuration} > +record. > + > +Here is an example use: > + > +@lisp > +(service zfs-service-type > > - (zfs-configuration > - (kernel linux-libre-5.4))) > +@end lisp > +@end defvr > > - > > +@deftp {Data Type} zfs-configuration > +This data type represents the configuration of the ZFS support in Guix > +System. Its fields are: > + > +@table @asis > +@item @code{kernel} > +The package of the Linux-Libre kernel to compile OpenZFS for. This field > +is always required. It @emph{must} be the same kernel you use in your > +@code{operating-system} form. > + > +@item @code{base-zfs} (default: @code{zfs}) > +The OpenZFS package that will be compiled for the given Linux-Libre kern= el. > + > +@item @code{base-zfs-auto-snapshot} (default: @code{zfs-auto-snapshot}) > +The @code{zfs-auto-snapshot} package to use. It will be modified to > +specifically use the OpenZFS compiled for your kernel. > + > +@item @code{dependencies} (default: @code{'()}) > +A list of @code{} or @code{} records that mu= st > +be mounted or opened before OpenZFS scans for pools to import. For examp= le, > +if you have set up LUKS containers as leaf VDEVs in a pool, you have to > +include their corresponding @code{} records so that Open= ZFS > +can import the pool correctly at bootup. > + > +@item @code{auto-mount?} (default: @code{#t}) > +Whether to mount datasets with the ZFS @code{mountpoint} property automa= tically > +at startup. This is the behavior that ZFS users usually expect. You migh= t > +set this to @code{#f} for an operating system intended as a `rescue'' sy= stem +that is intended to help debug problems with the disks rather than ac= tually +work in production. + +@item @code{auto-scrub} (default: @code{'wee= kly}) +Specifies how often to scrub all pools. Can be the symbols @code{'we= ekly} or +@code{'monthly}, or a schedule specification understood by +@xref= {mcron, mcron job specifications,, mcron, GNU@tie{}mcron}, such as +@code{"= 0 3 * * 6"} for`every 3AM on Saturday''. > +It can also be @code{#f} to disable auto-scrubbing (@strong{not recommen= ded}). > + > +The general guideline is to scrub weekly when using consumer-quality dri= ves, and > +to scrub monthly when using enterprise-quality drives. > + > +@code{'weekly} scrubs are done on Sunday midnight, while @code{monthly} = scrubs > +are done on midnight on the first day of each month. > + > +@item @code{auto-snapshot?} (default: @code{#t}) > +Specifies whether to auto-snapshot by default. If @code{#t}, then snapsh= ots > +are automatically created except for ZFS datasets with the > +@code{com.sun:auto-snapshot} ZFS vendor property set to @code{false}. > + > +If @code{#f}, snapshots will not be automatically created, unless the ZF= S > +dataset has the @code{com.sun:auto-snapshot} ZFS vendor property set to > +@code{true}. > + > +@item @code{auto-snapshot-keep} (default: @code{'()}) > +Specifies an association list of symbol-number pairs, indicating the num= ber > +of automatically-created snapshots to retain for each frequency type. > + > +If not specified via this field, by default there are 4 @code{frequent},= 24 > +@code{hourly}, 31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly} s= napshots. > + > +For example: > + > +@lisp > +(zfs-configuration > > - (kernel my-kernel) > - (auto-snapshot-keep > - '((frequent . 8) > - (hourly . 12)))) > > > > +@end lisp > + > +The above will keep 8 @code{frequent} snapshots and 12 @code{hourly} sna= pshots. > +@code{daily}, @code{weekly}, and @code{monthly} snapshots will keep thei= r > +defaults (31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly}). > + > +@end table > +@end deftp > + > +@subsubsection ZFS Auto-Snapshot > + > +The ZFS service on Guix System supports auto-snapshots as implemented in= the > +Solaris operating system. > + > +@code{frequent} (every 15 minutes), @code{hourly}, @code{daily}, @code{w= eekly}, > +and @code{monthly} snapshots are created automatically for ZFS datasets = that > +have auto-snapshot enabled. They will be named, for example, > +@code{zfs-auto-snap_frequent-2021-03-22-1415}. You can continue to use > +manually-created snapshots as long as they do not conflict with the nami= ng > +convention used by auto-snapshot. You can also safely manually destroy > +automatically-created snapshots, for example to free up space. > + > +The @code{com.sun:auto-snapshot} ZFS property controls auto-snapshot on = a > +per-dataset level. Sub-datasets will inherit this property from their pa= rent > +dataset, but can have their own property. > + > +You @emph{must} set this property to @code{true} or @code{false} exactly= , > +otherwise it will be treated as if the property is unset. > + > +For example: > + > +@example > +# zfs list -o name > +NAME > +tank > +tank/important-data > +tank/tmp > +# zfs set com.sun:auto-snapshot=3Dtrue tank > +# zfs set com.sun:auto-snapshot=3Dfalse tank/tmp > +@end example > + > +The above will set @code{tank} and @code{tank/important-data} to be > +auto-snapshot, while @code{tank/tmp} will not be auto-snapshot. > + > +If the @code{com.sun:auto-snapshot} property is not set for a dataset > +(the default when pools and datasets are created), then whether > +auto-snapshot is done or not will depend on the @code{auto-snapshot?} > +field of the @code{zfs-configuration} record. > + > +There are also @code{com.sun:auto-snapshot:frequent}, > +@code{com.sun:auto-snapshot:hourly}, @code{com.sun:auto-snapshot:daily}, > +@code{com.sun:auto-snapshot:weekly}, and @code{com.sun:auto-snapshot:mon= thly} > +properties that give finer-grained control of whether to auto-snapshot a > +dataset at a particular schedule. > + > +The number of snapshots kept for all datasets can be overridden via the > +@code{auto-snapshot-keep} field of the @code{zfs-configuration} record. > +There is currently no support to have different numbers of snapshots to > +keep for different datasets. > + > +@subsubsection ZVOLs > + > +ZFS supports ZVOLs, block devices that ZFS exposes to the operating > +system in the @code{/dev/zvol/} directory. The ZVOL will have the same > +resilience and self-healing properties as other datasets on your ZFS poo= l. > +ZVOLs can also be snapshotted (and will be included in auto-snapshotting > +if enabled), which snapshots the state of the block device, effectively > +snapshotting the hosted file system. > + > +You can put any file system inside the ZVOL. However, in order to mount = this > +file system at system start, you need to add @code{%zfs-zvol-dependency}= as a > +dependency of each file system inside a ZVOL. > + > +@defvr {Scheme Variable} %zfs-zvol-dependency > +An artificial @code{} which tells the file system mountin= g > +service to wait for ZFS to provide ZVOLs before mounting the > +@code{} dependent on it. > +@end defvr > + > +For example, suppose you create a ZVOL and put an ext4 filesystem > +inside it: > + > +@example > +# zfs create -V 100G tank/ext4-on-zfs > +# mkfs.ext4 /dev/zvol/tank/ext4-on-zfs > +# mkdir /ext4-on-zfs > +# mount /dev/zvol/tank/ext4-on-zfs /ext4-on-zfs > +@end example > + > +You can then set this up to be mounted at boot by adding this to the > +@code{file-systems} field of your @code{operating-system} record: > + > +@lisp > +(file-system > > - (device "/dev/zvol/tank/ext4-on-zfs") > - (mount-point "/ext4-on-zfs") > - (type "ext4") > - (dependencies (list %zfs-zvol-dependency))) > +@end lisp > > - > > +You @emph{must not} add @code{%zfs-zvol-dependency} to your > +@code{operating-system}'s @code{mapped-devices} field, and you @emph{mus= t > +not} add it (or any @code{}s dependent on it) to the > +@code{dependencies} field of @code{zfs-configuration}. Finally, you > +@emph{must not} use @code{%zfs-zvol-dependency} unless you actually > +instantiate @code{zfs-service-type} on your system. > + > +@subsubsection Unsupported Features > + > +Some common features and uses of ZFS are currently not supported, or not > +fully supported, on Guix. > + > +@enumerate > +@item > +Shepherd-managed daemons that are configured to read from or write to ZF= S > +mountpoints need to include @code{user-processes} in their @code{require= ment} > +field. This is the earliest that ZFS file systems are assured of being > +mounted. > + > +Generally, most daemons will, directly or indirectly, require > +@code{networking}, or @code{user-processes}, or both. Most implementatio= ns > +of @code{networking} will also require @code{user-processes} so daemons = that > +require only @code{networking} will also generally start up after > +@code{user-processes}. A notable exception, however, is > +@code{static-networking-service-type}. You will need to explicitly add > +@code{user-processes} as a @code{requirement} of your @code{static-netwo= rking} > +record. > + > +@item > +@code{mountpoint=3Dlegacy} ZFS file systems. The handlers for the Guix m= ounting > +system have not yet been modified to support ZFS, and will expect @code{= /dev} > +paths in the @code{}'s @code{device} field, but ZFS file sy= stems > +are referred to via non-path @code{pool/file/system} names. Such file sy= stems > +also need to be mounted @emph{after} OpenZFS has scanned for pools. > + > +You can still manually mount these file systems after system boot; what = is > +only unsupported is mounting them automatically at system boot by specif= ying > +them in @code{} records of your @code{operating-system}. > > - > > +@item > +@code{/home} on ZFS. Guix will create home directories for users, but th= is > +process currently cannot be scheduled after ZFS file systems are mounted= . > +Thus, the ZFS file system might be mounted @emph{after} Guix has created > +home directories at boot, at which point OpenZFS will refuse to mount si= nce > +the mountpoint is not empty. However, you @emph{can} create an ext4, xfs= , > +btrfs, or other supported file system inside a ZVOL, have that depend on > +@code{%zfs-zvol-dependency}, and set it to mount on the @code{/home} > +directory; they will be scheduled to mount before the @code{user-homes} > +process. > + > +Similarly, other locations like @code{/var}, @code{/gnu/store} and so > +on cannot be reliably put in a ZFS file system, though they may be > +possible to create as other file systems inside ZVOL containers. > + > +@item > +@code{/} and @code{/boot} on ZFS. These require Guix to expose more of > +the @code{initrd} very early boot process to services. It also requires > +Guix to have the ability to explicitly load modules while still in > +@code{initrd} (currently kernel modules loaded by > +@code{kernel-module-loader-service-type} are loaded after @code{/} is > +mounted). Further, since one of ZFS's main advantages is that it can > +continue working despite the loss of one or more devices, it makes sense > +to also support installing the bootloader on all devices of the pool tha= t > +contains the @code{/} and @code{/boot}; after all, if ZFS can survive th= e > +loss of one device, the bootloader should also be able to survive the lo= ss > +of one device. > + > +@item > +ZVOL swap devices. Mapped swap devices need to be listed in > +@code{mapped-devices} to ensure they are opened before the system attemp= ts > +to use them, but you cannot currently add @code{%zfs-zvol-dependency} to > +@code{mapped-devices}. > + > +This will also require significant amounts of testing, as various kernel > +build options and patches may affect how swapping works, which are possi= bly > +different on Guix System compared to other distributions that this featu= re is > +known to work on. > + > +@item > +ZFS Event Daemon. Support for this has not been written yet, patches are > +welcome. The main issue is how to design this in a Guix style while > +supporting legacy shell-script styles as well. In particular, OpenZFS it= self > +comes with a number of shell scripts intended for ZFS Event Daemon, and = we > +need to figure out how the user can choose to use or not use the provide= d > +scripts (and configure any settings they have) or override with their ow= n > +custom code (which could be shell scripts they have written and trusted = from > +previous ZFS installations). > + > +As-is, you can create your own service that activates the ZFS Event Daem= on > +by creating the @file{/etc/zfs/zed} directory and filling it appropriate= ly, > +then launching @code{zed}. > + > +@item > +@file{/etc/zfs/zpool.cache}. Currently the ZFS support on Guix always fo= rces > +scanning of all devices at bootup to look for ZFS pools. For systems wit= h > +dozens or hundreds of storage devices, this can lead to slow bootup. One= issue > +is that tools should really not write to @code{/etc} which is supposed t= o be for > +configuration; possibly it could be moved to @code{/var} instead. Anothe= r issue > +is that if Guix ever supports @code{/} on ZFS, we would need to somehow = keep the > +@code{zpool.cache} file inside the @code{initrd} up-to-date with what is= in the > +@code{/} mount point. > + > +@item > +@code{zfs share}. This will require some (unknown amount of) work to int= egrate > +into the Samba and NFS services of Guix. You @emph{can} manually set up = Samba > +and NFS to share any mounted ZFS datasets by setting up their configurat= ions > +properly; it just can't be done for you by @code{zfs share} and the > +@code{sharesmb} and @code{sharenfs} properties. > +@end enumerate > + > +Hopefully, support for the above only requires code to be written, and u= sers > +are encouraged to hack on Guix to implement the above features. > + > @node Mapped Devices > @section Mapped Devices > > diff --git a/gnu/local.mk b/gnu/local.mk > index d415b892e9..4147badd49 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -45,6 +45,7 @@ > > Copyright =C2=A9 2021 Sharlatan Hellseher sharlatanus@gmail.com > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > Copyright =C2=A9 2021 Dmitry Polyakov polyakov@liltechdude.xyz > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > > Copyright =C2=A9 2021 Andrew Tropin andrew@trop.in > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > +# Copyright =C2=A9 2021 raid5atemyhomework raid5atemyhomework@protonmail= .com > > =3D=3D > > This file is part of GNU Guix. > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > > =3D=3D > > @@ -633,6 +634,7 @@ GNU_SYSTEM_MODULES =3D \ > %D%/services/docker.scm \ > %D%/services/authentication.scm \ > %D%/services/file-sharing.scm \ > > - %D%/services/file-systems.scm \ > %D%/services/games.scm \ > %D%/services/ganeti.scm \ > %D%/services/getmail.scm \ > diff --git a/gnu/services/base.scm b/gnu/services/base.scm > index 50865055fe..d5d33aeada 100644 > --- a/gnu/services/base.scm > +++ b/gnu/services/base.scm > @@ -186,7 +186,9 @@ > > references-file > > > - %base-services)) > > > > - %base-services > > > - > - dependency->shepherd-service-name)) > > > > ;;; Commentary: > ;;; > diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.sc= m > new file mode 100644 > index 0000000000..867349c3a5 > --- /dev/null > +++ b/gnu/services/file-systems.scm > @@ -0,0 +1,363 @@ > +;;; GNU Guix --- Functional package management for GNU > +;;; Copyright =C2=A9 2021 raid5atemyhomework raid5atemyhomework@protonma= il.com > +;;; > +;;; This file is part of GNU Guix. > +;;; > +;;; GNU Guix is free software; you can redistribute it and/or modify it > +;;; under the terms of the GNU General Public License as published by > +;;; the Free Software Foundation; either version 3 of the License, or (a= t > +;;; your option) any later version. > +;;; > +;;; GNU Guix is distributed in the hope that it will be useful, but > +;;; WITHOUT ANY WARRANTY; without even the implied warranty of > +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +;;; GNU General Public License for more details. > +;;; > +;;; You should have received a copy of the GNU General Public License > +;;; along with GNU Guix. If not, see http://www.gnu.org/licenses/. > > - > > +(define-module (gnu services file-systems) > > - #:use-module (gnu packages file-systems) > - #:use-module (gnu services) > - #:use-module (gnu services base) > - #:use-module (gnu services linux) > - #:use-module (gnu services mcron) > - #:use-module (gnu services shepherd) > - #:use-module (gnu system mapped-devices) > - #:use-module (guix gexp) > - #:use-module (guix modules) > - #:use-module (guix packages) > - #:use-module (guix records) > - #:use-module (srfi srfi-1) > - #:export (zfs-service-type > - > - zfs-configuration > > > - zfs-configuration? > > > - zfs-configuration-kernel > > > - zfs-configuration-base-zfs > > > - zfs-configuration-base-zfs-auto-snapshot > > > - zfs-configuration-dependencies > > > - zfs-configuration-auto-mount? > > > - zfs-configuration-auto-scrub > > > - zfs-configuration-auto-snapshot? > > > - zfs-configuration-auto-snapshot-keep > > > - > - %zfs-zvol-dependency)) > > > - > > +(define-record-type* > > - zfs-configuration > > - make-zfs-configuration > > - zfs-configuration? > > - > - ;; linux-libre kernel you want to compile the base-zfs module for. > > - (kernel zfs-configuration-kernel) > > - > - ;; the OpenZFS package that will be modified to compile for the > > - ;; given kernel. > > - ;; Because it is modified and not the actual package that is used, > > - ;; we prepend the name 'base-'. > > - (base-zfs zfs-configuration-base-zfs > > - (default zfs)) > > > - > - ;; the zfs-auto-snapshot package that will be modified to compile > > - ;; for the given kernel. > > - ;; Because it is modified and not the actual package that is used, > > - ;; we prepend the name 'base-'. > > - (base-zfs-auto-snapshot zfs-configuration-base-zfs-auto-snapshot > > - (default zfs-auto-snapshot)) > > > - > - ;; list of or objects that must be > > - ;; opened/mounted before we import any ZFS pools. > > - (dependencies zfs-configuration-dependencies > > - (default '())) > > > - > - ;; #t to mount all mountable datasets by default. > > - ;; #f if not mounting. > > - ;; #t is the expected behavior on other operating systems, the > > - ;; #f is only supported for "rescue" operating systems where > > - ;; the user wants lower-level control of when to mount. > > - (auto-mount? zfs-configuration-auto-mount? > > - (default #t)) > > > - > - ;; 'weekly for weekly scrubbing, 'monthly for monthly scrubbing, an > > - ;; mcron time specification that can be given to `job`, or #f to > > - ;; disable. > > - (auto-scrub zfs-configuration-auto-scrub > > - (default 'weekly)) > > > - > - ;; #t to auto-snapshot by default (and `com.sun:auto-snapshot=3Dfalse= ` > > - ;; disables auto-snapshot per dataset), #f to not auto-snapshot > > - ;; by default (and `com.sun:auto-snapshot=3Dtrue` enables auto-snapsh= ot > > - ;; per dataset). > > - (auto-snapshot? zfs-configuration-auto-snapshot? > > - (default #t)) > > > - > - ;; association list of symbol-number pairs to indicate the number > > - ;; of automatic snapshots to keep for each of 'frequent, 'hourly, > > - ;; 'daily, 'weekly, and 'monthly. > > - ;; e.g. '((frequent . 8) (hourly . 12)) > > - (auto-snapshot-keep zfs-configuration-auto-snapshot-keep > > - (default '()))) > > > - > > +(define %default-auto-snapshot-keep > > - '((frequent . 4) > - (hourly . 24) > - (daily . 31) > - (weekly . 8) > - (monthly . 12))) > - > > +(define %auto-snapshot-mcron-schedule > > - '((frequent . "0,15,30,45 * * * *") > - (hourly . "0 * * * *") > - (daily . "0 0 * * *") > - (weekly . "0 0 * * 7") > - (monthly . "0 0 1 * *"))) > - > > +;; A synthetic and unusable MAPPED-DEVICE intended for use when > +;; the user has created a mountable filesystem inside a ZFS > +;; zvol and wants it mounted inside the configuration.scm. > +(define %zfs-zvol-dependency > > - (mapped-device > - (source '()) > - (targets '("zvol/*")) > - (type #f))) > - > > +(define (make-zfs-package conf) > > - "Creates a zfs package based on the given zfs-configuration. > - > - OpenZFS is a kernel package and to ensure best compatibility > - it should be compiled with the specific Linux-Libre kernel > - used on the system. This simply overrides the kernel used > - in compilation with that given in the configuration, which > - the user has to ensure is the same as in the operating-system." > - (let ((kernel (zfs-configuration-kernel conf)) > - (base-zfs (zfs-configuration-base-zfs conf))) > > > - (package > - (inherit base-zfs) > > > - (arguments (cons* #:linux kernel > > > - (package-arguments base-zfs)))))) > > > - > > +(define (make-zfs-auto-snapshot-package conf) > > - "Creates a zfs-auto-snapshot package based on the given > - zfs-configuration. > - > - Since the OpenZFS tools above are compiled to a specific > - kernel version, zfs-auto-snapshot --- which calls into the > - OpenZFS tools --- has to be compiled with the specific > - modified OpenZFS package created in the make-zfs-package > - procedure." > - (let ((zfs (make-zfs-package conf)) > - (base-zfs-auto-snapshot (zfs-configuration-base-zfs-auto-snaps= hot conf))) > > > - (package > - (inherit base-zfs-auto-snapshot) > > > - (inputs `(("zfs" ,zfs)))))) > > > - > > +(define (zfs-loadable-modules conf) > > - "Specifies that the specific 'module' output of the OpenZFS > - package is to be used; for use in indicating it as a > - loadable kernel module." > - (list (list (make-zfs-package conf) "module"))) > - > > +(define (zfs-shepherd-services conf) > > - "Constructs a list of Shepherd services that is installed > > - by the ZFS Guix service. > > - > - 'zfs-scan' scans all devices for ZFS pools, and makes them > > - available to 'zpool' commands. > > - 'device-mapping-zvol/' waits for /dev/zvol/ to be > > - populated by 'udev', and runs after 'zfs-scan'. > > - 'zfs-auto-mount' mounts all ZFS datasets with a 'mount' > > - property, which defaults to '/' followed by the name of > > - the dataset. > > - > - All the above behavior is expected by ZFS users from > > - typical ZFS installations. A mild difference is that > > - scanning is usually based on '/etc/zfs/zpool.cache' > > - instead of the 'scan all devices' used below, but that > > - file is questionable in Guix since ideally '/etc/' > > - files are modified by the sysad directly; > > - '/etc/zfs/zpool.cache' is modified by ZFS tools." > > - (let* ((zfs-package (make-zfs-package conf)) > > - (zpool (file-append zfs-package "/sbin/zpool")) > > > - (zfs (file-append zfs-package "/sbin/zfs")) > > > - (zvol_wait (file-append zfs-package "/bin/zvol_wait")) > > > - (scheme-modules `((srfi srfi-1) > > > - (srfi srfi-34) > > > - (srfi srfi-35) > > > - (rnrs io ports) > > > - ,@%default-modules))) > > > - (define zfs-scan > > - (shepherd-service > > > - (provision '(zfs-scan)) > > > - (requirement `(root-file-system > > > - kernel-module-loader > > > - udev > > > - ,@(map dependency->shepherd-service-name > > > - (zfs-configuration-dependencies conf)))) > > > - (documentation "Scans for and imports ZFS pools.") > > > - (modules scheme-modules) > > > - (start #~(lambda _ > > > - (guard (c ((message-condition? c) > > > - (format (current-error-port) > > > - "zfs: error importing pools: ~s~= %" > > > - (condition-message c)) > > > - #f)) > > > - ;; TODO: optionally use a cachefile. > > > - (invoke #$zpool "import" "-a" "-N")))) > > > - ;; Why not one-shot? Because we don't really want to rescan > > > - ;; this each time a requiring process is restarted, as scannin= g > > > - ;; can take a long time and a lot of I/O. > > > - (stop #~(const #f)))) > > > - > - (define device-mapping-zvol/* > > - (shepherd-service > > > - (provision '(device-mapping-zvol/*)) > > > - (requirement '(zfs-scan)) > > > - (documentation "Waits for all ZFS ZVOLs to be opened.") > > > - (modules scheme-modules) > > > - (start #~(lambda _ > > > - (guard (c ((message-condition? c) > > > - (format (current-error-port) > > > - "zfs: error opening zvols: ~s~%" > > > - (condition-message c)) > > > - #f)) > > > - (invoke #$zvol_wait)))) > > > - (stop #~(const #f)))) > > > - > - (define zfs-auto-mount > > - (shepherd-service > > > - (provision '(zfs-auto-mount)) > > > - (requirement '(zfs-scan)) > > > - (documentation "Mounts all non-legacy mounted ZFS filesystems.= ") > > > - (modules scheme-modules) > > > - (start #~(lambda _ > > > - (guard (c ((message-condition? c) > > > - (format (current-error-port) > > > - "zfs: error mounting file system= s: ~s~%" > > > - (condition-message c)) > > > - #f)) > > > - ;; 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/conso= le ? > > > - (with-output-to-port (current-error-port) > > > - (lambda () > > > - (invoke #$zfs "mount" "-a" "-l")))))) > > > - (stop #~(lambda _ > > > - ;; Make sure that Shepherd does not have a CWD that > > > - ;; is a mounted ZFS filesystem, which would prevent > > > - ;; unmounting. > > > - (chdir "/") > > > - (invoke #$zfs "unmount" "-a" "-f"))))) > > > - > - `(,zfs-scan > > - ,device-mapping-zvol/* > > > - ,@(if (zfs-configuration-auto-mount? conf) > > > - `(,zfs-auto-mount) > > > - '())))) > > > - > > +(define (zfs-user-processes conf) > > - "Provides the last Shepherd service that 'user-processes' has to > - wait for. > - > - If not auto-mounting, then user-processes should only wait for > - the device scan." > - (if (zfs-configuration-auto-mount? conf) > - '(zfs-auto-mount) > > > - '(zfs-scan))) > > > - > > +(define (zfs-mcron-auto-snapshot-jobs conf) > > - "Creates a list of mcron jobs for auto-snapshotting, one for each > > - of the standard durations." > > - (let* ((user-auto-snapshot-keep (zfs-configuration-auto-snapshot-keep= conf)) > > - ;; assoc-ref has earlier entries overriding later ones. > > > - (auto-snapshot-keep (append user-auto-snapshot-keep > > > - %default-auto-snapshot-= keep)) > > > - (auto-snapshot? (zfs-configuration-auto-snapsho= t? conf)) > > > - (zfs-auto-snapshot-package (make-zfs-auto-snapshot-package= conf)) > > > - (zfs-auto-snapshot (file-append zfs-auto-snapshot-= package > > > - "/sbin/zfs-auto-sn= apshot"))) > > > - (map > > - (lambda (label) > > > - (let ((keep (assoc-ref auto-snapshot-keep label)) > > > - (sched (assoc-ref %auto-snapshot-mcron-schedule label))= ) > > > - #~(job '#$sched > > > - (lambda () > > > - (system* #$zfs-auto-snapshot > > > - "--quiet" > > > - "--syslog" > > > - #$(string-append "--label=3D" > > > - (symbol->string label)) > > > - #$(string-append "--keep=3D" > > > - (number->string keep)) > > > - "//"))))) > > > - (map first %auto-snapshot-mcron-schedule)))) > > > - > > +(define (zfs-mcron-auto-scrub-jobs conf) > > - "Creates a list of mcron jobs for auto-scrubbing." > - (let* ((zfs-package (make-zfs-package conf)) > - (zpool (file-append zfs-package "/sbin/zpool")) > > > - (auto-scrub (zfs-configuration-auto-scrub conf)) > > > - (sched (cond > > > - ((eq? auto-scrub 'weekly) "0 0 * * 7") > > > - ((eq? auto-scrub 'monthly) "0 0 1 * *") > > > - (else auto-scrub)))) > > > - (define code > - ;; We need to get access to (guix build utils) for the > > > - ;; invoke procedures. > > > - (with-imported-modules (source-module-closure '((guix build util= s))) > > > - #~(begin > > > - (use-modules (guix build utils) > > > - (ice-9 ports)) > > > - ;; The ZFS pools in the system. > > > - (define pools > > > - (invoke/quiet #$zpool "list" "-o" "name" "-H")) > > > - ;; Only scrub if there are actual ZFS pools, as the > > > - ;; zpool scrub command errors out if given an empty > > > - ;; argument list. > > > - (unless (null? pools) > > > - ;; zpool scrub only initiates the scrub and otherwise > > > - ;; prints nothing. Results are always seen on the > > > - ;; zpool status command. > > > - (apply invoke #$zpool "scrub" pools))))) > > > - (list > - #~(job '#$sched > > > - #$(program-file "mcron-zfs-scrub.scm" code))))) > > > - > > +(define (zfs-mcron-jobs conf) > > - "Creates a list of mcron jobs for ZFS management." > - (append (zfs-mcron-auto-snapshot-jobs conf) > - (if (zfs-configuration-auto-scrub conf) > > > - (zfs-mcron-auto-scrub-jobs conf) > > > - '()))) > > > - > > +(define zfs-service-type > > - (service-type > - (name 'zfs) > - (extensions > - (list ;; Install OpenZFS kernel module into kernel profile. > > > - (service-extension linux-loadable-module-service-type > > > - zfs-loadable-modules) > > > - ;; And load it. > > > - (service-extension kernel-module-loader-service-type > > > - (const '("zfs"))) > > > - ;; Make sure ZFS pools and datasets are mounted at > > > - ;; boot. > > > - (service-extension shepherd-root-service-type > > > - zfs-shepherd-services) > > > - ;; Make sure user-processes don't start until > > > - ;; after ZFS does. > > > - (service-extension user-processes-service-type > > > - zfs-user-processes) > > > - ;; Install automated scrubbing and snapshotting. > > > - (service-extension mcron-service-type > > > - zfs-mcron-jobs) > > > - > - ;; Install ZFS management commands in the system > > > - ;; profile. > > > - (service-extension profile-service-type > > > - (compose list make-zfs-package)) > > > - ;; Install ZFS udev rules. > > > - (service-extension udev-service-type > > > - (compose list make-zfs-package)))) > > > - (description "Installs ZFS, an advanced filesystem and volume manager= ."))) > > base-commit: a939011b58c65f4192a10cde9e925e85702bacf4 > -- > 2.33.0 > From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v5 3/3] gnu: Add ZFS service type. Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Oct 2021 07:31: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: zimoun Cc: Maxime Devos , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16353198254429 (code B ref 45692); Wed, 27 Oct 2021 07:31:01 +0000 Received: (at 45692) by debbugs.gnu.org; 27 Oct 2021 07:30:25 +0000 Received: from localhost ([127.0.0.1]:48310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfdOD-00019N-3g for submit@debbugs.gnu.org; Wed, 27 Oct 2021 03:30:25 -0400 Received: from mail-40130.protonmail.ch ([185.70.40.130]:13686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mfdO9-000193-0C for 45692@debbugs.gnu.org; Wed, 27 Oct 2021 03:30:23 -0400 Date: Wed, 27 Oct 2021 07:30:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1635319814; bh=nzOCs27vWywui0mVvLbnUBU2IBoWp7Tp/ZDc+TYrADI=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=vPrReMBQiSBnbzBQQUhwCY8pljPuUJutuH9r87kEhWGRxX9iF4URcGcrWE8pTAyu2 MQLDm3SOUPzAKJP3nuuukz2waCGkbFmmYtsgbgYsnjDDdxbCWHagV6TIT8pA0VdxwM DCePYJDE2LsHtA8LCRdWtEsCR3fSkeYMBXErPDqw= From: raid5atemyhomework Message-ID: In-Reply-To: References: 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) WHEEEEEEEEEEEEEEEEEEEE ***BUMP*** From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v5 3/3] gnu: Add ZFS service type. Resent-From: "pelzflorian (Florian Pelz)" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Oct 2021 16:39: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: raid5atemyhomework Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org>, Maxime Devos , zimoun Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163535272320379 (code B ref 45692); Wed, 27 Oct 2021 16:39:01 +0000 Received: (at 45692) by debbugs.gnu.org; 27 Oct 2021 16:38:43 +0000 Received: from localhost ([127.0.0.1]:50428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mflwo-0005Id-Tm for submit@debbugs.gnu.org; Wed, 27 Oct 2021 12:38:43 -0400 Received: from pelzflorian.de ([5.45.111.108]:42348 helo=mail.pelzflorian.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mflwl-0005IR-TU for 45692@debbugs.gnu.org; Wed, 27 Oct 2021 12:38:41 -0400 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id 8B5403606B3; Wed, 27 Oct 2021 18:38:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=pelzflorian.de; s=mail; t=1635352718; bh=aX/GIbOUWVRiOroIcs9HHaXY91efV0TZueQ/2s8nuag=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=uBZmHKhq6YLPZyeFgviZdpgnZFDtv9RtQJgqlWyJHExrhwE5SfWZdvoIsvTNMCxMR lFkNmxE9jqkDk0UzpUUmWWsJXRYaLqpEMn1tefhch8sKc0VQmGHDA6C63u+NzuaOR2 9OIb5o500AZNmof4F5x9LEXH/Q+2bKjfwDwVrqMI= Date: Wed, 27 Oct 2021 18:38:27 +0200 From: "pelzflorian (Florian Pelz)" Message-ID: <20211027163827.4olhr3ks5s4sxkzp@pelzflorian.localdomain> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Score: 0.0 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Wed, Oct 27, 2021 at 07:30:11AM +0000, raid5atemyhomework via Guix-patches via wrote: > WHEEEEEEEEEEEEEEEEEEEE ***BUMP*** I’m sorry it takes so long (I’m not qualified to review), but please note that Maxime’s e-mail setup broke down: https://lists.gnu.org/archive/html/guix-devel/2021-10/msg00057.html Regards, Florian From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v5 3/3] gnu: Add ZFS service type. Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 30 Nov 2021 15:28: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: "pelzflorian (Florian Pelz)" Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org>, Maxime Devos , zimoun Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163828602529702 (code B ref 45692); Tue, 30 Nov 2021 15:28:01 +0000 Received: (at 45692) by debbugs.gnu.org; 30 Nov 2021 15:27:05 +0000 Received: from localhost ([127.0.0.1]:42153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ms529-0007j0-Ig for submit@debbugs.gnu.org; Tue, 30 Nov 2021 10:27:05 -0500 Received: from mail-40132.protonmail.ch ([185.70.40.132]:34515) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ms526-0007iU-Ru for 45692@debbugs.gnu.org; Tue, 30 Nov 2021 10:27:04 -0500 Date: Tue, 30 Nov 2021 15:26:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1638286016; bh=Wjv18e/LJDdd5gE2aR3bFH+U5phJEojOhzYuoUbivcM=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=AQsbVS35bygnsWNDz1LLmWDYZCm+GPshb9EtAhhW8wnPalAGwVciI8Vb548AirSJD jRxfuRfBCeE/cmGLlJNhPv5owLEBB5MTk4WpLqYl2ONXhlOU7BpL5goTtyDXsBaERJ KP6hEIyVxW0vmjkFr0UwAiYZm9ep31kUMWfI6m2E= From: raid5atemyhomework Message-ID: <5YZ8GHQ55G_bk1ENRQbMKQT2bZq1jeplfowx_SukADa1rur5xYROOvtIFQRgmnahZ-mhXsy26cgvMhpAdHavnEGbmkeSH_jS54qn0EY5Ajk=@protonmail.com> In-Reply-To: <20211027163827.4olhr3ks5s4sxkzp@pelzflorian.localdomain> References: <20211027163827.4olhr3ks5s4sxkzp@pelzflorian.localdomain> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dear Santa, For Christmas, I would like to have a reviewer for my patch. I have been very good this year. I have been regularly scrubbing my ZFS po= ol every week and I keep monthly backups of my homework now. And, I don't = store my homework on broken RAID5 implementations anymore. Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH v5 3/3] gnu: Add ZFS service type. Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Dec 2021 13:33: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.163931593916850 (code B ref 45692); Sun, 12 Dec 2021 13:33:02 +0000 Received: (at 45692) by debbugs.gnu.org; 12 Dec 2021 13:32:19 +0000 Received: from localhost ([127.0.0.1]:50951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwOxe-0004Ni-RB for submit@debbugs.gnu.org; Sun, 12 Dec 2021 08:32:18 -0500 Received: from mail-4318.protonmail.ch ([185.70.43.18]:11727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwOxc-0004NV-Uk for 45692@debbugs.gnu.org; Sun, 12 Dec 2021 08:32:17 -0500 Date: Sun, 12 Dec 2021 13:32:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1639315930; bh=k5m/GASK4XaFyw1pbV9EsCQlw/iN+X49p+NU/im/yKY=; h=Date:To:From:Reply-To:Subject:Message-ID:In-Reply-To:References: From:To:Cc; b=StMhVqruiJIC8M01OyThsUeVOHu3nBG3MBYCmoBrgijDbNNqEjUvfrASxfCVCMS0m DbFHlUTblsM9g61pgygqfwrmZzDc3STVDIvjakmgdRXoq3zcjsLkpjeGSrCuBYPD76 Z7by8MA5jPs+QizoBHTTpqeH26RW5HZxPdO//pJFpGcRZMvMIG25fhdXeK+PKEfvn2 OKYVem9mOc2q1Hq9sWvadvvC6b0K4/mBOzJUFqNl59ajb8AJvUQdRubdcbkyKY7lbo INHdcdGotCIsSxaHGJ73hoLRd7bleuSp4hdrQZJ29YZ5G/oK2vzAcIvHO4ILVScobi 86ZiptHG4rrBQ== From: raid5atemyhomework Message-ID: <4upTXOeFpR-H8kfsj1uM6oBw46bW6rM6M20RHB7BsK2ksa4HIzrYqrF-PgUeuUqVeYuO8rbdjTzsvSBmkTVS6dsQx70dYqy61oc1Q6AVIW0=@protonmail.com> In-Reply-To: <5YZ8GHQ55G_bk1ENRQbMKQT2bZq1jeplfowx_SukADa1rur5xYROOvtIFQRgmnahZ-mhXsy26cgvMhpAdHavnEGbmkeSH_jS54qn0EY5Ajk=@protonmail.com> References: <20211027163827.4olhr3ks5s4sxkzp@pelzflorian.localdomain> <5YZ8GHQ55G_bk1ENRQbMKQT2bZq1jeplfowx_SukADa1rur5xYROOvtIFQRgmnahZ-mhXsy26cgvMhpAdHavnEGbmkeSH_jS54qn0EY5Ajk=@protonmail.com> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) **BUMP** Come on, last patch, please? If you are worried about not knowing anything about ZFS, please see this, w= hich I used as reference: https://github.com/openzfs/zfs/discussions/11453 Otherwise, really, all I need to get reviewed is if the code is Guix-y enou= gh to merge in. I believe all the Scheme style guidelines are followed correctly at this po= int. Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] bug#45643: [PATCH 0/3] Better Support for ZFS on Guix Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Dec 2021 21:16: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: raid5atemyhomework Cc: 45643@debbugs.gnu.org, "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.164012132213132 (code B ref 45692); Tue, 21 Dec 2021 21:16:01 +0000 Received: (at 45692) by debbugs.gnu.org; 21 Dec 2021 21:15:22 +0000 Received: from localhost ([127.0.0.1]:55856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzmTi-0003Pf-0Z for submit@debbugs.gnu.org; Tue, 21 Dec 2021 16:15:22 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:46325) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzmTc-0003PF-TU; Tue, 21 Dec 2021 16:15:20 -0500 Received: (Authenticated sender: brice@waegenei.re) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 8F8BDE000B; Tue, 21 Dec 2021 21:15:09 +0000 (UTC) From: Brice Waegeneire References: <20211027163827.4olhr3ks5s4sxkzp@pelzflorian.localdomain> <5YZ8GHQ55G_bk1ENRQbMKQT2bZq1jeplfowx_SukADa1rur5xYROOvtIFQRgmnahZ-mhXsy26cgvMhpAdHavnEGbmkeSH_jS54qn0EY5Ajk=@protonmail.com> <4upTXOeFpR-H8kfsj1uM6oBw46bW6rM6M20RHB7BsK2ksa4HIzrYqrF-PgUeuUqVeYuO8rbdjTzsvSBmkTVS6dsQx70dYqy61oc1Q6AVIW0=@protonmail.com> Date: Tue, 21 Dec 2021 22:15:06 +0100 In-Reply-To: <4upTXOeFpR-H8kfsj1uM6oBw46bW6rM6M20RHB7BsK2ksa4HIzrYqrF-PgUeuUqVeYuO8rbdjTzsvSBmkTVS6dsQx70dYqy61oc1Q6AVIW0=@protonmail.com> (raid5atemyhomework@protonmail.com's message of "Sun, 12 Dec 2021 13:32:05 +0000") Message-ID: <87lf0dd5id.fsf_-_@waegenei.re> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Hello raid5atemyhomework, During the last months I had some issue swith BTRFS volumes, so I want to see if ZFS does better in this cases. raid5atemyhomework writes: > **BUMP** > > Come on, last patch, please? I'll try to review your last patch set in the comming weeks, I can't promise anything tho but don't do ping me if I take too long. > If you are worried about not knowing anything about ZFS, please see this, > which I used as reference: https://github.com/openzfs/zfs/discussions/11453 Indeed that's my case, thank your for the ressource. > Otherwise, really, all I need to get reviewed is if the code is Guix-y enough to merge in. > I believe all the Scheme style guidelines are followed correctly at this point. > > Thanks > raid5atemyhomework Cheers, - Brice From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] bug#45643: [PATCH 0/3] Better Support for ZFS on Guix Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 01 Jan 2022 12:00:03 +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: Brice Waegeneire Cc: "45643@debbugs.gnu.org" <45643@debbugs.gnu.org>, "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16410383563969 (code B ref 45692); Sat, 01 Jan 2022 12:00:03 +0000 Received: (at 45692) by debbugs.gnu.org; 1 Jan 2022 11:59:16 +0000 Received: from localhost ([127.0.0.1]:57852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3d2Z-00011v-Nx for submit@debbugs.gnu.org; Sat, 01 Jan 2022 06:59:15 -0500 Received: from mail-40137.protonmail.ch ([185.70.40.137]:20137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3d2X-00011a-CF for 45692@debbugs.gnu.org; Sat, 01 Jan 2022 06:59:14 -0500 Date: Sat, 01 Jan 2022 11:59:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1641038347; bh=yT1rZRSCrDcxQzGZkCT5DrdRcsVT0XBgsgCb8qgk378=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc; b=twNyMyvaX7wIhkdIK9z6o+uC/TXeXaQzu5yVf8PMYNEeoRVbUZkbx8giAimsuds7Q LY3jexeO74id2eCwtEWrbFOmPH0WR9UEIFNQxntF9A/VRNAR24Vnn27/yH/+Ty3to2 9JIu2pQhBjvKeLR/6eE3ZwAhBO9GgPjlmFltwhemGsSoGf4TB5+5LBcKTgX8hEAtKz bIrjDKUDivry2ZZCh77i1LxNm9yq//PH2d/1i57SxUwLzetHzSIYjcrpUfbvNNeOyH KQbyJXX0atiMSuzhgOGCbyULy+n4zxryAIf1PbAlybZkL96epx2KagIiEEQHnurHhr Ikq79F8eg14mA== From: raid5atemyhomework Message-ID: In-Reply-To: <87lf0dd5id.fsf_-_@waegenei.re> References: <20211027163827.4olhr3ks5s4sxkzp@pelzflorian.localdomain> <5YZ8GHQ55G_bk1ENRQbMKQT2bZq1jeplfowx_SukADa1rur5xYROOvtIFQRgmnahZ-mhXsy26cgvMhpAdHavnEGbmkeSH_jS54qn0EY5Ajk=@protonmail.com> <4upTXOeFpR-H8kfsj1uM6oBw46bW6rM6M20RHB7BsK2ksa4HIzrYqrF-PgUeuUqVeYuO8rbdjTzsvSBmkTVS6dsQx70dYqy61oc1Q6AVIW0=@protonmail.com> <87lf0dd5id.fsf_-_@waegenei.re> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Thanks Santa! > Hello raid5atemyhomework, > > During the last months I had some issue swith BTRFS volumes, so I want to= see if > ZFS does better in this cases. > > raid5atemyhomework raid5atemyhomework@protonmail.com writes: > > > BUMP > > Come on, last patch, please? > > I'll try to review your last patch set in the comming weeks, I can't prom= ise > anything tho but don't do ping me if I take too long. > > > If you are worried about not knowing anything about ZFS, please see thi= s, > > which I used as reference: https://github.com/openzfs/zfs/discussions/1= 1453 > > Indeed that's my case, thank your for the ressource. > > > Otherwise, really, all I need to get reviewed is if the code is Guix-y = enough to merge in. > > I believe all the Scheme style guidelines are followed correctly at thi= s point. > > Thanks > > raid5atemyhomework > > Cheers, > > - Brice From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/3] Better Support for ZFS on Guix References: In-Reply-To: Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 Jan 2022 04: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 Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16415293283698 (code B ref 45692); Fri, 07 Jan 2022 04:23:02 +0000 Received: (at 45692) by debbugs.gnu.org; 7 Jan 2022 04:22:08 +0000 Received: from localhost ([127.0.0.1]:42773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5glT-0000xZ-R5 for submit@debbugs.gnu.org; Thu, 06 Jan 2022 23:22:07 -0500 Received: from mail-4324.protonmail.ch ([185.70.43.24]:14959) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5glR-0000wv-12 for 45692@debbugs.gnu.org; Thu, 06 Jan 2022 23:22:06 -0500 Date: Fri, 07 Jan 2022 04:21:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1641529318; bh=o+wegw2QhuC19d0lminJ+5VkMSKRPCWu/grX+ohqBnE=; h=Date:From:Cc:Reply-To:Subject:Message-ID:From:To:Cc; b=V7YR/2/zWZw+Np6fEFzkt4x1feenuuTyL5LTVQ9He7cd8MFsmC9abAwCouEv89xDy HeEX/rG8gFbdrwJK6qk/Prty6pD5EjhyAoEtAvqcLakJy4aWEX+q5PJHvTMP4gpJFX rX9ppP5nudS9fUWUfqoKLSFdHGdpuZJnFwXI8dIaH8dp764zcQT+0VBY4SPLXmpZDO rddvmTYIP+rkgyAYPyhL9bPdBGp413h/WwCDLFTBc4ANZVacQRB7P49ZD+WvobaE9k yinQg9GUxlwhpo35UPH+3G9Vm8se2IpJam/O7GUcqMACsSAk7VG9M0ZLcdCKStpr+O in0iSuMq+4FZg== From: raid5atemyhomework Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=0.0 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,MISSING_HEADERS 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: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Happy birthday 45692! Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [185.70.43.24 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.2 MISSING_HEADERS Missing To: header -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raid5atemyhomework[at]protonmail.com) 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) Happy birthday 45692! From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] bug#45643: [PATCH 0/3] Better Support for ZFS on Guix Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 19 Jan 2022 14:26: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: Brice Waegeneire Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.164260230714187 (code B ref 45692); Wed, 19 Jan 2022 14:26:01 +0000 Received: (at 45692) by debbugs.gnu.org; 19 Jan 2022 14:25:07 +0000 Received: from localhost ([127.0.0.1]:53354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nABta-0003gl-Gf for submit@debbugs.gnu.org; Wed, 19 Jan 2022 09:25:06 -0500 Received: from mail-40140.protonmail.ch ([185.70.40.140]:28932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nABtV-0003gA-B6 for 45692@debbugs.gnu.org; Wed, 19 Jan 2022 09:25:05 -0500 Date: Wed, 19 Jan 2022 14:24:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1642602294; bh=c45gAWa61PZ5iImOJaj2asjsJBLfud8BWXcFrBcHTDw=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc; b=l7KUEuInacRDzPe4aRoj0IMGvgJpEA9ETtM5wkFXI6ZOPgO5CEk2VksLz2ABlkDG8 +tFvhG+flynMvxV5P7YBp6k0/ELPRAdTa3l3FCKH6jyMaEmEU4BnO4v80yJKgOWSdo jFS70c61h1UdRfaHRbe9GL5bJL/CL0T3KASBAumdssURKlwgjHwU7BJsK19uu5Vb0j EaVCOpLbQ4MzXlvY7OmwPgf+9U1j0M2itB60FOFzNBepWmyHhhpnSlynhVawc4Cvrf Gu35YqwZ6A3X9rV7UQJxQmqYCqYjK+UU3YCFCBUTpttS5X5WPGTuVK8WNiBigJ6czW la77hHYKmQ+BA== From: raid5atemyhomework Message-ID: In-Reply-To: References: <20211027163827.4olhr3ks5s4sxkzp@pelzflorian.localdomain> <5YZ8GHQ55G_bk1ENRQbMKQT2bZq1jeplfowx_SukADa1rur5xYROOvtIFQRgmnahZ-mhXsy26cgvMhpAdHavnEGbmkeSH_jS54qn0EY5Ajk=@protonmail.com> <4upTXOeFpR-H8kfsj1uM6oBw46bW6rM6M20RHB7BsK2ksa4HIzrYqrF-PgUeuUqVeYuO8rbdjTzsvSBmkTVS6dsQx70dYqy61oc1Q6AVIW0=@protonmail.com> <87lf0dd5id.fsf_-_@waegenei.re> 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-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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Brice, If all you want is to get ZFS working on a Guix system: https://www.reddit.= com/r/GUIX/comments/s7qu25/guide_using_zfs_on_guix/ Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/3] Better Support for ZFS on Guix Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 14 Feb 2022 14:11: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 Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.164484784110188 (code B ref 45692); Mon, 14 Feb 2022 14:11:02 +0000 Received: (at 45692) by debbugs.gnu.org; 14 Feb 2022 14:10:41 +0000 Received: from localhost ([127.0.0.1]:40366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJc3t-0002eF-3H for submit@debbugs.gnu.org; Mon, 14 Feb 2022 09:10:41 -0500 Received: from mail-40138.protonmail.ch ([185.70.40.138]:34818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJc3o-0002dy-KG for 45692@debbugs.gnu.org; Mon, 14 Feb 2022 09:10:39 -0500 Date: Mon, 14 Feb 2022 14:10:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1644847830; bh=pwYKT/nhnBO9sbCdsUibUhxqN3uKbyTwLMA+BDkBChk=; h=Date:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To:References: From:To:Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID; b=mQl/jlSl3fdPk8wVblVQnkdJCd+ke7VFsCgtb+ibGgIbTU6OARiiKhcwbKYmcobjk 7pMPGxApJUfgc7uJ4FKQCBQr7ql7jCA0P4bBXH3KXQNzHFU/dmiHc8cza2/PGqIieb 9P/giGQWTvsy6aizkQGVF1wfzrAX0BRQo7pBdC+Kf40BicPf7ucAYC7aRWK/1k8tYW 02YJeJKhzWeFOBcA+GfAsddY2RM/yeAxzsHuZyGpXMOEW1P8kEXbmbz28xxSn62USC sF0PLj/gi4MDI4pUp6krazKrTTdAQri7FQXZp3DYWmc6T6ZpSI1VXwPbZv0y5XsVWo YZYchCxvgwOng== From: raid5atemyhomework Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.0 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,MISSING_HEADERS, T_SCC_BODY_TEXT_LINE 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: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: BUMP Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.2 MISSING_HEADERS Missing To: header -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raid5atemyhomework[at]protonmail.com) -0.0 T_SCC_BODY_TEXT_LINE No description available. 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) BUMP From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/3] Better Support for ZFS on Guix Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Feb 2022 07:15: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 Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16451684623359 (code B ref 45692); Fri, 18 Feb 2022 07:15:02 +0000 Received: (at 45692) by debbugs.gnu.org; 18 Feb 2022 07:14:22 +0000 Received: from localhost ([127.0.0.1]:53270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKxTA-0000s4-E6 for submit@debbugs.gnu.org; Fri, 18 Feb 2022 02:14:21 -0500 Received: from mail-4324.protonmail.ch ([185.70.43.24]:20381) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKxT7-0000rp-8z for 45692@debbugs.gnu.org; Fri, 18 Feb 2022 02:14:19 -0500 Date: Fri, 18 Feb 2022 07:13:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1645168447; bh=vk0kTu/6oPJDXsa++NC0s0kzysSjCnRqGMdMQSp+QiY=; h=Date:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To:References: From:To:Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID; b=Nx/prN0QcSyFf98bV2q9nss+ORgndK0IoIh46TpD1WjMvMVgN0zmiRsspXH+coZGw bSbdmPvuSxt3QasQi9AoBs/PTmQPgN7qAFfBw1LahYvazDgg5xGYjxk0iHG2y73m6s lA/VcDps+9IAmLTzTqfYt3xkaFrFAxb5xB74H4E54+pWKmEN50d+KHc+EbVivSSnc9 d4CadxncWwStJUeLme/w9PGfB9ncbcGR6szB2lZTFV5m20zvaHfH/1z83JgC/3Qwfu /ew08Le++j2bp2TV5ufCp8ki5mPUcIOkkAw28a4QflwYTBr9u6Fl9IJsAQdMIa5km4 Ml2n9keHOPz9Q== From: raid5atemyhomework Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.0 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,MISSING_HEADERS, T_SCC_BODY_TEXT_LINE 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: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Modified so it applies cleanly to origin/master. PLEASE JUST REVIEW AND MERGE, WHAT IS THE PROBLEM HERE ANYWAY? --- Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.2 MISSING_HEADERS Missing To: header 0.0 RCVD_IN_MSPIKE_H5 RBL: Excellent reputation (+5) [185.70.43.24 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raid5atemyhomework[at]protonmail.com) 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 T_SCC_BODY_TEXT_LINE No description available. 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) Modified so it applies cleanly to origin/master. PLEASE JUST REVIEW AND MERGE, WHAT IS THE PROBLEM HERE ANYWAY? --- >From 9964668d93b496317c16c803f6d96bb3ace3560f Mon Sep 17 00:00:00 2001 From: raid5atemyhomework Date: Thu, 30 Sep 2021 16:58:46 +0800 Subject: [PATCH] gnu: Add ZFS service type. * gnu/services/file-systems.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/services/base.scm: Export dependency->shepherd-service-name. * doc/guix.texi (ZFS File System): New subsection. --- doc/guix.texi | 351 ++++++++++++++++++++++++++++++++ gnu/local.mk | 2 + gnu/services/base.scm | 4 +- gnu/services/file-systems.scm | 363 ++++++++++++++++++++++++++++++++++ 4 files changed, 719 insertions(+), 1 deletion(-) create mode 100644 gnu/services/file-systems.scm diff --git a/doc/guix.texi b/doc/guix.texi index c8bb484d94..65e60cd936 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -100,6 +100,7 @@ Copyright @copyright{} 2021 Josselin Poiret@* Copyright @copyright{} 2021 Andrew Tropin@* Copyright @copyright{} 2021 Sarah Morgensen@* Copyright @copyright{} 2021 Josselin Poiret@* +Copyright @copyright{} 2021 raid5atemyhomework@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -15594,6 +15595,356 @@ a file system declaration such as: compress-force=3Dzstd,space_cache=3Dv2")) @end lisp +@node ZFS File System +@subsection ZFS File System + +Support for ZFS file systems in Guix is based on the OpenZFS project. +OpenZFS currently only supports Linux-Libre and is not available on the +Hurd. + +OpenZFS is free software; unfortunately its license is incompatible with +the GNU General Public License (GPL), the license of the Linux kernel, +which means they cannot be distributed together. However, as a user, +you can choose to build ZFS and use it together with Linux; you can +even rely on Guix to automate this task. See +@uref{https://www.fsf.org/licensing/zfs-and-linux, this analysis by +the Free Software Foundation} for more information. + +As a large and complex kernel module, OpenZFS has to be compiled for a +specific version of Linux-Libre. At times, the latest OpenZFS package +available in Guix is not compatible with the latest Linux-Libre version. +Thus, directly installing the @code{zfs} package can fail. + +Instead, you are recommended to select a specific older long-term-support +Linux-Libre kernel. Do not use @code{linux-libre-lts}, as even the +latest long-term-support kernel may be too new for @code{zfs}. Instead, +explicitly select a specific older version, such as @code{linux-libre-5.10= }, +and upgrade it manually later as new long-term-support kernels become +available that you have confirmed is compatible with the latest available +OpenZFS version on Guix. + +For example, you can modify your system configuration file to a specific +Linux-Libre version and add the @code{zfs-service-type} service. + +@lisp +(use-modules (gnu)) +(use-package-modules + #;@dots{} + linux) +(use-service-modules + #;@dots{} + file-systems) + +(define my-kernel linux-libre-5.10) + +(operating-system + (kernel my-kernel) + #;@dots{} + (services + (cons* (service zfs-service-type + (zfs-configuration + (kernel my-kernel))) + #;@dots{} + %desktop-services)) + #;@dots{}) +@end lisp + +@defvr {Scheme Variable} zfs-service-type +This is the type for a service that adds ZFS support to your operating +system. The service is configured using a @code{zfs-configuration} +record. + +Here is an example use: + +@lisp +(service zfs-service-type + (zfs-configuration + (kernel linux-libre-5.4))) +@end lisp +@end defvr + +@deftp {Data Type} zfs-configuration +This data type represents the configuration of the ZFS support in Guix +System. Its fields are: + +@table @asis +@item @code{kernel} +The package of the Linux-Libre kernel to compile OpenZFS for. This field +is always required. It @emph{must} be the same kernel you use in your +@code{operating-system} form. + +@item @code{base-zfs} (default: @code{zfs}) +The OpenZFS package that will be compiled for the given Linux-Libre kernel= . + +@item @code{base-zfs-auto-snapshot} (default: @code{zfs-auto-snapshot}) +The @code{zfs-auto-snapshot} package to use. It will be modified to +specifically use the OpenZFS compiled for your kernel. + +@item @code{dependencies} (default: @code{'()}) +A list of @code{} or @code{} records that must +be mounted or opened before OpenZFS scans for pools to import. For exampl= e, +if you have set up LUKS containers as leaf VDEVs in a pool, you have to +include their corresponding @code{} records so that OpenZF= S +can import the pool correctly at bootup. + +@item @code{auto-mount?} (default: @code{#t}) +Whether to mount datasets with the ZFS @code{mountpoint} property automati= cally +at startup. This is the behavior that ZFS users usually expect. You migh= t +set this to @code{#f} for an operating system intended as a ``rescue'' sys= tem +that is intended to help debug problems with the disks rather than actuall= y +work in production. + +@item @code{auto-scrub} (default: @code{'weekly}) +Specifies how often to scrub all pools. Can be the symbols @code{'weekly}= or +@code{'monthly}, or a schedule specification understood by +@xref{mcron, mcron job specifications,, mcron, GNU@tie{}mcron}, such as +@code{"0 3 * * 6"} for ``every 3AM on Saturday''. +It can also be @code{#f} to disable auto-scrubbing (@strong{not recommende= d}). + +The general guideline is to scrub weekly when using consumer-quality drive= s, and +to scrub monthly when using enterprise-quality drives. + +@code{'weekly} scrubs are done on Sunday midnight, while @code{monthly} sc= rubs +are done on midnight on the first day of each month. + +@item @code{auto-snapshot?} (default: @code{#t}) +Specifies whether to auto-snapshot by default. If @code{#t}, then snapsho= ts +are automatically created except for ZFS datasets with the +@code{com.sun:auto-snapshot} ZFS vendor property set to @code{false}. + +If @code{#f}, snapshots will not be automatically created, unless the ZFS +dataset has the @code{com.sun:auto-snapshot} ZFS vendor property set to +@code{true}. + +@item @code{auto-snapshot-keep} (default: @code{'()}) +Specifies an association list of symbol-number pairs, indicating the numbe= r +of automatically-created snapshots to retain for each frequency type. + +If not specified via this field, by default there are 4 @code{frequent}, 2= 4 +@code{hourly}, 31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly} sna= pshots. + +For example: + +@lisp +(zfs-configuration + (kernel my-kernel) + (auto-snapshot-keep + '((frequent . 8) + (hourly . 12)))) +@end lisp + +The above will keep 8 @code{frequent} snapshots and 12 @code{hourly} snaps= hots. +@code{daily}, @code{weekly}, and @code{monthly} snapshots will keep their +defaults (31 @code{daily}, 8 @code{weekly}, and 12 @code{monthly}). + +@end table +@end deftp + +@subsubsection ZFS Auto-Snapshot + +The ZFS service on Guix System supports auto-snapshots as implemented in t= he +Solaris operating system. + +@code{frequent} (every 15 minutes), @code{hourly}, @code{daily}, @code{wee= kly}, +and @code{monthly} snapshots are created automatically for ZFS datasets th= at +have auto-snapshot enabled. They will be named, for example, +@code{zfs-auto-snap_frequent-2021-03-22-1415}. You can continue to use +manually-created snapshots as long as they do not conflict with the naming +convention used by auto-snapshot. You can also safely manually destroy +automatically-created snapshots, for example to free up space. + +The @code{com.sun:auto-snapshot} ZFS property controls auto-snapshot on a +per-dataset level. Sub-datasets will inherit this property from their par= ent +dataset, but can have their own property. + +You @emph{must} set this property to @code{true} or @code{false} exactly, +otherwise it will be treated as if the property is unset. + +For example: + +@example +# zfs list -o name +NAME +tank +tank/important-data +tank/tmp +# zfs set com.sun:auto-snapshot=3Dtrue tank +# zfs set com.sun:auto-snapshot=3Dfalse tank/tmp +@end example + +The above will set @code{tank} and @code{tank/important-data} to be +auto-snapshot, while @code{tank/tmp} will not be auto-snapshot. + +If the @code{com.sun:auto-snapshot} property is not set for a dataset +(the default when pools and datasets are created), then whether +auto-snapshot is done or not will depend on the @code{auto-snapshot?} +field of the @code{zfs-configuration} record. + +There are also @code{com.sun:auto-snapshot:frequent}, +@code{com.sun:auto-snapshot:hourly}, @code{com.sun:auto-snapshot:daily}, +@code{com.sun:auto-snapshot:weekly}, and @code{com.sun:auto-snapshot:month= ly} +properties that give finer-grained control of whether to auto-snapshot a +dataset at a particular schedule. + +The number of snapshots kept for all datasets can be overridden via the +@code{auto-snapshot-keep} field of the @code{zfs-configuration} record. +There is currently no support to have different numbers of snapshots to +keep for different datasets. + +@subsubsection ZVOLs + +ZFS supports ZVOLs, block devices that ZFS exposes to the operating +system in the @code{/dev/zvol/} directory. The ZVOL will have the same +resilience and self-healing properties as other datasets on your ZFS pool. +ZVOLs can also be snapshotted (and will be included in auto-snapshotting +if enabled), which snapshots the state of the block device, effectively +snapshotting the hosted file system. + +You can put any file system inside the ZVOL. However, in order to mount t= his +file system at system start, you need to add @code{%zfs-zvol-dependency} a= s a +dependency of each file system inside a ZVOL. + +@defvr {Scheme Variable} %zfs-zvol-dependency +An artificial @code{} which tells the file system mounting +service to wait for ZFS to provide ZVOLs before mounting the +@code{} dependent on it. +@end defvr + +For example, suppose you create a ZVOL and put an ext4 filesystem +inside it: + +@example +# zfs create -V 100G tank/ext4-on-zfs +# mkfs.ext4 /dev/zvol/tank/ext4-on-zfs +# mkdir /ext4-on-zfs +# mount /dev/zvol/tank/ext4-on-zfs /ext4-on-zfs +@end example + +You can then set this up to be mounted at boot by adding this to the +@code{file-systems} field of your @code{operating-system} record: + +@lisp +(file-system + (device "/dev/zvol/tank/ext4-on-zfs") + (mount-point "/ext4-on-zfs") + (type "ext4") + (dependencies (list %zfs-zvol-dependency))) +@end lisp + +You @emph{must not} add @code{%zfs-zvol-dependency} to your +@code{operating-system}'s @code{mapped-devices} field, and you @emph{must +not} add it (or any @code{}s dependent on it) to the +@code{dependencies} field of @code{zfs-configuration}. Finally, you +@emph{must not} use @code{%zfs-zvol-dependency} unless you actually +instantiate @code{zfs-service-type} on your system. + +@subsubsection Unsupported Features + +Some common features and uses of ZFS are currently not supported, or not +fully supported, on Guix. + +@enumerate +@item +Shepherd-managed daemons that are configured to read from or write to ZFS +mountpoints need to include @code{user-processes} in their @code{requireme= nt} +field. This is the earliest that ZFS file systems are assured of being +mounted. + +Generally, most daemons will, directly or indirectly, require +@code{networking}, or @code{user-processes}, or both. Most implementation= s +of @code{networking} will also require @code{user-processes} so daemons th= at +require only @code{networking} will also generally start up after +@code{user-processes}. A notable exception, however, is +@code{static-networking-service-type}. You will need to explicitly add +@code{user-processes} as a @code{requirement} of your @code{static-network= ing} +record. + +@item +@code{mountpoint=3Dlegacy} ZFS file systems. The handlers for the Guix mo= unting +system have not yet been modified to support ZFS, and will expect @code{/d= ev} +paths in the @code{}'s @code{device} field, but ZFS file syst= ems +are referred to via non-path @code{pool/file/system} names. Such file sys= tems +also need to be mounted @emph{after} OpenZFS has scanned for pools. + +You can still manually mount these file systems after system boot; what is +only unsupported is mounting them automatically at system boot by specifyi= ng +them in @code{} records of your @code{operating-system}. + +@item +@code{/home} on ZFS. Guix will create home directories for users, but thi= s +process currently cannot be scheduled after ZFS file systems are mounted. +Thus, the ZFS file system might be mounted @emph{after} Guix has created +home directories at boot, at which point OpenZFS will refuse to mount sinc= e +the mountpoint is not empty. However, you @emph{can} create an ext4, xfs, +btrfs, or other supported file system inside a ZVOL, have that depend on +@code{%zfs-zvol-dependency}, and set it to mount on the @code{/home} +directory; they will be scheduled to mount before the @code{user-homes} +process. + +Similarly, other locations like @code{/var}, @code{/gnu/store} and so +on cannot be reliably put in a ZFS file system, though they may be +possible to create as other file systems inside ZVOL containers. + +@item +@code{/} and @code{/boot} on ZFS. These require Guix to expose more of +the @code{initrd} very early boot process to services. It also requires +Guix to have the ability to explicitly load modules while still in +@code{initrd} (currently kernel modules loaded by +@code{kernel-module-loader-service-type} are loaded after @code{/} is +mounted). Further, since one of ZFS's main advantages is that it can +continue working despite the loss of one or more devices, it makes sense +to also support installing the bootloader on all devices of the pool that +contains the @code{/} and @code{/boot}; after all, if ZFS can survive the +loss of one device, the bootloader should also be able to survive the loss +of one device. + +@item +ZVOL swap devices. Mapped swap devices need to be listed in +@code{mapped-devices} to ensure they are opened before the system attempts +to use them, but you cannot currently add @code{%zfs-zvol-dependency} to +@code{mapped-devices}. + +This will also require significant amounts of testing, as various kernel +build options and patches may affect how swapping works, which are possibl= y +different on Guix System compared to other distributions that this feature= is +known to work on. + +@item +ZFS Event Daemon. Support for this has not been written yet, patches are +welcome. The main issue is how to design this in a Guix style while +supporting legacy shell-script styles as well. In particular, OpenZFS its= elf +comes with a number of shell scripts intended for ZFS Event Daemon, and we +need to figure out how the user can choose to use or not use the provided +scripts (and configure any settings they have) or override with their own +custom code (which could be shell scripts they have written and trusted fr= om +previous ZFS installations). + +As-is, you can create your own service that activates the ZFS Event Daemon +by creating the @file{/etc/zfs/zed} directory and filling it appropriately= , +then launching @code{zed}. + +@item +@file{/etc/zfs/zpool.cache}. Currently the ZFS support on Guix always for= ces +scanning of all devices at bootup to look for ZFS pools. For systems with +dozens or hundreds of storage devices, this can lead to slow bootup. One = issue +is that tools should really not write to @code{/etc} which is supposed to = be for +configuration; possibly it could be moved to @code{/var} instead. Another= issue +is that if Guix ever supports @code{/} on ZFS, we would need to somehow ke= ep the +@code{zpool.cache} file inside the @code{initrd} up-to-date with what is i= n the +@code{/} mount point. + +@item +@code{zfs share}. This will require some (unknown amount of) work to inte= grate +into the Samba and NFS services of Guix. You @emph{can} manually set up S= amba +and NFS to share any mounted ZFS datasets by setting up their configuratio= ns +properly; it just can't be done for you by @code{zfs share} and the +@code{sharesmb} and @code{sharenfs} properties. +@end enumerate + +Hopefully, support for the above only requires code to be written, and use= rs +are encouraged to hack on Guix to implement the above features. + + @node Mapped Devices @section Mapped Devices diff --git a/gnu/local.mk b/gnu/local.mk index 1252643dc0..95e31a4b7e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -49,6 +49,7 @@ # Copyright =C2=A9 2021 Simon Tournier # Copyright =C2=A9 2022 Daniel Mei=C3=9Fner # Copyright =C2=A9 2022 Remco van 't Veer +# Copyright =C2=A9 2021 raid5atemyhomework # # This file is part of GNU Guix. # @@ -648,6 +649,7 @@ GNU_SYSTEM_MODULES =3D=09=09=09=09\ %D%/services/docker.scm=09=09=09\ %D%/services/authentication.scm=09=09\ %D%/services/file-sharing.scm=09=09=09\ + %D%/services/file-systems.scm=09=09=09\ %D%/services/games.scm=09=09=09\ %D%/services/ganeti.scm=09=09=09\ %D%/services/getmail.scm=09=09=09=09\ diff --git a/gnu/services/base.scm b/gnu/services/base.scm index fbd01e84d6..aacb9e5e1b 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -220,7 +220,9 @@ (define-module (gnu services base) references-file - %base-services)) + %base-services + + dependency->shepherd-service-name)) ;;; Commentary: ;;; diff --git a/gnu/services/file-systems.scm b/gnu/services/file-systems.scm new file mode 100644 index 0000000000..867349c3a5 --- /dev/null +++ b/gnu/services/file-systems.scm @@ -0,0 +1,363 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2021 raid5atemyhomework +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services file-systems) + #:use-module (gnu packages file-systems) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu services linux) + #:use-module (gnu services mcron) + #:use-module (gnu services shepherd) + #:use-module (gnu system mapped-devices) + #:use-module (guix gexp) + #:use-module (guix modules) + #:use-module (guix packages) + #:use-module (guix records) + #:use-module (srfi srfi-1) + #:export (zfs-service-type + + zfs-configuration + zfs-configuration? + zfs-configuration-kernel + zfs-configuration-base-zfs + zfs-configuration-base-zfs-auto-snapshot + zfs-configuration-dependencies + zfs-configuration-auto-mount? + zfs-configuration-auto-scrub + zfs-configuration-auto-snapshot? + zfs-configuration-auto-snapshot-keep + + %zfs-zvol-dependency)) + +(define-record-type* + zfs-configuration + make-zfs-configuration + zfs-configuration? + + ;; linux-libre kernel you want to compile the base-zfs module for. + (kernel zfs-configuration-kernel) + + ;; the OpenZFS package that will be modified to compile for the + ;; given kernel. + ;; Because it is modified and not the actual package that is used, + ;; we prepend the name 'base-'. + (base-zfs zfs-configuration-base-zfs + (default zfs)) + + ;; the zfs-auto-snapshot package that will be modified to compile + ;; for the given kernel. + ;; Because it is modified and not the actual package that is used, + ;; we prepend the name 'base-'. + (base-zfs-auto-snapshot zfs-configuration-base-zfs-auto-snapshot + (default zfs-auto-snapshot)) + + ;; list of or objects that must be + ;; opened/mounted before we import any ZFS pools. + (dependencies zfs-configuration-dependencies + (default '())) + + ;; #t to mount all mountable datasets by default. + ;; #f if not mounting. + ;; #t is the expected behavior on other operating systems, the + ;; #f is only supported for "rescue" operating systems where + ;; the user wants lower-level control of when to mount. + (auto-mount? zfs-configuration-auto-mount? + (default #t)) + + ;; 'weekly for weekly scrubbing, 'monthly for monthly scrubbing, an + ;; mcron time specification that can be given to `job`, or #f to + ;; disable. + (auto-scrub zfs-configuration-auto-scrub + (default 'weekly)) + + ;; #t to auto-snapshot by default (and `com.sun:auto-snapshot=3Dfalse` + ;; disables auto-snapshot per dataset), #f to not auto-snapshot + ;; by default (and `com.sun:auto-snapshot=3Dtrue` enables auto-snapshot + ;; per dataset). + (auto-snapshot? zfs-configuration-auto-snapshot? + (default #t)) + + ;; association list of symbol-number pairs to indicate the number + ;; of automatic snapshots to keep for each of 'frequent, 'hourly, + ;; 'daily, 'weekly, and 'monthly. + ;; e.g. '((frequent . 8) (hourly . 12)) + (auto-snapshot-keep zfs-configuration-auto-snapshot-keep + (default '()))) + +(define %default-auto-snapshot-keep + '((frequent . 4) + (hourly . 24) + (daily . 31) + (weekly . 8) + (monthly . 12))) + +(define %auto-snapshot-mcron-schedule + '((frequent . "0,15,30,45 * * * *") + (hourly . "0 * * * *") + (daily . "0 0 * * *") + (weekly . "0 0 * * 7") + (monthly . "0 0 1 * *"))) + +;; A synthetic and unusable MAPPED-DEVICE intended for use when +;; the user has created a mountable filesystem inside a ZFS +;; zvol and wants it mounted inside the configuration.scm. +(define %zfs-zvol-dependency + (mapped-device + (source '()) + (targets '("zvol/*")) + (type #f))) + +(define (make-zfs-package conf) + "Creates a zfs package based on the given zfs-configuration. + + OpenZFS is a kernel package and to ensure best compatibility + it should be compiled with the specific Linux-Libre kernel + used on the system. This simply overrides the kernel used + in compilation with that given in the configuration, which + the user has to ensure is the same as in the operating-system." + (let ((kernel (zfs-configuration-kernel conf)) + (base-zfs (zfs-configuration-base-zfs conf))) + (package + (inherit base-zfs) + (arguments (cons* #:linux kernel + (package-arguments base-zfs)))))) + +(define (make-zfs-auto-snapshot-package conf) + "Creates a zfs-auto-snapshot package based on the given + zfs-configuration. + + Since the OpenZFS tools above are compiled to a specific + kernel version, zfs-auto-snapshot --- which calls into the + OpenZFS tools --- has to be compiled with the specific + modified OpenZFS package created in the make-zfs-package + procedure." + (let ((zfs (make-zfs-package conf)) + (base-zfs-auto-snapshot (zfs-configuration-base-zfs-auto-snapshot = conf))) + (package + (inherit base-zfs-auto-snapshot) + (inputs `(("zfs" ,zfs)))))) + +(define (zfs-loadable-modules conf) + "Specifies that the specific 'module' output of the OpenZFS + package is to be used; for use in indicating it as a + loadable kernel module." + (list (list (make-zfs-package conf) "module"))) + +(define (zfs-shepherd-services conf) + "Constructs a list of Shepherd services that is installed + by the ZFS Guix service. + + 'zfs-scan' scans all devices for ZFS pools, and makes them + available to 'zpool' commands. + 'device-mapping-zvol/*' waits for /dev/zvol/* to be + populated by 'udev', and runs after 'zfs-scan'. + 'zfs-auto-mount' mounts all ZFS datasets with a 'mount' + property, which defaults to '/' followed by the name of + the dataset. + + All the above behavior is expected by ZFS users from + typical ZFS installations. A mild difference is that + scanning is usually based on '/etc/zfs/zpool.cache' + instead of the 'scan all devices' used below, but that + file is questionable in Guix since ideally '/etc/' + files are modified by the sysad directly; + '/etc/zfs/zpool.cache' is modified by ZFS tools." + (let* ((zfs-package (make-zfs-package conf)) + (zpool (file-append zfs-package "/sbin/zpool")) + (zfs (file-append zfs-package "/sbin/zfs")) + (zvol_wait (file-append zfs-package "/bin/zvol_wait")) + (scheme-modules `((srfi srfi-1) + (srfi srfi-34) + (srfi srfi-35) + (rnrs io ports) + ,@%default-modules))) + (define zfs-scan + (shepherd-service + (provision '(zfs-scan)) + (requirement `(root-file-system + kernel-module-loader + udev + ,@(map dependency->shepherd-service-name + (zfs-configuration-dependencies conf)))) + (documentation "Scans for and imports ZFS pools.") + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "zfs: error importing pools: ~s~%" + (condition-message c)) + #f)) + ;; TODO: optionally use a cachefile. + (invoke #$zpool "import" "-a" "-N")))) + ;; Why not one-shot? Because we don't really want to rescan + ;; this each time a requiring process is restarted, as scanning + ;; can take a long time and a lot of I/O. + (stop #~(const #f)))) + + (define device-mapping-zvol/* + (shepherd-service + (provision '(device-mapping-zvol/*)) + (requirement '(zfs-scan)) + (documentation "Waits for all ZFS ZVOLs to be opened.") + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "zfs: error opening zvols: ~s~%" + (condition-message c)) + #f)) + (invoke #$zvol_wait)))) + (stop #~(const #f)))) + + (define zfs-auto-mount + (shepherd-service + (provision '(zfs-auto-mount)) + (requirement '(zfs-scan)) + (documentation "Mounts all non-legacy mounted ZFS filesystems.") + (modules scheme-modules) + (start #~(lambda _ + (guard (c ((message-condition? c) + (format (current-error-port) + "zfs: error mounting file systems: ~= s~%" + (condition-message c)) + #f)) + ;; 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/console ? + (with-output-to-port (current-error-port) + (lambda () + (invoke #$zfs "mount" "-a" "-l")))))) + (stop #~(lambda _ + ;; Make sure that Shepherd does not have a CWD that + ;; is a mounted ZFS filesystem, which would prevent + ;; unmounting. + (chdir "/") + (invoke #$zfs "unmount" "-a" "-f"))))) + + `(,zfs-scan + ,device-mapping-zvol/* + ,@(if (zfs-configuration-auto-mount? conf) + `(,zfs-auto-mount) + '())))) + +(define (zfs-user-processes conf) + "Provides the last Shepherd service that 'user-processes' has to + wait for. + + If not auto-mounting, then user-processes should only wait for + the device scan." + (if (zfs-configuration-auto-mount? conf) + '(zfs-auto-mount) + '(zfs-scan))) + +(define (zfs-mcron-auto-snapshot-jobs conf) + "Creates a list of mcron jobs for auto-snapshotting, one for each + of the standard durations." + (let* ((user-auto-snapshot-keep (zfs-configuration-auto-snapshot-ke= ep conf)) + ;; assoc-ref has earlier entries overriding later ones. + (auto-snapshot-keep (append user-auto-snapshot-keep + %default-auto-snapshot-keep= )) + (auto-snapshot? (zfs-configuration-auto-snapshot? c= onf)) + (zfs-auto-snapshot-package (make-zfs-auto-snapshot-package con= f)) + (zfs-auto-snapshot (file-append zfs-auto-snapshot-pack= age + "/sbin/zfs-auto-snapsh= ot"))) + (map + (lambda (label) + (let ((keep (assoc-ref auto-snapshot-keep label)) + (sched (assoc-ref %auto-snapshot-mcron-schedule label))) + #~(job '#$sched + (lambda () + (system* #$zfs-auto-snapshot + "--quiet" + "--syslog" + #$(string-append "--label=3D" + (symbol->string label)) + #$(string-append "--keep=3D" + (number->string keep)) + "//"))))) + (map first %auto-snapshot-mcron-schedule)))) + +(define (zfs-mcron-auto-scrub-jobs conf) + "Creates a list of mcron jobs for auto-scrubbing." + (let* ((zfs-package (make-zfs-package conf)) + (zpool (file-append zfs-package "/sbin/zpool")) + (auto-scrub (zfs-configuration-auto-scrub conf)) + (sched (cond + ((eq? auto-scrub 'weekly) "0 0 * * 7") + ((eq? auto-scrub 'monthly) "0 0 1 * *") + (else auto-scrub)))) + (define code + ;; We need to get access to (guix build utils) for the + ;; invoke procedures. + (with-imported-modules (source-module-closure '((guix build utils))) + #~(begin + (use-modules (guix build utils) + (ice-9 ports)) + ;; The ZFS pools in the system. + (define pools + (invoke/quiet #$zpool "list" "-o" "name" "-H")) + ;; Only scrub if there are actual ZFS pools, as the + ;; zpool scrub command errors out if given an empty + ;; argument list. + (unless (null? pools) + ;; zpool scrub only initiates the scrub and otherwise + ;; prints nothing. Results are always seen on the + ;; zpool status command. + (apply invoke #$zpool "scrub" pools))))) + (list + #~(job '#$sched + #$(program-file "mcron-zfs-scrub.scm" code))))) + +(define (zfs-mcron-jobs conf) + "Creates a list of mcron jobs for ZFS management." + (append (zfs-mcron-auto-snapshot-jobs conf) + (if (zfs-configuration-auto-scrub conf) + (zfs-mcron-auto-scrub-jobs conf) + '()))) + +(define zfs-service-type + (service-type + (name 'zfs) + (extensions + (list ;; Install OpenZFS kernel module into kernel profile. + (service-extension linux-loadable-module-service-type + zfs-loadable-modules) + ;; And load it. + (service-extension kernel-module-loader-service-type + (const '("zfs"))) + ;; Make sure ZFS pools and datasets are mounted at + ;; boot. + (service-extension shepherd-root-service-type + zfs-shepherd-services) + ;; Make sure user-processes don't start until + ;; after ZFS does. + (service-extension user-processes-service-type + zfs-user-processes) + ;; Install automated scrubbing and snapshotting. + (service-extension mcron-service-type + zfs-mcron-jobs) + + ;; Install ZFS management commands in the system + ;; profile. + (service-extension profile-service-type + (compose list make-zfs-package)) + ;; Install ZFS udev rules. + (service-extension udev-service-type + (compose list make-zfs-package)))) + (description "Installs ZFS, an advanced filesystem and volume manager.= "))) base-commit: 1d1a4efd8cdac3757792cfbae92440edc5c3a802 -- 2.34.0 From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/3] Better Support for ZFS on Guix Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 16 Mar 2022 23:45: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 Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.164747425312042 (code B ref 45692); Wed, 16 Mar 2022 23:45:02 +0000 Received: (at 45692) by debbugs.gnu.org; 16 Mar 2022 23:44:13 +0000 Received: from localhost ([127.0.0.1]:52534 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUdJN-00038A-AI for submit@debbugs.gnu.org; Wed, 16 Mar 2022 19:44:13 -0400 Received: from mail-4324.protonmail.ch ([185.70.43.24]:45901) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUdJL-00037t-Vj for 45692@debbugs.gnu.org; Wed, 16 Mar 2022 19:44:12 -0400 Date: Wed, 16 Mar 2022 23:44:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1647474245; bh=pwYKT/nhnBO9sbCdsUibUhxqN3uKbyTwLMA+BDkBChk=; h=Date:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To:References: From:To:Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID; b=pRbztnzNrLASB4rIMxSsLveS9QscbCkLcLXW4U7BrrzZU7KTyDv2JeY05F3yHlQGD HCZ1pzDfV5gxQIgHWBhchfBMS6k+xnwdd3vgIrzTGwG+MehaeIFZkc9RXiLdwVqnHa Dbweh3Sec0IEFAdGLwQcilUbPMHq8GyMYPzBWa/FYr5QzQ63+XW5BvimtU0rn2/ARF hxPbS5vGFq3TWTrgbKoo2Lnix3eAmaLCVPXFpTwVNcv+du+IP6nei7Iiwns3E/Or71 l4NuC156i9bSbPW/o7TpTkPc2jdU8QFu1tNjgPohN7lCUNXZZmknSx2fAtBXSVXrBt SKS2KzdNIuWSg== From: raid5atemyhomework Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: BUMP Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.2 MISSING_HEADERS Missing To: header -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raid5atemyhomework[at]protonmail.com) 0.0 RCVD_IN_MSPIKE_H5 RBL: Excellent reputation (+5) [185.70.43.24 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 T_SCC_BODY_TEXT_LINE No description available. 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) BUMP From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/3] Better Support for ZFS on Guix Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 17 Mar 2022 08:25: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: raid5atemyhomework Cc: Maxime Devos , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16475054517722 (code B ref 45692); Thu, 17 Mar 2022 08:25:01 +0000 Received: (at 45692) by debbugs.gnu.org; 17 Mar 2022 08:24:11 +0000 Received: from localhost ([127.0.0.1]:52989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUlQZ-00020U-Hu for submit@debbugs.gnu.org; Thu, 17 Mar 2022 04:24:11 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:6961) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUlQX-00020K-E1 for 45692@debbugs.gnu.org; Thu, 17 Mar 2022 04:24:10 -0400 Received: from lprikler-laptop.ist.intra (gw.ist.tugraz.at [129.27.202.101]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4KK0Y16h27z1LZWn; Thu, 17 Mar 2022 09:24:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4KK0Y16h27z1LZWn DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1647505446; bh=WTfh59o2NqmnbEvpP7GzkNLBYIoRLq/RTX95El030K4=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=EeTRT6Ce1sh2aWjuxGaa4YWk3iGTizt4wOQG4Tvy/eqCSaou0R73omE6yhzPEwazC H3YBWyL6EyTKDpv3OtrWVrVVAY/1QOIc8tPbfsDo7XlvmaRGpPGGXaKTKWLvOaVjdS sY6bhI2FvSZ4aSzA+Mgyb/t66/NenoDMoIqy3Nyc= Message-ID: From: Liliana Marie Prikler Date: Thu, 17 Mar 2022 09:24:05 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-Spam-Score: -2.3 (--) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi raid5, Am Freitag, dem 18.02.2022 um 07:13 +0000 schrieb raid5atemyhomework: > Modified so it applies cleanly to origin/master. > > PLEASE JUST REVIEW AND MERGE, WHAT IS THE PROBLEM HERE ANYWAY? You've been begging for review for a while now, so let me inform you that the way you've been doing this is not particularly helpful to you or the reviewers. First of all, your follow-up messages do not include anyone who has so far reviewed the patch in the "To:" or "Cc:" field. This makes it less likely that they will actually see your message. Secondly, the tone in which you're asking is not nice to the reviewers. I can understand you're a little frustrated waiting for so long, but shouting "WHAT IS THE PROBLEM ANYWAY?" communicates that you're both unaware of and do not care about burdens (e.g. maintenance) that are created by your patch. This in turn prompts reviewers to look away; both out of spite and in order not to deal with this mess at all. I have no stake in ZFS and no intent to review this patch beyond this point, but here a few questions to ask: Why is it necessary to define a file system as a service? Why do we need to export a seemingly unrelated variable? Can this be tested? Is this sufficiently tested? Are there any points Maxime that were drowned out by a huge wall of licensing-related messages being passed back and forth that I will not attempt to sift through in order to respond to this message? If so, have those been sufficiently addressed? Another complicating factor for this bug in particular is that the mumi web interface and the raw messages are out of sync; I have no idea why that is the case, but trying to fetch a patch only to get one of your bump messages is not particularly encouraging. In any case, I've added Maxime to CC so they can have a closer look at it. Cheers From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/3] Better Support for ZFS on Guix Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 17 Mar 2022 17: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: Liliana Marie Prikler , raid5atemyhomework Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.164753773532651 (code B ref 45692); Thu, 17 Mar 2022 17:23:02 +0000 Received: (at 45692) by debbugs.gnu.org; 17 Mar 2022 17:22:15 +0000 Received: from localhost ([127.0.0.1]:55089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUtpH-0008UY-6q for submit@debbugs.gnu.org; Thu, 17 Mar 2022 13:22:15 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:47160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUtpD-0008UJ-Ra for 45692@debbugs.gnu.org; Thu, 17 Mar 2022 13:22:13 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by baptiste.telenet-ops.be with bizsmtp id 7VN92700Z4UW6Th01VN9Nq; Thu, 17 Mar 2022 18:22:10 +0100 Message-ID: <1e72240bff6b2c5986cc26a3af5fe9517ad4db74.camel@telenet.be> From: Maxime Devos Date: Thu, 17 Mar 2022 18:22:04 +0100 In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-rAP1QkpOEuBcd4bhKyu0" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1647537730; bh=s40eu1855VRowvjGtSlzc5wKdfm7sTnho0ZKRILX4jo=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=WkkfIooxHHMkkQwz2GcgNa2C/RgBvSTm89ciEx3t6A4YLqFs0CGNuaRi1NuFtO4VL MVOCJ3KQQIzoyOBj6i5CL0SNomncih/ndldFK2jz6gDW0ttOVf2YkRLOg9CV8Kjeq3 QNap9AsLdlxYsGSjJbmCFLJRLo7FlmyjYliTiTq0xjV5M1bakyCRcHb1hv2/9hpyCO DOeK92bL9xjg0mmowvKTxnwwriEPNYfeEEVLdbOVAL3lxky2LQaj+QqJZEUoPdK4xx Rlpr5VHoeUmPnHoxgFV7W+OxBiTw4zqyJcGtR2bKIc1ov3WEPKIfND+0IIonCLK3Tv ysrdtejf4aESQ== X-Spam-Score: -0.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-rAP1QkpOEuBcd4bhKyu0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Liliana Marie Prikler schreef op do 17-03-2022 om 09:24 [+0100]: > In any case, I've added Maxime to CC so they can have a closer look at > it. I have been more-or-less ignoring the ZFS patches since some time after . If ZFS people(^), after a disagreement about licensing concerns, directly jump to accusations of gaslighting and sabogate, completely ignoring my previous arguments (*) without trying to refute any of them or bringing new arguments, then I don't want to be involved with ZFS. (^) So far only Mason Loring Bliss, _not_ raid5atemyhomework!=20 Also, the various =E2=80=98work-arounds=E2=80=99 around the GPL<->CDLL inco= mpatibility still seem super fishy to me even if they _might_ be technically correct. To me, this makes reviewing the code practically pointless -- why review the zfs service patches if they will have to be reverted due to incompatibility concerns anyway? Summarised: * The =E2=80=98Oracle does not care so no legal risk=E2=80=99 argument: - Oracle might not care, but there are other parties involved as well (e.g. the Linux people and contributors to OpenZFS). - Not getting caught doesn't mean things are above board. It just means you haven't got caught, and you might get caught later. - Has anyone actually ever asked Oracle for some official =E2=80=98yes, go ahead=E2=80=99 / =E2=80=98no, here's a DMCA notice / see you at YY= YY-MM-DD in court=E2=80=99 / =E2=80=98no, but you're too small fry to bother s= o you'll get away for it ... for now=E2=80=99 response? AFAICT, this has not been done. - Even if it would be very strange for Oracle to try to stop (the Linux part of(*)) OpenZFS, why would that stop Oracle and how would the odd behaviour actually legally matter? * The =E2=80=98zfs package is already in Guix=E2=80=99 argument (https://issues.guix.gnu.org/45692#47): then it should be reverted when the incompatibility is discovered. Also, the incompatibility issue has been noted before: https://lists.gnu.org/archive/html/guix-devel/2019-04/msg00404.html though it appears to have been forgotten in https://lists.gnu.org/archive/html/guix-patches/2019-12/msg00543.html presumably because different people were involved? * The =E2=80=98Guix is not distributing the source code, it's only pointi= ng to the source code=E2=80=99 argument: - We do distribute the source code, at https://ci.guix.gnu.org - probably also via our friends at SWH - and via the Wayback Machine fallback - possibly also to any Guix users on the local network, when using '--advertise' and '--discover' - and by delegating the distributing to the OpenZFS project - even if pointing to the tarball OpenZFS web would not count as distribution, assuming there's a license incompatibility (and hence, the Linux part of OpenZFS is illegal (*), wouldn't this pointing count as facilitation of a crime (or misdemeanor or contract breach or whatever's the local terminology), wouldn't this make Guix or individuals behind Guix accomplishes? - even if it's all legal, what about freedom 3 -- the freedom to distribute the program? - also, not being able to distribute the source code by ourselves seems rather inconvenient * The =E2=80=98we're not doing binary distribution=E2=80=99 argument: - That seems rather inconvenient, why not use BTRFS instead which seems quite capable and doesn't have this weird restriction? - Freedom 3=C2=A0is: =E2=80=98The freedom to redistribute copies so you can help others (freedom 2).=E2=80=99 Guix redistributes copies is a convenient form= , to help all users (=E2=80=98others=E2=80=99). To help the users, it = not only redistributes in source form, but also in binary form (substitutes). But the CDDL+GPL combination stops us from helping others by redistributing binary copies! Basically, if there's the freedom to redistribute copies, shouldn't this include _binary_ copies, especially when binaries are convenient? - We _are_ doing binary distribution: (here, =E2=80=98we=E2=80=99 includes all relevant users of Guix) An uninitiated user might do "guix system image ..." to produce an image (that happens to include a binary ZFS), dutifully uses "guix build --sources=3Dtransitive" and share the sources+binary with other people, and accidentally commit a violation. All the initrd, system image and "guix pack" would need to propagate unsubstitutability (and the top-level tools might need to error out) and this needs to be tested, AFAIK this has not been done. * The =E2=80=98we're not distributing _modified_ source code=E2=80=99 arg= ument: Freedom 4! We should be able to (legally) distribute modified source code as well. * Various =E2=80=99technically, because of Section 1 (bis) alpha Z of thi= s license, Paragraph 2 beta 3 of that license, this and that clause do not apply=E2=80=99 arguments: This seems to be missing the spirit, and the law is, to my limited knowledge, not a deterministic automaton with an exact mathematical formulation without any bit flips. Greetings, Maxime. (*) The BSD modules are presumably fine though (unverified)! But Guix does _not_ (currently) support BSDs. --=-rAP1QkpOEuBcd4bhKyu0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjNuPBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ul6AP9hwXMBalE0IATLZ2kCVy1qKfJZ mk04zvITh5Q8u5WPOwEA1Wh4xwFKr8O5K9DodAu86xVPHM4Kd2Ogpyuu6oOIXg8= =ghTU -----END PGP SIGNATURE----- --=-rAP1QkpOEuBcd4bhKyu0-- From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/3] Better Support for ZFS on Guix Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 17 Mar 2022 18:40: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: Maxime Devos Cc: Liliana Marie Prikler , raid5atemyhomework , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.16475423537920 (code B ref 45692); Thu, 17 Mar 2022 18:40:02 +0000 Received: (at 45692) by debbugs.gnu.org; 17 Mar 2022 18:39:13 +0000 Received: from localhost ([127.0.0.1]:55190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUv1l-00023g-4V for submit@debbugs.gnu.org; Thu, 17 Mar 2022 14:39:13 -0400 Received: from mail-il1-f179.google.com ([209.85.166.179]:44910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUv1j-00023T-8U for 45692@debbugs.gnu.org; Thu, 17 Mar 2022 14:39:11 -0400 Received: by mail-il1-f179.google.com with SMTP id n16so4340189ile.11 for <45692@debbugs.gnu.org>; Thu, 17 Mar 2022 11:39:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=amxebfd+ZADhT8btmKCHueXHWuaJg7PnsTn+5jIqYF8=; b=K7p2T/0v/W6TbsUv8YcE/uVejdP6URbKxef0CSrFGn2kP0DDYbBuW17jQ2xmEWYhcZ t7J7Byj3Lj4dH+awhityC/X1rKIOO5QrlyvQkrmOp42jInbZCpeITvOV2ieVBBNeVQTh g7Rh30YjWDgouLuysyyWXt7A8PAqvakyMSowSPBCJx8LC5jwqF2Bz1aYCnlCrwTJQfFO Z6TCBI4mYdIyHRDke6fa2Z+lNT/NgER3cLhbqGmagiIlBECudD3wg4WQT7W477kMvEOB CxzXd7zZz/6Yvsgt3pFkVo7bW2gUuShYd5Uis445xtDglgLVJawLpEEmhAxfvCfNwUxX LE0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=amxebfd+ZADhT8btmKCHueXHWuaJg7PnsTn+5jIqYF8=; b=uYfbsOrmLwND39uLStpD+qmZwC+NT9uRPyKs0VR82RE/EQmO1Qv3xU00uXB4Hh85g3 ccoUOjrp2laU196YfsETH5L8ORMlc5X3dmdxHaE9vRll2m0bzzGWGLyx0wqcSvaZZB4m DIYLOg4f6VnqxiEvTuCyj3rUpH4vYJNO2eEdxAbRypN8JFYjjJzCTVcH/JUeM9vyxedX Neh6axSPtlB9J1jajHJeY9664oiMX3jSk7/OjRekIsnqpFpbqFElmzHDMM4R1diXJBLc 0sGib47otSTO7cOqgctIkEcDbu8I6ltiAoTBhFQjXsv5LEF6edqctH65CA2pKngaCiAn pI1g== X-Gm-Message-State: AOAM5327+GhKvfhwRtVrUlh6qlxsN9NqCKen9f0jh3lVAKD5lbr/Hzth lx9Bh7N4JkH8M0lXOKUEOpQmj5hnpO8H2PpBYiw= X-Google-Smtp-Source: ABdhPJwLZ/A9Vozfc19z+5mu0C2uwTbOgrhv2E1FHCyD66M6zU5txnizqMsLdN6jlrHhJYuKE2+QmbL7lcnJk5cAJ/4= X-Received: by 2002:a92:a30d:0:b0:2c2:fde0:47cf with SMTP id a13-20020a92a30d000000b002c2fde047cfmr2955948ili.156.1647542345472; Thu, 17 Mar 2022 11:39:05 -0700 (PDT) MIME-Version: 1.0 References: <1e72240bff6b2c5986cc26a3af5fe9517ad4db74.camel@telenet.be> In-Reply-To: <1e72240bff6b2c5986cc26a3af5fe9517ad4db74.camel@telenet.be> From: zimoun Date: Thu, 17 Mar 2022 19:38:54 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Maxime, On Thu, 17 Mar 2022 at 18:23, Maxime Devos wrote: > I have been more-or-less ignoring the ZFS patches since some time after > . If ZFS people(^), after a > disagreement about licensing concerns, directly jump to accusations of > gaslighting and sabogate, completely ignoring my previous arguments (*) > without trying to refute any of them or bringing new arguments, then I > don't want to be involved with ZFS. I sympathize with you Maxime. > Also, the various =E2=80=98work-arounds=E2=80=99 around the GPL<->CDLL in= compatibility > still seem super fishy to me even if they _might_ be technically > correct. To me, this makes reviewing the code practically pointless -- > why review the zfs service patches if they will have to be reverted > due to incompatibility concerns anyway? Summarised: You wrote: To be clear, I don't oppose the inclusion of the ZFS service on basis of the licensing anymore. an your accurate summary gives me the impression you changed your mind. Just to be sure, did you ? Cheers, simon From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/3] Better Support for ZFS on Guix Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 17 Mar 2022 19:11: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: zimoun Cc: Liliana Marie Prikler , raid5atemyhomework , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.164754424610928 (code B ref 45692); Thu, 17 Mar 2022 19:11:01 +0000 Received: (at 45692) by debbugs.gnu.org; 17 Mar 2022 19:10:46 +0000 Received: from localhost ([127.0.0.1]:55216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUvWI-0002qC-3D for submit@debbugs.gnu.org; Thu, 17 Mar 2022 15:10:46 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:55364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUvWD-0002po-Re for 45692@debbugs.gnu.org; Thu, 17 Mar 2022 15:10:42 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by laurent.telenet-ops.be with bizsmtp id 7XAf2700E4UW6Th01XAflf; Thu, 17 Mar 2022 20:10:40 +0100 Message-ID: <9827a114287e42d1de5e58140d563b95bbe70f8a.camel@telenet.be> From: Maxime Devos Date: Thu, 17 Mar 2022 20:10:34 +0100 In-Reply-To: References: <1e72240bff6b2c5986cc26a3af5fe9517ad4db74.camel@telenet.be> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-KPePdxLNZeWwIvI55JPS" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1647544240; bh=+ndFPJG04px24zNHQUAWNEvtlvfiAy6aR2Tz0OK2kd8=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=VG4apHhzDDy6m3HcK7Qe0aI/Ax/1oL0+heGQI5SYz+B02sPmNmqfw1V7GMC7W5PdI 8GAIfp5psAReoI5R7XIBV6sL4hlWu6WmIgw6/ftAEbtaRR7OBmY+mB7JSPx26DCkyv SnLTUoEUQMsHlfvLggCtFEwpZ4sEcmDlrXLHfL8TURhMkqr30lLHKkn0n74RGS28KJ NjoLa9rBObcSms0vx6di+x+759S7KKthJdCc0Xr36L4h3ZsvybN+dxkZ/ipqaQQs4o S9JKhHz/P8TvA9iGeuIxqXm23gNiVMdYwJIn2WVQd9eHkDy8/h4130SzTiKfDIbuSU vGL1a4ZZu0/Qg== X-Spam-Score: -0.7 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-KPePdxLNZeWwIvI55JPS Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable zimoun schreef op do 17-03-2022 om 19:38 [+0100]: > You wrote: >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 To be clear, I don't oppose th= e inclusion of the ZFS service on > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 basis of the licensing anymore= . >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 >=20 > an your accurate summary gives me the impression you changed your > mind.=C2=A0 Just to be sure, did you ? Yes, indeed. IIRC, I found myself often changing my mind one way or the other quite often back then, seems like currently it's back to opposal on basis of licensing. Greetings, Maxime. --=-KPePdxLNZeWwIvI55JPS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjOHqhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kd1AQCfil0cvqQov2lWWbLBJjGyq7CU D3MBnOkiJTNFscj+fQEAt7HX3qAm2geri9eWLh/kBjWY0BN4Y2h1jCQ2tLBMPgg= =ellm -----END PGP SIGNATURE----- --=-KPePdxLNZeWwIvI55JPS-- From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/3] Better Support for ZFS on Guix Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 19 Mar 2022 14:11: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: Liliana Marie Prikler Cc: Maxime Devos , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.164769901221759 (code B ref 45692); Sat, 19 Mar 2022 14:11:02 +0000 Received: (at 45692) by debbugs.gnu.org; 19 Mar 2022 14:10:12 +0000 Received: from localhost ([127.0.0.1]:60207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVZmV-0005es-Pk for submit@debbugs.gnu.org; Sat, 19 Mar 2022 10:10:12 -0400 Received: from mail-40138.protonmail.ch ([185.70.40.138]:51158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVZmS-0005eD-UX for 45692@debbugs.gnu.org; Sat, 19 Mar 2022 10:10:09 -0400 Date: Sat, 19 Mar 2022 14:09:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1647699002; bh=327PWoQlzUWVOXkJwOn5QxsKcZkJr2YWAy7dFWy0oM0=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=Bvha7xDvWz3ZOp3BEfGnbUD89J8GXc2NAmXIrZoFd2AfwjXVbjIAP7qPU9Kt6uQvc XGK0+c3aJ/xR7vBNTv51Rjy2cTfqui03RsM0FCo+a/DMJ5rfUyS9D0sSqEzd/g00QN l1ak2deKCWhM7ILXahn9mO5n4xhWZLNa5Rb4Abeli2cf7gzGpP5Chltfdk/c+DWNyB TtIYPEBCfZMgCpOnt05Rjao1WltjD6YIIzl/hpowuUs8/IX/I3pDhR9qbAGkNbkwiu fffXf05zgTUi3R99xzCuiU1ZF9NtNUJEljBSQFs/sgwUSxSneesTiVnyBxE98sCwmV ESEQ988XmwalQ== From: raid5atemyhomework Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Good morning Liliana, > Why is it necessary to define a > file system as a service? Because getting ZFS to work on Linux requires: * That the ZFS module be added to the `initrd` so that Linux-libre can load= it. * That the ZFS module be actually *loaded*, because otherwise the system as= sumes it is loaded on some `udev` trigger. * That the ZFS module is informed of when it should start scanning for ZFS = pools in the system. * That the above step happens before `user-processes` is started. All that additonal complexity is conveniently packaged in the Guix service = system, and you could have learned that if you had just bothered to actuall= y read the patch. + (list ;; Install OpenZFS kernel module into kernel profile. + (service-extension linux-loadable-module-service-type + zfs-loadable-modules) + ;; And load it. + (service-extension kernel-module-loader-service-type + (const '("zfs"))) + ;; Make sure ZFS pools and datasets are mounted at + ;; boot. + (service-extension shepherd-root-service-type + zfs-shepherd-services) + ;; Make sure user-processes don't start until + ;; after ZFS does. + (service-extension user-processes-service-type + zfs-user-processes) + ;; Install automated scrubbing and snapshotting. + (service-extension mcron-service-type + zfs-mcron-jobs) + + ;; Install ZFS management commands in the system + ;; profile. + (service-extension profile-service-type + (compose list make-zfs-package)) + ;; Install ZFS udev rules. + (service-extension udev-service-type + (compose list make-zfs-package)))) > Why do we need to export a seemingly > unrelated variable? If you are referring to the `dependency->shepherd-service-name` variable, i= t is necessary in order to defer starting of ZFS pool scanning to after all= `mapped-device` dependencies have been opened. > Can this be tested? Is this sufficiently tested? Yes, I have run VMs on each version I have ever sent. > Are there any points Maxime that were drowned out by a huge wall of > licensing-related messages being passed back and forth that I will not > attempt to sift through in order to respond to this message? If so, > have those been sufficiently addressed? Other than grammar and wording of documentation / comments, and one point a= bout using Guix-style Scheme instead of a bit of shell (even though there a= re probably more people who can properly review the latter than the former)= , Maxime had no other points. Other reviewers had and those were already addressed. > > Another complicating factor for this bug in particular is that the mumi > web interface and the raw messages are out of sync; I have no idea why > that is the case, but trying to fetch a patch only to get one of your > bump messages is not particularly encouraging. Oh come on stop your shitty excuses. Nobody would look at this unless I sh= owed up at least once a week to pester Guix maintainers. I already tried t= he wait-for-people-and-they-will-come. Squeaky wheel gets the grease. If = you want contributors to be more respectful, then put up definitive respons= ibilities of who to contact for what and what to do if patches are being ig= nored. Otherwise I am just going to talk smack at you, Prikler. NO Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/3] Better Support for ZFS on Guix Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 19 Mar 2022 14:25: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: Maxime Devos Cc: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.164769988023367 (code B ref 45692); Sat, 19 Mar 2022 14:25:02 +0000 Received: (at 45692) by debbugs.gnu.org; 19 Mar 2022 14:24:40 +0000 Received: from localhost ([127.0.0.1]:60244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVa0W-00064o-3T for submit@debbugs.gnu.org; Sat, 19 Mar 2022 10:24:40 -0400 Received: from mail-4319.protonmail.ch ([185.70.43.19]:48457) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVa0U-00064Y-6P for 45692@debbugs.gnu.org; Sat, 19 Mar 2022 10:24:39 -0400 Date: Sat, 19 Mar 2022 14:24:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1647699871; bh=RHhLHdzIYOQ+Ge6X/2sSirRpPRDK6c1kliMmhMRM5xA=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=Pbm0Jg2iqbkyW3bgU7UIBbZ3GKwJrjJvhgdnx2QnL9Kn2FXsj/G5YC4eTkR7g+Ie/ eP7uoKOkLUFuyRJ7l2h5mEUkespZz8r6VYqPfXIvXZ+6X2NgbGaD47SCA/X1+tmH9o JePQCRy8pbBMBvL8V65UGMvyjR8xeRZx7ql7HQ42+giLmxNyVnTea8TBPnJEM4mo2P JzLXh0r/AUqegmvs6E9Rcf21I46q5xgilrqbWAi0hQcL7uou6yXgoeWARBwVge9CVf IqYH3E8s/HmsfTsKnFZwjsBvXR+Dlw+6V2Mb0whntuJMbvNBy8pbH6JXC8WhsiHFCu 71YBoGjFFSYew== From: raid5atemyhomework Message-ID: In-Reply-To: <1e72240bff6b2c5986cc26a3af5fe9517ad4db74.camel@telenet.be> References: <1e72240bff6b2c5986cc26a3af5fe9517ad4db74.camel@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Maxime, > - That seems rather inconvenient, why not use BTRFS instead which > seems quite capable and doesn't have this weird restriction? BTRFS IS NOT CAPABLE. Did you notice my pseudonym? "`raid5` ate my homework". I used the BTRFS = `raid5` mode, once. It LOST MY DATA. Never again. ZFS supports RAIDZ1 an= d has not lost my data at all yet. I've replaced ZFS disks on my pool. No= data loss. It keeps on going on. A file system that loses data is not a file system. It is a disaster. BTRFS is not an acceptable substitute for ZFS. If ZFS is removed from Guix, I am switching to Ubuntu and keeping my ZFS po= ol, I am not going to switch to BTRFS just to keep running Guix, I would *= like* to run only fully-free software, especially since I took the trouble = of paying a premium for a server that had coreboot, but my data is more imp= ortant and BTRFS is not an acceptable substitute for ZFS. The only restriction needed is to prevent binary redistribution. Yes, I ag= ree it is inconvenient to always have to transfer source code and recompile= each time. But it is a ***lot*** more inconvenient to replace my lost dat= a because BTRFS couldn't cut it despite more than a decade of development. = At least I can re-download the source code for ZFS each time from many tri= vial sources. My `/home`, I cannot. That is a bigger inconvenience. Thanks raid5atemyhomework From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] (No Subject) References: In-Reply-To: Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 19 Mar 2022 14:26: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: "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Reply-To: raid5atemyhomework Received: via spool by 45692-submit@debbugs.gnu.org id=B45692.164769992923489 (code B ref 45692); Sat, 19 Mar 2022 14:26:02 +0000 Received: (at 45692) by debbugs.gnu.org; 19 Mar 2022 14:25:29 +0000 Received: from localhost ([127.0.0.1]:60251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVa1J-00066n-DO for submit@debbugs.gnu.org; Sat, 19 Mar 2022 10:25:29 -0400 Received: from mail-4318.protonmail.ch ([185.70.43.18]:30057) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVa1H-00066X-3E for 45692@debbugs.gnu.org; Sat, 19 Mar 2022 10:25:27 -0400 Date: Sat, 19 Mar 2022 14:25:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1647699921; bh=G+fVaO46J5cR3sxO/M4UcdCh44JO7Am1a/9860Om1mw=; h=Date:To:From:Reply-To:Subject:Message-ID:From:To:Cc:Date:Subject: Reply-To:Feedback-ID:Message-ID; b=NSDsIemPC3pg6lUxsEYO8GEUGFAmxQOrC5Zm8nqq73AQJEikctLXekL78tVwGexwf GhVZC0mgQP/I9IiqxiAcmpJQM2bwlk2sTAZ51fJSVfTwFDSNVWVvbh1zMQXsVKYzPv TsdsqdYUXH+cXr+vC8LRnf27hHRD2DLoYJNipA8KlOsg4ae6Kf7kZKQRHN4pbatmw8 UeoRYkfWMtBc5ZKeHjvvDKxlNHRd9GliJzDgJ7VP6sz53Em1n2x0DWmz0P0a8ws/SE BD8+3impWtQ29mlbuboODrBiuTUOGJSVVYfK7Dns/O3iuiUDPArOfRgcLOlrV+58gh bgunwdwSuY0Fg== From: raid5atemyhomework Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 45692 quit No point: nobody will review or merge anyway. Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 SLIGHTLY_BAD_SUBJECT Subject contains something slightly spammy -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 RCVD_IN_MSPIKE_H5 RBL: Excellent reputation (+5) [185.70.43.18 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raid5atemyhomework[at]protonmail.com) 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 T_SCC_BODY_TEXT_LINE No description available. 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) close 45692 quit No point: nobody will review or merge anyway. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 19 10:38:03 2022 Received: (at control) by debbugs.gnu.org; 19 Mar 2022 14:38:03 +0000 Received: from localhost ([127.0.0.1]:60263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVaDT-0000BP-5o for submit@debbugs.gnu.org; Sat, 19 Mar 2022 10:38:03 -0400 Received: from mail-40132.protonmail.ch ([185.70.40.132]:62128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVaDQ-0000Av-Q8 for control@debbugs.gnu.org; Sat, 19 Mar 2022 10:38:01 -0400 Date: Sat, 19 Mar 2022 14:37:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1647700674; bh=G+fVaO46J5cR3sxO/M4UcdCh44JO7Am1a/9860Om1mw=; h=Date:To:From:Reply-To:Subject:Message-ID:From:To:Cc:Date:Subject: Reply-To:Feedback-ID:Message-ID; b=iTiQYdoUtd0YzPNhiZadpyOucvwn2lx2YWM5MYukICQSCXPqk7l07XodKcN5u+WXu o50OtgddEIZ+wMgV45lub0GO3FSsH0YJgXC69r0meudXPrOdkD/+x2GB+HsJwpLseZ r4ug/wnEULeXV6u93/6XUQSuF+ZbyvNnISymQJYYmumeCEfDSnZMhZ3l62th3gqCq3 i04AQigS9umKtzEO/Oq5EJZOViKoFxhde6+29Y+QIWPF4KefN751VKr+2mzRWb4469 aSPxvfMzpZXb+92m/Ap6UtTDqHkMGrt3mV1LGpPPxIwcj6CspZNNhdSZYqVmSm5HTv c/9wBXU7pccCQ== To: "control@debbugs.gnu.org" From: raid5atemyhomework Subject: (No Subject) Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 45692 quit No point: nobody will review or merge anyway. Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 SLIGHTLY_BAD_SUBJECT Subject contains something slightly spammy 0.0 RCVD_IN_MSPIKE_H5 RBL: Excellent reputation (+5) [185.70.40.132 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raid5atemyhomework[at]protonmail.com) 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: control 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 (+) close 45692 quit No point: nobody will review or merge anyway. From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/3] Better Support for ZFS on Guix Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 19 Mar 2022 16:23: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: 45692@debbugs.gnu.org Cc: liliana.prikler@ist.tugraz.at, maximedevos@telenet.be X-Debbugs-Original-To: raid5atemyhomework via Guix-patches via X-Debbugs-Original-Cc: Liliana Marie Prikler , Maxime Devos , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by submit@debbugs.gnu.org id=B.164770697120146 (code B ref -1); Sat, 19 Mar 2022 16:23:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Mar 2022 16:22:51 +0000 Received: from localhost ([127.0.0.1]:60492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVbqt-0005Es-0v for submit@debbugs.gnu.org; Sat, 19 Mar 2022 12:22:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:39066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVbqo-0005EU-4t for submit@debbugs.gnu.org; Sat, 19 Mar 2022 12:22:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVbqn-0005tQ-Tg for guix-patches@gnu.org; Sat, 19 Mar 2022 12:22:45 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:60693) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVbql-0000kb-Ql for guix-patches@gnu.org; Sat, 19 Mar 2022 12:22:45 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 045673200495; Sat, 19 Mar 2022 12:22:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sat, 19 Mar 2022 12:22:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=cc:cc:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=mesmtp; bh=g4MRBReI+6ne3RetS1iTGVvJlUq hj5A8RpK+M9UXP1w=; b=H6CQHji4IUqHhS48MF65qdBF5sgphHeVEs9M/7ite8B SOwaW+r3zU9uWAopcb/Jf0sS5VwgJ+BVF1+/5wmLf9ZnI+aN5FQkQhhqKzBRaqhH op1vETEP6YMumHpng+YwZXnsjMxCD5x4SLqb6EZYhCKUt/v4llCd+JBJoyM32PqU = DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=g4MRBReI+6ne3RetS 1iTGVvJlUqhj5A8RpK+M9UXP1w=; b=bYfTgXpVVaUhnoqj9GF2J3uCGejWi5rOC k+wjD2PTCESrTfDV7tB74puN4OtpBKTyWeihWVHDLYU2EggDMSTrFTN6ePmEWaWC mz0bUb1Z9ij/1a7pRym/R/ToQ/xJjLz749vDO/x3OClHgQxdWEEPBNdYpp8nBiy+ otQ5PMmnLB0ZeFCl1Zxnsxc9t/lM1Z9XLDhF0EiZRvGd+PjuEkmbsGlPqMH9YgB6 1W2vV72rHuGDIJEFN3OxYm2AOrV36Zbo1+1iR0AdvXqaJMKeY3Sq/5bqp8jx5ahF jGkpf9cWTIDYIZzGBCtA1rOnwQCZElftFvdWW9mnn9MmcIi6lHAgQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudefkedgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefnvghoucfh rghmuhhlrghrihcuoehlvghosehfrghmuhhlrghrihdrnhgrmhgvqeenucggtffrrghtth gvrhhnpeeukeektdffvddtudegjeegtdevhfeufeeivdejiedtieegtdevjedvjeehffev gfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvg hosehfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 19 Mar 2022 12:22:38 -0400 (EDT) Date: Sat, 19 Mar 2022 12:22:36 -0400 From: Leo Famulari Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=64.147.123.19; envelope-from=leo@famulari.name; helo=wout3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) On Sat, Mar 19, 2022 at 02:09:55PM +0000, raid5atemyhomework via Guix-patches via wrote: > Oh come on stop your shitty excuses. Nobody would look at this unless I showed up at least once a week to pester Guix maintainers. I already tried the wait-for-people-and-they-will-come. Squeaky wheel gets the grease. If you want contributors to be more respectful, then put up definitive responsibilities of who to contact for what and what to do if patches are being ignored. Otherwise I am just going to talk smack at you, Prikler. Participating in a software project is both a technical and a social exercise. It's not enough to merely do the technical work. You may need to complete some smaller and less contentious contributions along the way in order to build social trust with other people within Guix. There is a risk of social problems within GNU if we add ZFS to Guix: there is not a consensus within GNU about whether it's okay to integrate ZFS into our software. It's important for the primary contributor of ZFS (that's you) to demonstrate that they can manage that gracefully. None of us want to assume the position of having to argue on your behalf. It's true that Guix has grown large enough that formalizing teams and points of contact for various areas would help contributors. But until then, contributors are free to make an effort: learn who to contact, build a collegial relationship with them, etc. From unknown Thu Aug 14 22:20:30 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#45692] [PATCH 0/3] Better Support for ZFS on Guix Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 20 Mar 2022 04:44: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: 45692@debbugs.gnu.org Cc: raid5atemyhomework@protonmail.com, maximedevos@telenet.be X-Debbugs-Original-To: raid5atemyhomework via Guix-patches via X-Debbugs-Original-Cc: raid5atemyhomework , Maxime Devos , "45692@debbugs.gnu.org" <45692@debbugs.gnu.org> Received: via spool by submit@debbugs.gnu.org id=B.164775138731316 (code B ref -1); Sun, 20 Mar 2022 04:44:01 +0000 Received: (at submit) by debbugs.gnu.org; 20 Mar 2022 04:43:07 +0000 Received: from localhost ([127.0.0.1]:60925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVnPH-000892-6S for submit@debbugs.gnu.org; Sun, 20 Mar 2022 00:43:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:35138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVnPF-00088s-JD for submit@debbugs.gnu.org; Sun, 20 Mar 2022 00:43:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVnPE-0000td-Tl for guix-patches@gnu.org; Sun, 20 Mar 2022 00:43:04 -0400 Received: from [2607:f8b0:4864:20::735] (port=39884 helo=mail-qk1-x735.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nVnPD-0004xc-4o for guix-patches@gnu.org; Sun, 20 Mar 2022 00:43:04 -0400 Received: by mail-qk1-x735.google.com with SMTP id b67so9654716qkc.6 for ; Sat, 19 Mar 2022 21:43:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ZCPLfdZaqFb+B/MPHmbDYaQ8a3d+nuswbQMv4+KCB4M=; b=qWFY/4GpZHVBEJdwiOHmxRELDnmv85yTHY/S52vZmeR5M/JY0qaIZI98kbJAYJXmr0 jyCEcv4cRu5ZDquOChurrUIibaUQv1YmTKDtcI38bdyuppAstUVR3zfSCWs1JkmC95Uu 3X/KtpVF8zrr2XLzsbhlUJv9bAyh45/fH29bN7Kv4prWHv75AFR4WbEu4uS0/GRl5QIv vs+uIbosqClHd6N2oly/gWsvYePPyAVeUJhCfEvVCdzzTywHdCVTIaMLT3DMmHNGbimf 32bY3OsCs7noGQPgVXpBVIzNjYbuzlcOTeNvZjssqgny56yPDyL122pbhFC25yF1P2Kb uDtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=ZCPLfdZaqFb+B/MPHmbDYaQ8a3d+nuswbQMv4+KCB4M=; b=rDPHU+bcQcanBTZnfkXwWmBiDRT+WBqtQL/x5kz58rAJM8nc+kXL70oRvGXbPdfHXl eO1r+Hrs/mv1OEecRK3ipC1b2R/WcMeFaM3x4n1K/11OZCwZCkTq6inz3EpaDyhWNnhq SgfLStm44FnmsEiwAwZmL2e70IaJUUHbsNOHiITXjYnJ/4fdCfkx/Ap0D/Jj3gUqZrKa DHu5qeP8Xe+ZplbSobqX+aK+5Yr/ga+aJCc+OfRtGYRbGq3BGNwYqFSA7iabFqBMbPAT Ckf7ZLzzvyGC5Xb+NZXw6Ludlel9TdM+3XEas9oCvnJRE9jwHqV/D2w/8zq20/497PzA /8bA== X-Gm-Message-State: AOAM533xb65bnB9GGwX2FMdiBg3MfSu1mI9+hXw5wgQmW1eVJVxA+4qt 56ObHtctyD+auuzytxD04ZA= X-Google-Smtp-Source: ABdhPJzLw3rbhBLWB9U31hLQyg7gLBDFwnfVaWh5dTh3hOnumAb9LA4yjgQOJRmum35B1MQ5jnLhOQ== X-Received: by 2002:a05:620a:448d:b0:67d:b59e:8720 with SMTP id x13-20020a05620a448d00b0067db59e8720mr9603411qkp.769.1647751381771; Sat, 19 Mar 2022 21:43:01 -0700 (PDT) Received: from hurd (dsl-10-132-234.b2b2c.ca. [72.10.132.234]) by smtp.gmail.com with ESMTPSA id f14-20020ac8068e000000b002dd1bc00eadsm8418985qth.93.2022.03.19.21.43.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Mar 2022 21:43:01 -0700 (PDT) From: Maxim Cournoyer References: <1e72240bff6b2c5986cc26a3af5fe9517ad4db74.camel@telenet.be> Date: Sun, 20 Mar 2022 00:42:59 -0400 In-Reply-To: (raid5atemyhomework via Guix-patches via's message of "Sat, 19 Mar 2022 14:24:22 +0000") Message-ID: <87zgll2q0c.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::735 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::735; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x735.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, raid5atemyhomework via Guix-patches via writes: > Hello Maxime, > >> - That seems rather inconvenient, why not use BTRFS instead which >> seems quite capable and doesn't have this weird restriction? > > BTRFS IS NOT CAPABLE. > > Did you notice my pseudonym? "`raid5` ate my homework". I used the > BTRFS `raid5` mode, once. It LOST MY DATA. Never again. ZFS > supports RAIDZ1 and has not lost my data at all yet. I've replaced > ZFS disks on my pool. No data loss. It keeps on going on. > > A file system that loses data is not a file system. It is a disaster. > > > BTRFS is not an acceptable substitute for ZFS. > > If ZFS is removed from Guix, I am switching to Ubuntu and keeping my > ZFS pool, I am not going to switch to BTRFS just to keep running Guix, > I would *like* to run only fully-free software, especially since I > took the trouble of paying a premium for a server that had coreboot, > but my data is more important and BTRFS is not an acceptable > substitute for ZFS. Btrfs RAID5 or RAID6 having a write hole leading to potential data loss upon hard reset has been a known issue for like a decade, and nobody has worked on improving that [0]. RAID10 is fine though, and so is RAID1 or RAID0. I've used it (Btrfs RAID1 with zstd compression) for years on various Guix systems without any issue. > The only restriction needed is to prevent binary redistribution. Yes, > I agree it is inconvenient to always have to transfer source code and > recompile each time. But it is a ***lot*** more inconvenient to > replace my lost data because BTRFS couldn't cut it despite more than a > decade of development. At least I can re-download the source code for > ZFS each time from many trivial sources. My `/home`, I cannot. That > is a bigger inconvenience. With my personal experience suggesting that Btrfs is a solid file system, I respectfully disagree :-). At any rate, don't forget to backup your precious data to somewhere safe; as RAID is no substitute (ever had a PSU failure blowing up multiple components?). Thanks, Maxim [0] https://btrfs.wiki.kernel.org/index.php/Status#RAID56