troubleshooting Question

Linux RAID with MDADM not staying in sync.

Avatar of zanotech
zanotech asked on
Unix OSLinux
33 Comments2 Solutions1281 ViewsLast Modified:
SUSE LINUX ENTERPRISE DESKTOP 10.
I had heard good reports about the performance of RAID on Suse, so I decided to RAID my main pc.  
As I was fully  aware that the a mistake could easily hose my system, I took it real slow, but in the end I couldn't get the arrays to stay synced.

The system was originally running for many months on a single disk, so I simply installed an identical 320GB disk and created identical partitions on it.  I synced the array partitions which appeared to complete successfully, but after a reboot,  the array appears broken again.  Greater detail is explained below.

To sync the array partitions I ran:  

srv1:/home/gordonm # mdadm /dev/md2 -a /dev/sda2

which completed successfully as shown by...

srv1:/home/gordonm # cat /proc/mdstat
Personalities : [raid1]
md5 : active raid1 sdb5[0]
      24121472 blocks [2/1] [U_]

md3 : active raid1 sdb3[0]
      276832000 blocks [2/1] [U_]

md1 : active raid1 sdb1[0]
      104320 blocks [2/1] [U_]

md2 : active raid1 sda2[1] sdb2[0]
      10490368 blocks [2/2] [UU]

md6 : active raid1 sdb6[0] sda6[1]
      1020032 blocks [2/2] [UU]

unused devices: <none>


As a double check of the just synced array MD2, the below shows no problem that I can see.
srv1:/home/gordonm # mdadm --detail /dev/md2
/dev/md2:
        Version : 00.90.03
  Creation Time : Sun Jun 24 21:29:45 2007
     Raid Level : raid1
     Array Size : 10490368 (10.00 GiB 10.74 GB)
    Device Size : 10490368 (10.00 GiB 10.74 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 2
    Persistence : Superblock is persistent

    Update Time : Sun Jul 22 23:47:16 2007
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 9bc64366:61602784:e2438f93:b2779bdc
         Events : 0.558886

    Number   Major   Minor   RaidDevice State
       0       8       18        0      active sync   /dev/sdb2
       1       8        2        1      active sync   /dev/sda2



The problem is when I reboot.  The arrays are broken again as if I havn't added the second disk at all.

Here is my current setup...

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   fd  Linux raid autodetect
/dev/sda2              14        1319    10490445   fd  Linux raid autodetect
/dev/sda3            1320       35783   276832080   fd  Linux raid autodetect
/dev/sda4           35784       38913    25141725    f  W95 Ext'd (LBA)
/dev/sda5           35784       38786    24121566   fd  Linux raid autodetect
/dev/sda6           38787       38913     1020096   fd  Linux raid autodetect

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391   fd  Linux raid autodetect
/dev/sdb2              14        1319    10490445   fd  Linux raid autodetect
/dev/sdb3            1320       35783   276832080   fd  Linux raid autodetect
/dev/sdb4           35784       38913    25141725    f  W95 Ext'd (LBA)
/dev/sdb5           35784       38786    24121566   fd  Linux raid autodetect
/dev/sdb6           38787       38913     1020096   fd  Linux raid autodetect

#############
#  MDADM.CONF     #
#############
srv1:/home/gordonm # cat /etc/mdadm.conf
DEVICE /dev/sdb1 /dev/sdb2 /dev/sdb3 /dev/sdb5 /dev/sdb6 /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda5 /dev/sdb6
ARRAY /dev/md1 devices=/dev/sdb1,/dev/sda1
ARRAY /dev/md2 devices=/dev/sdb2,/dev/sda2
ARRAY /dev/md3 devices=/dev/sdb3,/dev/sda3
ARRAY /dev/md5 devices=/dev/sdb5,/dev/sda5
ARRAY /dev/md6 devices=/dev/sdb6,/dev/sda6

Something during reboot is breaking it, or the state of the array is not saving at shutdown.  
Either way - "HELP!" - I am a linux newb, learning fast, but I am truly stumped and am not sure where to start.
Thanks in advance.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 33 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 33 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros