From 463424129d0c05e5332882613a8363cb3817d0d5 Mon Sep 17 00:00:00 2001 From: Kyle Hendricks Date: Wed, 22 Nov 2023 20:51:11 -0500 Subject: snapraid: fix split parity files SnapRAID has a feature where you can specify "split" parity files. This is useful when you're using 16tb or bigger ext4-formatted disks for parity. ext4 doesn't support files bigger than 16tb so this "split parity file" can be used to specify two parity files on a single parity disk and SnapRAID will automatically use the subsequent file when the current cannot grow anymore (hits 16TB). You specify these split parity files by separating them with commas in the "parity" config option. This mostly already works except when it comes to the scheduled systemd sync job where it specifies ReadWritePaths. If you specify a parity with multiple files you'll get an error when the systemd job runs: Failed to set up mount namespacing: /run/systemd/unit-root/mnt/parity1/snapraid1.parity,/mnt/parity1/snapraid2.parity: No such file or directory Essentially, when the parity file paths are passed into ReadWritePaths, they're always treated as a single path. This change makes sure to split the paths if they contain a comma. The big concern for this change is if it would break users who have commas in their actual parity file paths. This won't be an issue because SnapRAID itself blindly splits on commas for parity files, so legitimate commas in a parity file path wouldn't work in SnapRAID anyway. See here: https://github.com/amadvance/snapraid/blob/978d812153736c06763192f0f1d4b34e54ad633f/cmdline/state.c#L692 SnapRAID doc for split parity files: https://www.snapraid.it/manual#7.1 --- nixos/doc/manual/release-notes/rl-2311.section.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nixos/doc') diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index 78e02c9d2446..4938cd68818a 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -1313,6 +1313,9 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2 qemu-vm module from overriding `fileSystems` by setting `virtualisation.fileSystems = lib.mkForce { };`. +- When using [split parity files](https://www.snapraid.it/manual#7.1) in `snapraid`, + the snapraid-sync systemd service will no longer fail to run. + ## Nixpkgs Library {#sec-release-23.11-nixpkgs-lib} ### Breaking Changes {#sec-release-23.11-lib-breaking} -- cgit 1.4.1