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

Re: Missing devices on raid1 setup



So, nobody knows what might be going on here?

On Wednesday 21 February 2007 01:15, José Pablo Fernández wrote:
> I have a raid1 setup with three partitions:
>
> md0, mounted on /, composed of /dev/sda1 and /dev/sdb1
> md1, mounted on swap, composed of /dev/sda2 and /dev/sdb2
> md2, mounted on swap, composed of /dev/sda3 and /dev/sdb3
>
> I am not sure how it was installed because it was done a long time ago, I
> don't even if I did it myself or someone else. I've found that the whole b
> disk was in removed state, so we put a new disk (just in case) and added
> it. Now when I reboot I get this state:
>
> # mdadm --detail --scan
> ARRAY /dev/md2 level=raid1 num-devices=2 UUID=[...]
>    devices=/dev/sda3,/dev/sdb3
> ARRAY /dev/md0 level=raid1 num-devices=2 UUID=[...]
>    devices=/dev/sda1
> ARRAY /dev/md1 level=raid1 num-devices=2 UUID=[...]
>    devices=/dev/sda2
>
> As you can see md0 and m1 are missing the second member of the array.
> Further inquiring shows it is removed:
>
> # mdadm --detail /dev/md0
> /dev/md0:
>         Version : 00.90.01
>   Creation Time : Tue Feb  7 14:58:18 2006
>      Raid Level : raid1
>      Array Size : 15623104 (14.90 GiB 16.00 GB)
>     Device Size : 15623104 (14.90 GiB 16.00 GB)
>    Raid Devices : 2
>   Total Devices : 1
> Preferred Minor : 0
>     Persistence : Superblock is persistent
>
>     Update Time : Wed Feb 21 01:04:16 2007
>           State : clean, degraded
>  Active Devices : 1
> Working Devices : 1
>  Failed Devices : 0
>   Spare Devices : 0
>
>            UUID : a1a07d14:64ab7244:8a585e9b:fbee0505
>          Events : 0.6120832
>
>     Number   Major   Minor   RaidDevice State
>        0       8        1        0      active sync   /dev/sda1
>        1       0        0        -      removed
>
> # mdadm --detail /dev/md1
> /dev/md1:
>         Version : 00.90.01
>   Creation Time : Tue Feb  7 14:59:06 2006
>      Raid Level : raid1
>      Array Size : 979840 (956.88 MiB 1003.36 MB)
>     Device Size : 979840 (956.88 MiB 1003.36 MB)
>    Raid Devices : 2
>   Total Devices : 1
> Preferred Minor : 1
>     Persistence : Superblock is persistent
>
>     Update Time : Wed Feb 21 00:43:44 2007
>           State : clean, degraded
>  Active Devices : 1
> Working Devices : 1
>  Failed Devices : 0
>   Spare Devices : 0
>
>            UUID : 2e8d1e91:1db84b53:602c6a7d:b9fb162a
>          Events : 0.1409
>
>     Number   Major   Minor   RaidDevice State
>        0       8        2        0      active sync   /dev/sda2
>        1       0        0        -      removed
>
>
>
> I believe md2 was ok because it was actually assembled
> from /etc/mdadm/mdadm.conf which lists both partitions correctly:
>
> # cat /etc/mdadm/mdadm.conf
> DEVICE partitions
> ARRAY /dev/md0 level=raid1 num-devices=2 UUID=[...]
>    devices=/dev/sda1,/dev/sdb1
> ARRAY /dev/md1 level=raid1 num-devices=2 UUID=[...]
>    devices=/dev/sda2,/dev/sdb2
> ARRAY /dev/md2 level=raid1 num-devices=2 UUID=[...]
>    devices=/dev/sda3,/dev/sdb3
>
> but md0 and md1 must have been assembled with another method (because there
> was no /etc at that time to read configs from) and that must be failing
> somehow.
> The kernel command line is: root=/dev/md0 ro md=0,/dev/sda1,/dev/sdb1
>
> The relevant information from dmesg is:
>
> md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
> md: raid1 personality registered as nr 3
> ...
> md: raid0 personality registered as nr 2
> raid5: automatically using best checksumming function: pIII_sse
>    pIII_sse  :  5044.000 MB/sec
> raid5: using function: pIII_sse (5044.000 MB/sec)
> md: raid5 personality registered as nr 4
> ...
> md: md1 stopped.
> md: bind<sda2>
> raid1: raid set md1 active with 1 out of 2 mirrors
> md: md0 stopped.
> md: bind<sda1>
> raid1: raid set md0 active with 1 out of 2 mirrors
> kjournald starting.  Commit interval 5 seconds
> EXT3-fs: mounted filesystem with ordered data mode.
> Adding 979832k swap on /dev/md1.  Priority:-1 extents:1
> EXT3 FS on md0, internal journal
> Capability LSM initialized
> md: md2 stopped.
> md: bind<sdb3>
> md: bind<sda3>
> raid1: raid set md2 active with 2 out of 2 mirrors
> kjournald starting.  Commit interval 5 seconds
> EXT3 FS on md2, internal journal
> EXT3-fs: mounted filesystem with ordered data mode.
>
>
> Any ideas what is wrong here?
>
> If after that I add the spare partitions, everything is good, until the
> next reboot:
>
> # mdadm /dev/md0 --add /dev/sdb1
> mdadm: hot added /dev/sdb1
> # mdadm /dev/md1 --add /dev/sdb2
> mdadm: hot added /dev/sdb2
>
> # mdadm --detail --scan
> ARRAY /dev/md2 level=raid1 num-devices=2 UUID=[...]
>    devices=/dev/sda3,/dev/sdb3
> ARRAY /dev/md0 level=raid1 num-devices=2 spares=1 UUID=[...]
>    devices=/dev/sda1,/dev/sdb1
> ARRAY /dev/md1 level=raid1 num-devices=2 spares=1 UUID=[...]
>    devices=/dev/sda2,/dev/sdb2
>
> and after waiting some minutes:
>
> ARRAY /dev/md2 level=raid1 num-devices=2 UUID=[...]
>    devices=/dev/sda3,/dev/sdb3
> ARRAY /dev/md0 level=raid1 num-devices=2 UUID=[...]
>    devices=/dev/sda1,/dev/sdb1
> ARRAY /dev/md1 level=raid1 num-devices=2 UUID=[...]
>    devices=/dev/sda2,/dev/sdb2
>
> Any help is greatly appreciated.
>
> Thank you.

-- 
José Pablo Fernández
pablo.fernandez@rs.com.ar



Reply to: