mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 21:13:28 +01:00
Previously, the `disk-deactivate` script stopped mdadm arrays before wiping the underlying physical disks. This caused filesystems with backup superblocks (like BTRFS at 64 MiB and 256 GiB offsets) to survive the wipe, as the backups were striped across the physical disks and missed by `wipefs` on the raw block devices. When the array was reassembled during reprovisioning, the filesystem superblocks realigned. `disko` would detect the old filesystem via `blkid` and silently skip the `mkfs` step, leaving stale data intact. This commit adds a `wipefs --all` command against the assembled RAID device *before* stopping it, ensuring all filesystem signatures and backup superblocks are cleanly destroyed.