Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I create raid 10 , i removed two arrays form md11 one by one , after that i going to editing the contents those are mounted ( it will be not responding stage), after i try for remove arrays those are left it is shows device or resource busy ( is not removed from memory). i try to terminate process this is also not work, i absorve from 4 days resync will be 8.0% it can not modifying.

#cat /proc/mdstat

Personalities : [raid1] [raid0] [raid6] [raid5] [raid4] [linear] [raid10] md11 : active raid10 sde1[3] sdj14 286743936 blocks 64K chunks 2 near-copies [4/1] [___U] [1:2:3:0] [=>...................] resync = 8.0% (23210368/286743936) finish=289392.6min speed=15K/sec

#mdadm -D /dev/md11
/dev/md11: Version : 00.90.03 Creation Time : Sun Jan 16 16:20:01 2011 Raid Level : raid10 Array Size : 286743936 (273.46 GiB 293.63 GB) Device Size : 143371968 (136.73 GiB 146.81 GB) Raid Devices : 4 Total Devices : 2 Preferred Minor : 11 Persistence : Superblock is persistent

Update Time : Sun Jan 16 16:56:07 2011
      State : active, degraded, resyncing

Active Devices : 1 Working Devices : 1 Failed Devices : 1 Spare Devices : 0

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

Rebuild Status : 8% complete

       UUID : 5e124ea4:79a01181:dc4110d3:a48576ea
     Events : 0.23

Number   Major   Minor   RaidDevice State
   0       0        0        0      removed
   1       0        0        1      removed
   4       8      145        2      faulty spare rebuilding   /dev/sdj1
   3       8       65        3      active sync   /dev/sde1

#umount /dev/md11
umount: /dev/md11: not mounted


#mdadm -S /dev/md11
mdadm: fail to stop array /dev/md11: Device or resource busy


#lsof /dev/md11

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME mount 2128 root 3r BLK 9,11 4058 /dev/md11 mount 5018 root 3r BLK 9,11 4058 /dev/md11 mdadm 27605 root 3r BLK 9,11 4058 /dev/md11 mount 30562 root 3r BLK 9,11 4058 /dev/md11 badblocks 30591 root 3r BLK 9,11 4058 /dev/md11
#kill -9 2128
#kill -9 5018
#kill -9 27605
#kill -9 30562
#kill -3 30591

#mdadm -S /dev/md11
mdadm: fail to stop array /dev/md11: Device or resource busy


#lsof /dev/md11

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME mount 2128 root 3r BLK 9,11 4058 /dev/md11 mount 5018 root 3r BLK 9,11 4058 /dev/md11 mdadm 27605 root 3r BLK 9,11 4058 /dev/md11 mount 30562 root 3r BLK 9,11 4058 /dev/md11 badblocks 30591 root 3r BLK 9,11 4058 /dev/md11


#cat /proc/mdstat

Personalities : [raid1] [raid0] [raid6] [raid5] [raid4] [linear] [raid10] md11 : active raid10 sde1[3] sdj14 286743936 blocks 64K chunks 2 near-copies [4/1] [___U] [1:2:3:0] [=>...................] resync = 8.0% (23210368/286743936) finish=289392.6min speed=15K/sec
share|improve this question
1  
I can not understand what you are asking, and you have removed the newlines from the lsof output, putting it all on one long unreadable line. Do not do that. –  psusi Feb 22 '11 at 14:29

1 Answer 1

So it looks like you started off with 5 disks, I don't see a number "two" disk in this list and you need 4 disks just to create a RAID 10

Number   Major   Minor   RaidDevice State

   0       0        0        0      removed

   1       0        0        1      removed

   4       8      145        2      faulty spare rebuilding   /dev/sdj1

   3       8       65        3      active sync   /dev/sde1

and a spare was defined which automatically kicked in. Problem is, you don't have enough disks in the array to rebuild it completely.

I don't work with RAID 10 much but from the looks of things...

  1. you started with 5 disks,1 defined as a spare
  2. 1 member dropped out, perhaps without your knowledge
  3. hot spare was engaged and started rebuilding
  4. 2 more disks were pulled

You need 4 disks min for a functioning RAID 10, you only have two, add two more and hopefully your sync meter will start to tick upwards. Also, you can't kill those processes, they're doing IO and are uninterruptable, you have to let it complete or give up on its own accord.

HINT: next time you want to practice this kind of fault injection, use a VM to familiarize yourself, just create a bunch of tiny vdisks.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.