Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] mdadm: no devices found for /dev/md0
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
humbletech99
Veteran
Veteran


Joined: 26 May 2005
Posts: 1229
Location: London

PostPosted: Sun Jun 18, 2006 11:06 pm    Post subject: [SOLVED] mdadm: no devices found for /dev/md0 Reply with quote

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...
_________________
The Human Equation:

value(geeks) > value(mundanes)


Last edited by humbletech99 on Mon Jun 19, 2006 9:27 am; edited 1 time in total
Back to top
View user's profile Send private message
thesnowman
Guru
Guru


Joined: 08 May 2003
Posts: 365
Location: Sydney, Australia

PostPosted: Mon Jun 19, 2006 1:52 am    Post subject: Reply with quote

Two things - the mdadm.conf file is /etc/mdadm.conf on my system (sys-fs/mdadm-1.12.0), not /etc/mdadm/mdadm.conf.

Secondly. when you do
Code:
mdadm --detail --scan > /etc/mdadm/mdadm.conf
it is not adding the DEVICE entries to mdadm.conf.

Try this
Code:
# echo "DEVICE dev/hda1 /dev/hdb1 /dev/hde1 /dev/hdf1" > /etc/mdadm.conf
# mdadm --detail --scan >> /etc/mdadm.conf
(or just edit mdadm.conf by hand and add the DEVICE line)
Back to top
View user's profile Send private message
humbletech99
Veteran
Veteran


Joined: 26 May 2005
Posts: 1229
Location: London

PostPosted: Mon Jun 19, 2006 9:27 am    Post subject: Reply with quote

ah, thanks a lot, this got it, I forgot that the DEVICE line was needed. This sorted it.
_________________
The Human Equation:

value(geeks) > value(mundanes)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum