Software⏱️ 3 min read📅 2026-06-15

How to Fix: Error when trying to reduce number of drives in a Linux RAID array

Error when trying to reduce number of drives in a Linux RAID array, mdadm error, Synology NAS, RAID6 array

Quick Answer: To fix the issue, use the --keep-duper-build flag with mdadm to keep the duper build and then remove the extra drive.

Error when trying to reduce number of drives in a Linux RAID array

This error affects users who are attempting to modify their RAID arrays on a Synology NAS device. The issue can be frustrating as it prevents users from adjusting the configuration of their storage setup.

⚠️ Common Causes

  • The primary reason for this error is that mdadm does not allow reducing the number of devices in a RAID array once the array has been created. This is because the redundancy and data protection provided by the RAID level are compromised when fewer devices are used.
  • An alternative reason could be if the array is not yet fully synchronized, meaning some devices may still be in the process of being added or removed.

✅ Best Solutions to Fix It

Resyncing the array before reduction

  1. Step 1: Stop any data writes to the RAID array and ensure that all devices are online.
  2. Step 2: Run the command `mdadm --stop /dev/md2` to stop the array from being used, then `sync` to ensure all data is written to disk.
  3. Step 3: Wait for the array to be fully synchronized by checking the status with `mdadm -D /dev/md2`.

Recreating the RAID array

  1. Step 1: Run the command `mdadm --remove /dev/md2` to remove the existing array.
  2. Step 2: Create a new array with fewer devices using `mdadm --create /dev/md2 --raid-devices=11 /dev/sd{a-f}1`. Replace `/dev/sd{a-f}1` with the correct device names for your array. Be cautious as this will delete all data on the array.
  3. Step 3: Rebuild the array by running `mdadm --detail /dev/md2` and then `sync` to ensure all data is written to disk.

✨ Wrapping Up

To resolve the error, users can try resyncing the array before reduction or recreate the RAID array with fewer devices. It's essential to back up data before making any changes to the storage configuration to avoid data loss.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions