nixpkgs/nixos/modules/tasks
Kyle Hendricks 463424129d 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:
978d812153/cmdline/state.c (L692)

SnapRAID doc for split parity files: https://www.snapraid.it/manual#7.1
2023-11-29 20:10:29 -05:00
..
filesystems Merge pull request #269452 from RaitoBezarius/zfs-superstable 2023-11-24 17:41:43 +01:00
auto-upgrade.nix nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
bcache.nix nixos/bcache: add a boot.bcache.enable kill switch 2023-09-10 14:26:53 +01:00
cpu-freq.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
encrypted-devices.nix systemd-stage-1: Add assertions for unsupported options. 2023-10-30 12:15:58 +01:00
filesystems.nix nixos/stage-1-systemd: makeFstabEntries: drop rootPrefix parameter 2023-09-27 18:31:56 -04:00
lvm.nix Merge pull request #240600 from lilyinstarlight/fix/luksroot-lvm-default-off 2023-07-05 12:42:45 -04:00
network-interfaces-scripted.nix nixos: fix iproute2 invocations (#263976) 2023-10-29 18:27:16 +01:00
network-interfaces-systemd.nix nixos: fix iproute2 invocations (#263976) 2023-10-29 18:27:16 +01:00
network-interfaces.nix nixos/network-interfaces: fix typo in networking.fqdn 2023-11-12 08:47:01 -08:00
powertop.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
scsi-link-power-management.nix nixos/*: automatically convert option docs to MD 2022-08-03 22:46:41 +02:00
snapraid.nix snapraid: fix split parity files 2023-11-29 20:10:29 -05:00
stratis.nix nixos/stratis: init 2022-09-12 15:19:36 +08:00
swraid.nix systemd-stage-1: Add assertions for unsupported options. 2023-10-30 12:15:58 +01:00
trackpoint.nix treewide: automatically md-convert option descriptions 2022-07-30 15:16:34 +02:00
tty-backgrounds-combine.sh