[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: raid software troubles (long)



martin f krafft wrote:
[..]
It would help to see the contents of /proc/mdstat at this point, and
also the output of
  mdadm -Es

and

  mdadm -Asa yes

I cannot do that now because I'm not in front of the server, now only ssh connection is available... I remember that I tried to 'cat /proc/mdstat' at that point and I received an error complaining that devices md were stopped...

Does it work if you put

  DEVICE partitions

into your mdadm.conf file?

I didn't tried modifying that file, because I didn't want to get into troubles. ;-)

. mdrun (start the raid service)

don't use mdrun, use /usr/share/mdadm/startall or mdadm directly.

ARRAY /dev/md1 level=raid1 num-devices=2 UUID=cb7c2f86:92c4fce4:65ba022f:e74122$
devices=/dev/sda5,/dev/sdb5
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=4e0ccf9d:24a4558f:291b4a3a:dbfd6f$
devices=/dev/sdb6
ARRAY /dev/md3 level=raid1 num-devices=2 UUID=cd73e87c:0b15fe41:427f5dab:f6013a$
devices=/dev/sda7,/dev/sdb7
ARRAY /dev/md4 level=raid1 num-devices=2 UUID=6e716c4b:deb9c372:5404f35f:f9eb59$
devices=/dev/sda8,/dev/sdb8
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=3a46ba90:59f0c3fc:7bbef7c8:bba4dc$
devices=/dev/sda1,/dev/sdb1

the string ",/dev/sda6" misses in /dev/md2.... why ? o_O

no idea, but it should not matter. in fact, you don't need
devices=XYZ and i suggest you remove them; the UUID is all you need
to identify array components.


By the way, I followed the 'man' instruction:

     echo 'DEVICE /dev/hd[a-z] /dev/sd*[a-z]' > mdadm.conf
mdadm --examine --scan --config=mdadm.conf >> mdadm.conf This will find what arrays could be assembled from existing IDE and SCSI whole drives (not partitions) and store the information is the format of a config file. This file is very likely to contain unwanted detail, particularly the devices= entries. It should be reviewed and edited before being
   used as an actual config file.

and I noticed a difference between uuid of /dev/md4...
See the files below.

This is my /etc/mdadm/mdadm.conf
*
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=cb7c2f86:92c4fce4:65ba022f:e74122$
   devices=/dev/sda5,/dev/sdb5
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=4e0ccf9d:24a4558f:291b4a3a:dbfd6f$
   devices=/dev/sdb6,/dev/sda6
ARRAY /dev/md3 level=raid1 num-devices=2 UUID=cd73e87c:0b15fe41:427f5dab:f6013a$
   devices=/dev/sda7,/dev/sdb7
ARRAY /dev/md4 level=raid1 num-devices=2 UUID=6e716c4b:deb9c372:5404f35f:f9eb59$
   devices=/dev/sda8,/dev/sdb8
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=3a46ba90:59f0c3fc:7bbef7c8:bba4dc$
   devices=/dev/sda1,/dev/sdb1
*

And this is mdadm.conf,created using the man's instructions above.
*
DEVICE /dev/hd*[0-9] /dev/sd*[0-9]
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=3a46ba90:59f0c3fc:7bbef7c8:bba4dc$
   devices=/dev/sdb1,/dev/sda1
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=cb7c2f86:92c4fce4:65ba022f:e74122$
   devices=/dev/sdb5,/dev/sda5
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=4e0ccf9d:24a4558f:291b4a3a:dbfd6f$
   devices=/dev/sdb6,/dev/sda6
ARRAY /dev/md3 level=raid1 num-devices=2 UUID=cd73e87c:0b15fe41:427f5dab:f6013a$
   devices=/dev/sdb7,/dev/sda7
ARRAY /dev/md4 level=raid1 num-devices=2 UUID=56630b43:37792ebf:dab9c0e7:e3a408$
   devices=/dev/sdb8,/dev/sda8

As you can see, there is a different UUID in md4 !

# mdadm --misc --query /dev/md0
/dev/md0: 1.86GiB raid1 2 devices, 0 spares. Use mdadm --detail for more detail
/dev/md0: No md super block found, not an md component.
Superblock ? How can I fix this ?
[...]
# mdadm --misc --examine /dev/md0
mdadm: No super block found on /dev/md0 (Expected magic a92b4efc, got 00000000)
Superblock error again..

--query and --examine are for components, like /dev/sda1, not the
array. So there is no problem in the above, you're just asking the
wrong question.

Ok, so let's examine the output of:

 mdadm --query --examine /dev/sda8
 mdadm --query --examine /dev/sdb8

 because they set up the md4 array.

# mdadm --query --examine /dev/sda8
/dev/sda8:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 56630b43:37792ebf:dab9c0e7:e3a4081e
  Creation Time : Thu Dec 21 03:07:52 2006
     Raid Level : raid1
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 4

    Update Time : Wed Dec 27 21:01:05 2006
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 80be8b2b - correct
         Events : 0.29976


      Number   Major   Minor   RaidDevice State
this     0       8        8        0      active sync   /dev/sda8

   0     0       8        8        0      active sync   /dev/sda8
   1     1       8       24        1      active sync   /dev/sdb8




# mdadm --query --examine /dev/sdb8
/dev/sdb8:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 56630b43:37792ebf:dab9c0e7:e3a4081e
  Creation Time : Thu Dec 21 03:07:52 2006
     Raid Level : raid1
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 4

    Update Time : Wed Dec 27 21:01:05 2006
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 80be8b3d - correct
         Events : 0.29976


      Number   Major   Minor   RaidDevice State
this     1       8       24        1      active sync   /dev/sdb8

   0     0       8        8        0      active sync   /dev/sda8
   1     1       8       24        1      active sync   /dev/sdb8


Again, UUID are equal ... but not the same as the ones in /etc/mdadm/mdadm.conf
I must modify my actual mdadm.conf,changing the UUID parameter, right ?

Thank you.

Hal

# mdadm --misc --query --detail /dev/md0

--detail is for the array.

HTH,




Reply to: