• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

“not enough to start the array” – error while staring mdadm RAID array

by admin

The Problem

After replacing issue disk on software RAID, mdadm Fails to Start the RAID Array with Error – “not enough to start the array” and Software Raid State is showing “active, FAILED, Not Started”

“mdadm –detail /dev/md0” showing only 4 disks are active and 8 removed disks.

# mdadm --detail /dev/md0
  State : active, FAILED, Not Started
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

  Number Major Minor RaidDevice State
  0 0 0 0 removed
  2 0 0 2 removed
  4 0 0 4 removed
  6 0 0 6 removed
  8 0 0 8 removed
  10 0 0 10 removed
  12 0 0 12 removed
  14 0 0 14 removed
  8 9 9 8 active sync /dev/md9
  9 9 10 9 active sync /dev/md10
  10 9 11 10 active sync /dev/md11
  11 9 12 11 active sync /dev/md12

The Solution

There was some issue in the connectivity to disk and Disk has been replaced, after that only 4 devices where showing in sync and other disks were showing removed.

For a software RAID function properly, minimum devices should be present in active state to start the Array. It would be required to assemble the mdraid array using -f (force) option, when -f option is used with mdadm -A command, it will try to assemble the array,

If the metadata on some devices appears to be out-of-date. Mdadm cannot find enough working devices to start the array, but can find some devices that are recorded as having failed.

1. Here we need to stop complete md0 as few disks are showing as active.

mdadm: Found some drive for an array that is already active: /dev/md0
mdadm: giving up.

2. Make sure to have valid backup of the data present on mdraid array mount point before trying to reassemble it. Stop the array:

# mdadm -S /dev/md0
mdadm: stopped /dev/md0

3. Assemble the pre-existing array:

# mdadm -A -f /dev/md0

mdadm: /dev/md0 has been started with 12 drives.

4. Verify status of md0:

# mdadm --detail /dev/md0

/dev/md0:
  Version : 1.2
  Creation Time : Wed May 23 09:34:49 2018
  Raid Level : raid0
  Array Size : 9373701120 (8939.46 GiB 9598.67 GB)
  Raid Devices : 12
  Total Devices : 12
  Persistence : Superblock is persistent

  Update Time : Wed May 23 09:34:49 2018
  State : clean
 Active Devices : 12
Working Devices : 12
 Failed Devices : 0
  Spare Devices : 0

  Chunk Size : 512K

  Events : 0

  Number Major Minor RaidDevice State
  0 9 1 0 active sync /dev/md1
  1 9 2 1 active sync /dev/md2
  2 9 3 2 active sync /dev/md3
  3 9 4 3 active sync /dev/md4
  4 9 5 4 active sync /dev/md5
  5 9 6 5 active sync /dev/md6
  6 9 7 6 active sync /dev/md7
  7 9 8 7 active sync /dev/md8
  8 9 9 8 active sync /dev/md9
  9 9 10 9 active sync /dev/md10
  10 9 11 10 active sync /dev/md11
  11 9 12 11 active sync /dev/md12

Filed Under: CentOS/RHEL, CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. Configure VSFTPD Chroot Environment in CentOS and RHEL
  2. How to disable or enable an HBA without reboot under CentOS/RHEL
  3. macof: command not found
  4. Beginners guide to Device Mapper (DM) multipathing
  5. The Squid Service in Failed State with Error: “Failed to make swap directory /var/spool/squid/00: (13) Permission denied”
  6. How to configure AD group in sudoers file to provide sudo access to users on Linux system
  7. Starting udev: udevd inotify_init failed: too many open files
  8. How systemd-tmpfiles cleans up /tmp/ or /var/tmp (replacement of tmpwatch) in CentOS / RHEL 7
  9. Repairing filesystem issues at Boot in CentOS/RHEL 7 and 8
  10. Cannot Increase “nproc” Value More Than 1024 in CentOS/RHEL 6

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright