LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   mdadm: no devices found for /dev/md0 (https://www.linuxquestions.org/questions/linux-general-1/mdadm-no-devices-found-for-dev-md0-456037/)

humbletech99 06-18-2006 06:06 PM

mdadm: no devices found for /dev/md0
 
I've got a raid5 array on four disks, but when I try to reconstruct the array it fails as follows:
Code:

mdadm -A /dev/md0
mdadm: no devices found for /dev/md0

However, if I do
Code:

mdadm -A /dev/md0 /dev/hd[abef]1
then it reconstructs the array properly and you can see the results:
Code:

mdadm --detail --scan
ARRAY /dev/md0 level=raid5 num-devices=4 UUID=feebae85:4c152e6d:e63ff723:9401b138
  devices=/dev/hda1,/dev/hdb1,/dev/hde1,/dev/hdf1

Code:

mdadm --detail /dev/md0
/dev/md0:
        Version : 00.90.00
  Creation Time : Mon May 22 22:37:50 2006
    Raid Level : raid5
    Array Size : 468864768 (447.14 GiB 480.12 GB)
    Device Size : 156288256 (149.05 GiB 160.04 GB)
  Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Sun Jun 18 23:51:01 2006
          State : active
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

        Layout : left-symmetric
    Chunk Size : 64K

          UUID : feebae85:4c152e6d:e63ff723:9401b138
        Events : 0.13

    Number  Major  Minor  RaidDevice State
      0      3        1        0      active sync  /dev/hda1
      1      3      65        1      active sync  /dev/hdb1
      2      33        1        2      active sync  /dev/hde1
      3      33      65        3      active sync  /dev/hdf1

The proper details for /dev/md0 are in /etc/mdadm/mdadm.conf and I've tried to remake this file from the working array by doing
Code:

mdadm -A /dev/md0 /dev/hd[abef]1
mdadm --detail --scan > /etc/mdadm/mdadm.conf

But then trying to reassemble the array the easy way still fails
Code:

mdadm -A /dev/md0
mdadm: no devices found for /dev/md0

???

I don't understand why this doesn't work, it used to...

nhydra 06-19-2006 02:07 AM

I am almost sure for that if you open /etc/mdadm.conf you will not see the line for this raid array.
You have to add it to this config file and then have to enjoy.
I don't know why but mdadm doesn't write the configuration to the /etc/mdadm.conf. I had the same situation like you.
Just added the config lines to the file and then restart or just restart rc.d script.
In the /etc/mdadm.conf you have to add something like that:
ARRAY /dev/md0 level=raid0 UUID=ghjhg34:23423DFds:23423sdfa:234234fsSDF

Something like that. The UUID you will take with this command : mdadm --detail /dev/raid-device.

At last you have to enjoy your new raid array. :)

humbletech99 06-19-2006 04:28 AM

well, actually, that line for ARRAY is done by mdadm --detail --scan. What I forgot was the DEVICE /dev/hda1 /dev/hdb1... line before that. It works now.


All times are GMT -5. The time now is 09:01 AM.