all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* PSA for RAID users in Guix System (mdadm)
@ 2023-04-03 16:50 Felix Lechner via Development of GNU Guix and the GNU System distribution.
  2023-06-24  2:18 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Lechner via Development of GNU Guix and the GNU System distribution. @ 2023-04-03 16:50 UTC (permalink / raw)
  To: help-guix, Guix Devel

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—usually due to a faulty
drive sector—and 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—which I personally think is the best RAID
setup—your data will become unavailable when there are no more working
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-devices.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/


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PSA for RAID users in Guix System (mdadm)
  2023-04-03 16:50 PSA for RAID users in Guix System (mdadm) Felix Lechner via Development of GNU Guix and the GNU System distribution.
@ 2023-06-24  2:18 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
  0 siblings, 0 replies; 2+ messages in thread
From: Felix Lechner via Development of GNU Guix and the GNU System distribution. @ 2023-06-24  2:18 UTC (permalink / raw)
  To: help-guix, Guix Devel

Hi,

> 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.

A patch series for that bug was submitted for review. [1]

The fix was tested over several weeks on two production machines. I
encourage all MD array users to adopt the new md-array-device-mapping
as soon as it becomes available.

> The 'checkarray' script that can be used for this purpose on Debian
> does not appear to be available in Guix.

The checkarray script was ported but is still in testing. [2] It will
be offered as a system service in the near future, if possible.

Thanks everyone, and please have a good weekend!

Kind regards
Felix

[1] https://issues.guix.gnu.org/64259
[2] https://codeberg.org/lechner/system-config/commit/123d80f9993be0260bb723d96914ecf45533fd8a


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-24  2:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-03 16:50 PSA for RAID users in Guix System (mdadm) Felix Lechner via Development of GNU Guix and the GNU System distribution.
2023-06-24  2:18 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.