Commit Graph

3 Commits (master)

Author SHA1 Message Date
Dustin 6bc0475e89 raid-array: Fix md re-add automation
Recent versions of `mdadm` stopped accepting `/dev/disk/by-id` symlinks
as the MD device:

> mdadm: Value "/dev/disk/by-id/md-name-backup5" cannot be set as devname. Reason: Cannot be started from '/' or '<'.

To work around this, we need a script to resolve the symlink and pass
the real block device name.
2025-08-05 10:31:33 -05:00
Dustin abfd35a68e raid-array: Create udev rules to auto re-add disks
This udev rule will automatically re-add disks to the RAID array when
they are connected.  `mdadm --udev-rules` is supposed to be able to
generate such a rule based on the `POLICY` definitions in
`/etc/mdadm.conf`, but I was not able to get that to work; it always
printed an empty rule file, no matter what I put in `mdadm.conf`.
2024-11-05 06:52:20 -06:00
Dustin 459d58bfb6 raid-array: Add PB to create md arrays
The `raid-array.yml` playbook can create Linux *md* software RAID arrays
using the `mdadm` command.  Two variables are required: `md_name` and
`raid_disks`.  The former is a string name for the array.  The latter is
an array of paths of block devices to add to the array.
2024-09-01 08:59:28 -05:00