FULL AI ANALYSIS

mdadm RAID1 Array Shows 'wrong UUID' and Refuses to Re‑add Disk After Transient USB Enclosure Disconnect

Generated Oct 3, 2026, 12:35:03 AM

Analysis summary

The external drive appears to have a raid superblock with an event count older than the internal disk; mdadm treats it as out-of-date and refuses to add it to prevent data regression. The transient USB disconnect likely caused the external device to miss some array events; reconnecting under a different device path or with slightly different metadata can trigger UUID mismatches. Safe recovery requires careful reconciliation of raid superblock event counts, not blind metadata recreation.

Possible causes

External disk did not record the latest array events due to sudden power loss while enclosue was disconnected, causing an event-count gap.

95%

Human attempt to rewrite metadata in earlier recovery attempts left inconsistent state between disks.

80%

USB enclosure firmware or path change altered how the kernel presents the drive (different WWN/ID), making mdadm treat it as a different device with mismatched UUID.

50%

Partial metadata corruption on the external disk's raid superblock due to enclosure disconnect or USB errors.

30%

Suggested fixes

1

Diagnostic step 1

Make a sector-level read-only image of the external disk (dd if=/dev/sdb of=/path/to/storage/drive_sdb.img bs=1M conv=sync, status=progress) to preserve current state before any metadata changes. If insufficient local space, attach another drive or use a remote block-transfer—do not proceed without a backup image.

2

Diagnostic step 2

Use mdadm --examine on both devices and record the raid-superblock event counts, UUIDs, and layout. Save the outputs for vendor/advanced support.

3

Diagnostic step 3

If event count on sdb is lower than sda (expected), avoid zeroing metadata. Instead, attempt to add sdb as a spare with --backup-file and --write‑most‑recent‑superblock options if mdadm supports them; test first on the disk image with mdadm --build in a safe environment.

4

Diagnostic step 4

If uncertain, attach the external disk to another Linux machine and assemble the array read-only (mdadm --assemble --readonly) to verify filesystem integrity and copy critical data off sda before metadata operations.

5

Diagnostic step 5

If stuck after above, escalate to a storage specialist or data‑recovery service; provide the disk image, mdadm --examine outputs, and syslog excerpts. Do not perform destructive metadata recreation without a verified backup image.