Re: RAID1 removing failed disk returns EBUSY

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

 




----- Original Message -----
> From: "Joe Lawrence" <joe.lawrence@xxxxxxxxxxx>
> To: "Xiao Ni" <xni@xxxxxxxxxx>
> Cc: "NeilBrown" <neilb@xxxxxxx>, linux-raid@xxxxxxxxxxxxxxx, "Bill Kuzeja" <william.kuzeja@xxxxxxxxxxx>
> Sent: Friday, January 16, 2015 11:10:31 PM
> Subject: Re: RAID1 removing failed disk returns EBUSY
> 
> On Fri, 16 Jan 2015 00:20:12 -0500
> Xiao Ni <xni@xxxxxxxxxx> wrote:
> > 
> > Hi Joe
> > 
> >    Thanks for reminding me. I didn't do that. Now it can remove
> >    successfully after writing
> > "idle" to sync_action.
> > 
> >    I thought wrongly that the patch referenced in this mail is fixed for
> >    the problem.
> 
> So it sounds like even with 3.18 and a new mdadm, this bug still
> persists?
> 
> -- Joe
> 
> --

Hi Joe

   I'm a little confused now. Does the patch 45eaf45dfa4850df16bc2e8e7903d89021137f40 from linux-stable
resolve the problem?

   My environment is:

[root@dhcp-12-133 mdadm]# mdadm --version
mdadm - v3.3.2-18-g93d3bd3 - 18th December 2014  (this is the newest upstream)
[root@dhcp-12-133 mdadm]# uname -r
3.18.2


   My steps are:

[root@dhcp-12-133 mdadm]# lsblk 
sdb                       8:16   0 931.5G  0 disk 
└─sdb1                    8:17   0     5G  0 part 
sdc                       8:32   0 186.3G  0 disk 
sdd                       8:48   0 931.5G  0 disk 
└─sdd1                    8:49   0     5G  0 part 
[root@dhcp-12-133 mdadm]# mdadm -CR /dev/md0 -l1 -n2 /dev/sdb1 /dev/sdd1 --assume-clean
mdadm: Note: this array has metadata at the start and
    may not be suitable as a boot device.  If you plan to
    store '/boot' on this device please ensure that
    your boot-loader understands md/v1.x metadata, or use
    --metadata=0.90
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.

   Then I unplug the disk.

[root@dhcp-12-133 mdadm]# lsblk 
sdc                       8:32   0 186.3G  0 disk  
sdd                       8:48   0 931.5G  0 disk  
└─sdd1                    8:49   0     5G  0 part  
  └─md0                   9:0    0     5G  0 raid1 
[root@dhcp-12-133 mdadm]# echo faulty > /sys/block/md0/md/dev-sdb1/state 
[root@dhcp-12-133 mdadm]# echo remove > /sys/block/md0/md/dev-sdb1/state 
-bash: echo: write error: Device or resource busy
[root@dhcp-12-133 mdadm]# echo idle > /sys/block/md0/md/sync_action 
[root@dhcp-12-133 mdadm]# echo remove > /sys/block/md0/md/dev-sdb1/state 


   Now after I set idle to sync_action, it can be removed as you said in the mail.
It's a good workaround. Is this OK? 

Best Regards
Xiao


--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux