From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id oJG0Dx4EK2T4cAEASxT56A (envelope-from ) for ; Mon, 03 Apr 2023 18:51:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id UFKkDh4EK2RnAAAAG6o9tA (envelope-from ) for ; Mon, 03 Apr 2023 18:51:42 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 13AE22F639 for ; Mon, 3 Apr 2023 18:51:40 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjNOz-0004eG-7L; Mon, 03 Apr 2023 12:51:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjNOw-0004dI-8L; Mon, 03 Apr 2023 12:51:26 -0400 Received: from sail-ipv4.us-core.com ([208.82.101.137]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pjNOu-0005Mw-99; Mon, 03 Apr 2023 12:51:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=vXQNsgsO6pZGFuZ 5eqnUZpNdXCzzOyn4g1Q3WYzUkyQ=; h=to:subject:date:from; d=lease-up.com; b=MNpdliL8VQQKacPW0yXlKTs+RZk15jyiO5PQxCjg3MySRoUsN/eHJFDT/kCxdXe62bqh 3qWxwxzXveM92NcOj5lb3yaa7ak1pmNBXwgNyb+gs3Gpp0JJAad5bQw4Kerx/YGpZFtQne tx0OEyD/dZFjZuwCvd3mBmhfIlnHAMCEs= Received: by sail-ipv4.us-core.com (OpenSMTPD) with ESMTPSA id 613a4c60 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Mon, 3 Apr 2023 16:51:18 +0000 (UTC) Received: by mail-lf1-f49.google.com with SMTP id c29so38940436lfv.3; Mon, 03 Apr 2023 09:51:17 -0700 (PDT) X-Gm-Message-State: AAQBX9cm/elyi0/4TYeBVn+xFZ5evU/4qFp25L865a8sdLSmc0jiGUIO HqZLB/coyenjnkFYIuhhcJkhtw5tG/nTgtb57Ko= X-Google-Smtp-Source: AKy350Z1CpqhUZ6ieZ1ZL4jtqRb676Hhd1mVk+IcgVshXhiqhSfvB3PxHuzepLxTeeTXriu5QqshXd+WtSZ2120zHbs= X-Received: by 2002:ac2:4473:0:b0:4eb:eaf:aa00 with SMTP id y19-20020ac24473000000b004eb0eafaa00mr8574981lfl.4.1680540675755; Mon, 03 Apr 2023 09:51:15 -0700 (PDT) MIME-Version: 1.0 Date: Mon, 3 Apr 2023 09:50:39 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: PSA for RAID users in Guix System (mdadm) To: help-guix , Guix Devel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=208.82.101.137; envelope-from=felix.lechner@lease-up.com; helo=sail-ipv4.us-core.com 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Felix Lechner From: Felix Lechner via "Development of GNU Guix and the GNU System distribution." Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680540702; a=rsa-sha256; cv=none; b=b2jvvfduXG0kStEUK7uW04PPvh+uqDFB/l1al2qvpwCME/+2NKU2xlLM607TMKoSjQ8Xix nGkTXNzWT99VQq7gaV8OBVoePkjA+Mj8OogiSggiY3kBnD5T53qqfI8U8iV1Ba1zGtkh59 bF8erWfiT7QVuzSP90XXVvhoCVJkiNAEtNq06W1hmfQLgDJJMBglFw4x5qQqJiz3mCxGvv +R24fUB5e+PEOle/4FqSOCIkl9kiMzhREetjGk/X4w/r7ykqUYqFeFTQP+dmkUZdFgeR8r RweNhMe5+gaXfP1LAaXjD/1bIfE5JA+7Vvp890I6/5XRWIzJqnXDWxzbiVMmlA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lease-up.com header.s=2017 header.b=MNpdliL8; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680540702; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Dwcjs3KipzkvgNB/PPfmYyBT45HVOR5DeU8Ez95XMTM=; b=Z5cu4OroGfNwJ/WeQurdkFK5FpM2UC4xAjn4gU49oZ3nXiZeZ9bVu3C+C90qDrAnm+oIch K5CKnP/uLFsTPlDmc+WlCYDqX3QGX8SuL5R+S4eyZjHsbNANk579mJki9R9XOdocM27AI+ ASC7JWiCym8JNJxS1NdJrTihjZwel083bKHhwhv5aO0fzWjZ3QjGbYbAPYZFRJ3HJl3lxq QGAl6xKa6mLf6Og+eLurRIVaF7irsw3XGrV7WCP5iayQSfgGxKILnhtPd5JQe6qQdML1Mp RSi+Kkfte/uZSNChw8BD8mH8u8q3SK+6Im4Jak8ZAqpAcR+maXlyf5fEv1uvWw== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=lease-up.com header.s=2017 header.b=MNpdliL8; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -3.52 X-Spam-Score: -3.52 X-Migadu-Queue-Id: 13AE22F639 X-TUID: KICCEnMCOQMV Hi, If you came from another GNU/Linux distribution and use software RAID in Guix System, you may not be getting the best possible experience. This message is probably only interesting to you if you have a 'raid-device-mapping' in your operating system declaration. [1] In terms of basic functionality, the raid-device-mapping in Guix checks whether all component devices are present before assembling an array . [2] That check will prevent your system from booting when one of your disks has failed. Since power cycles are a common source of failure (at least for home users) the check is probably too strict. The requirement to have all drives available kind of goes against the purpose of having RAID. At present, I am contemplating the best way to combine the declarative features in Guix with mdadm's capability to auto-assemble arrays. It may be enough to check that just one of the array components is present instead of all. Eventually, I hope to send in a patch but I am open to other ideas. Second, and nearly as important, Guix does not install a cron job to check your mdadm arrays. That functionality is essential in maintaining your data redundancy when you consider that data is generally found to be unavailable when reading=E2=80=94usually due to a fau= lty drive sector=E2=80=94and must be written again to be available in the reallocated sector. The mdadm array check does exactly that. It reads all data in your array and writes working copies to each component drive. In Debian and most of its derivatives, that check is performed on the first Sunday of each month at 1 AM in the morning. [3] Without it, you risk a gradual degradation of your on-disk data. For plain mirroring across two or more drives=E2=80=94which I personally think is the best RAID setup=E2=80=94your data will become unavailable when there are no more work= ing copies in the array. You can manually trigger such a check for your array with a command like this one (please replace X) echo check > /sys/block/mdX/md/sync_action and monitor the progress with cat /proc/mdstat The 'checkarray' script that can be used for this purpose on Debian [4] does not appear to be available in Guix. I may transcribe it into GNU Guile if there is broader interest in our community. I would be happy to hear everyone's thoughts. I have only used Guix for a year and maintained mdadm in Debian. Kind regards Felix Lechner [1] https://guix.gnu.org/manual/devel/en/html_node/Mapped-Devices.html [2] https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system/mapped-devic= es.scm#n292 [3] https://sources.debian.org/src/mdadm/4.2-5/systemd/mdcheck_start.timer/= #L12 [4] https://sources.debian.org/src/mdadm/4.2-5/debian/checkarray/