Bug#495580: mdadm: 4 disk raid10 with 1 active and 3 spare possible

Felix Zielcke fzielcke at z-51.de
Tue Aug 19 06:29:01 UTC 2008


tags 495580 - moreinfo
thanks

> 
> You need to tell me exactly what you did. What you describe is not
> possible. I don't contest you are seeing a problem, but I have done
> these steps hundreds of times without any problem ever.

Ok, just did it now from scratch.
I removed the 4 virtual disk .vmdk files from my VMware vm.
Made again 4 virtual 8 GB disks like always.

/dev/sda has only one 8 GB big Linux partition, nothing special.
Copied the partition table from my first disk to all of it:

fz-vm:~# sfdisk -d /dev/sda| sfdisk /dev/sdc
fz-vm:~# sfdisk -d /dev/sda| sfdisk /dev/sdd

Repeated for sde and sdf

fz-vm:~# mdadm -C -l10 -n4 /dev/md0 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1
mdadm: array /dev/md0 started.

I waited until it was fully synced:

fz-vm:~# cat /proc/mdstat 
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] 
md0 : active raid10 sdf1[3] sde1[2] sdd1[1] sdc1[0]
      16771584 blocks 64K chunks 2 near-copies [4/4] [UUUU]

fz-vm:~# mdadm -f /dev/md0 /dev/sdc1 
mdadm: set /dev/sdc1 faulty in /dev/md0
fz-vm:~# mdadm -r /dev/md0 /dev/sdc1 
mdadm: hot removed /dev/sdc1
fz-vm:~# mdadm -a /dev/md0 /dev/sdc1 
mdadm: re-added /dev/sdc1
fz-vm:~# mdadm -f /dev/md0 /dev/sdd1 
mdadm: set /dev/sdd1 faulty in /dev/md0
fz-vm:~# mdadm -r /dev/md0 /dev/sdd1 
mdadm: hot removed /dev/sdd1
fz-vm:~# mdadm -a /dev/md0 /dev/sdd1 
mdadm: re-added /dev/sdd1
fz-vm:~# mdadm -f /dev/md0 /dev/sde1
mdadm: set /dev/sde1 faulty in /dev/md0
fz-vm:~# mdadm -r /dev/md0 /dev/sde1
mdadm: hot removed /dev/sde1
fz-vm:~# mdadm -a /dev/md0 /dev/sde1
mdadm: re-added /dev/sde1
fz-vm:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] 
md0 : active raid10 sde1[4](S) sdd1[5](S) sdc1[6](S) sdf1[3]
      16771584 blocks 64K chunks 2 near-copies [4/1] [___U]
      
unused devices: <none>
fz-vm:~# mdadm -Q --detail /dev/md0
/dev/md0:
        Version : 00.90
  Creation Time : Tue Aug 19 08:14:03 2008
     Raid Level : raid10
     Array Size : 16771584 (15.99 GiB 17.17 GB)
  Used Dev Size : 8385792 (8.00 GiB 8.59 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Tue Aug 19 08:21:29 2008
          State : clean, degraded
 Active Devices : 1
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 3

         Layout : near=2, far=1
     Chunk Size : 64K

           UUID : b4b1aeb4:de3036fe:89ccbef7:ff5abfb0 (local to host fz-vm)
         Events : 0.38

    Number   Major   Minor   RaidDevice State
       0       0        0        0      removed
       1       0        0        1      removed
       2       0        0        2      removed
       3       8       81        3      active sync   /dev/sdf1

       4       8       65        -      spare   /dev/sde1
       5       8       49        -      spare   /dev/sdd1
       6       8       33        -      spare   /dev/sdc1







More information about the pkg-mdadm-devel mailing list